D
Deleted member 58914
Guest
If you do not have ffmpeg or pwcview, you may need to install them.
First add this to your /etc/rc.conf:
webcamd_enable="YES" #To use the webcam
devfs_system_ruleset="system" #For the webcam permissions
After that, create a custom device rule at the file at /etc/devfs.rules and save in order to have the right permissions for the webcam:
Also do:
Add this line and save for webcam support:
The usage of "ee" is simpler than vi I think. The only point worthy notice is you use esc to say you are done editing your documen, and then you use "a" to save it before exiting.
It shall work out of the box with the settings provided above. I read you can use pwcview together with a command but have not tested it. To see what your camera is seeing without executing a command:
The command I use to record a instagram usable video file is:
Command 1
-f oss is the audio input
-i /dev/dsp1.0 is the builtin notebook speaker, you may change the used dsp number.
-f v4l2 is the video input
-s 854x480 is a good resolution between quality and speed
-i /dev/video0 this is the webcam video input
-r 30 is the framerate
-b:v 2.5M is an average output video quality
-b:a 128k is an average output audio quality
-tmp.avi outputs a video file of the type named 'tmp'
Command 2
-i tmp.avi uses this file as input
-y exp.mp4 converts that input to a mp4 file named 'exp'. -y makes it overwrite without asking if the file already exists.
Command 3
rm tmp.avi removes this file
* && is the same as AND, executing multiple commands at once
First add this to your /etc/rc.conf:
webcamd_enable="YES" #To use the webcam
devfs_system_ruleset="system" #For the webcam permissions
After that, create a custom device rule at the file at /etc/devfs.rules and save in order to have the right permissions for the webcam:
Code:
[system=10]
add path 'video*' mode 0666
Also do:
Code:
ee /boot/loader.conf
Add this line and save for webcam support:
Code:
cuse_load="YES"
The usage of "ee" is simpler than vi I think. The only point worthy notice is you use esc to say you are done editing your documen, and then you use "a" to save it before exiting.
It shall work out of the box with the settings provided above. I read you can use pwcview together with a command but have not tested it. To see what your camera is seeing without executing a command:
Code:
pwcview
The command I use to record a instagram usable video file is:
Code:
ffmpeg -f oss -i /dev/dsp1.0 -f v4l2 -s 854x480 -i /dev/video0 -r 30 -b:v 2.5M -b:a 128k tmp.avi && ffmpeg -i tmp.avi -y exp.mp4 && rm tmp.avi
Command 1
-f oss is the audio input
-i /dev/dsp1.0 is the builtin notebook speaker, you may change the used dsp number.
-f v4l2 is the video input
-s 854x480 is a good resolution between quality and speed
-i /dev/video0 this is the webcam video input
-r 30 is the framerate
-b:v 2.5M is an average output video quality
-b:a 128k is an average output audio quality
-tmp.avi outputs a video file of the type named 'tmp'
Command 2
-i tmp.avi uses this file as input
-y exp.mp4 converts that input to a mp4 file named 'exp'. -y makes it overwrite without asking if the file already exists.
Command 3
rm tmp.avi removes this file
* && is the same as AND, executing multiple commands at once