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 322
LDS 258
SPIRITUAL 251
BOOK OF MORMON 181
SCRIPTURES 99
RELIGION 78
LINUX 68
COMPUTERS 63
LIFE 60
GENERAL CONFERENCE 39
MISCELLANEOUS 34
GENTOO 33
MUSIC 31
PROGRAMMING 30
CARS 29
MICROSOFT 23
FAMILY 22
AUDIO 18
I LOVE MY JOURNAL 18
FUN 15
CHILDREN 12
CURRENT EVENTS 10
NATURE'S WAY 10
DRM 9
VIDEO 8
CONEXM 7
FRIENDS 6
COMPUTER HARDWARE 5
BABBLINGS 5
DRUMS 4
GAMES 4
GENERAL INSANITY 3
KDENLIVE 3
ADVERSITY 2
CATS 2
YOUTH CONFERENCE 1
EVERYDAY THOUGHTS 1
CHURCH NOTES 1
MY JOURNAL 1
POLITICS 1
PARENTING 1
POETRY 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's the light-source in the night-sky? (not the sun, but the...?)
Answer: