return to I Love My Journal
A Little Closer to Center...
Musings about Life, Linux, and Latter-day Saints.
Pages
About Me
Links


Tags
PERSONAL 300
LDS 225
SPIRITUAL 223
BOOK OF MORMON 151
SCRIPTURES 69
LINUX 66
COMPUTERS 62
RELIGION 60
LIFE 54
GENERAL CONFERENCE 35
MISCELLANEOUS 34
GENTOO 31
PROGRAMMING 30
CARS 27
MUSIC 25
MICROSOFT 23
FAMILY 21
I LOVE MY JOURNAL 18
AUDIO 17
FUN 15
CHILDREN 12
NATURE'S WAY 10
CURRENT EVENTS 10
DRM 9
VIDEO 8
CONEXM 7
FRIENDS 6
COMPUTER HARDWARE 5
BABBLINGS 4
GAMES 4
DRUMS 4
GENERAL INSANITY 3
KDENLIVE 3
CATS 2
ADVERSITY 2
YOUTH CONFERENCE 1
POETRY 1
EVERYDAY THOUGHTS 1
PARENTING 1
MY JOURNAL 1
CHURCH NOTES 1
POLITICS 1


RSS Feed

RSS FeedSubscribe!
Tue - May 20, 2008 : 06:50 pm
excited
   rated 4 times
>>next>>
<<previous<<
FFmpeg Webcam Video in Linux
Okay...  I've been wondering how to do this for quite some time, and I finally figured it out with the help of this mailing list thread.

I've always thought ffmpeg was a pretty amazing program, but now, I will build a shrine to it and worship it weekly.

Ffmpeg is the program which allows me to create a video with sound in Linux.

I have a Logitch Orbit AF webcam, and with the following command, it records both video and audio.

ffmpeg -f video4linux2 -s 320x240 -i /dev/video0 -f audio_device -ac 2 -i /dev/dsp1 -f mp4 Filename.mp4

and the file "Filename.mp4" will be created and stored in the current working directory.

Great stuff!

After trying to get this video to work with flowplayer (flowplayer.org), it would reproduce the audio, but not the video, so in order to get it to work (albeit pretty low quality), I had to convert the m4v file to an flv file with the following command:

ffmpeg -i input_file_name.mp4 -vcodec flv -ar 22050 output_file_name.flv

That seemed to do the trick.  Here's the first video recorded using this method.

PS - Even though my camera is v4l2, I had to enable the v4l USE flag. Make sure you have the v4l USE flag turned on when you emerge it, or it won't work.

Go gentoo!
Comment by PoeticIntensity on Jun. 03, 2008 @ 12:41 am
I figured out the optimal settings for ffmpeg as far as encoding videos for this journal goes.  Here is the setting:

ffmpeg -i input_filename.avi -f flv -b 700k -r 29.97 -ar 22050 -s 450x338 output_filename.flv

Hope that helps someone.
Comment by Juan on Sep. 17, 2008 @ 03:42 pm
Thanks for the ffmpeg command lines!

They worked perfectly with my cheap usb webcam
Let us know what you think:
Name:
Email:
Website:
Comment:


Human Test: What number comes next? 6,5,4,3,
Answer: