LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Recording sound as well as video with FFmpeg and x11grab (https://www.linuxquestions.org/questions/slackware-14/recording-sound-as-well-as-video-with-ffmpeg-and-x11grab-731225/)

andrew.46 06-07-2009 05:34 AM

Recording sound as well as video with FFmpeg and x11grab
 
Hi,

Under slackware 12.2 and the svn FFmpeg I have managed to capture the x11 display with FFmpeg and x11grab as follows:

Code:

ffmpeg -vframes 100 -r 30 -g 300 -s 1024x768 -f x11grab -i :0.0 \
      -vcodec libx264 -vpre hq -crf 22 -threads 0 test.mp4

and this works well enough but I would like to add in the system sound as well. Documentation for this is pretty poor but suggests something like the following:

Code:

ffmpeg -f oss -i /dev/audio -vframes 100 -r 30 -g 300 -s 1024x768 \
      -f x11grab -i :0.0 -vcodec libx264 -vpre hq -crf 22 -threads 0 \
      test.mp4

But on my system this fails without error. Has anybody managed to catch sound as well as the x11 display in this manner?

Andrew

unSpawn 06-07-2009 10:23 AM

Quote:

Originally Posted by andrew.46 (Post 3565797)
on my system this fails without error.

If you add "-v -v -v" it might tell you a bit more.

H_TeXMeX_H 06-07-2009 12:56 PM

I'm not sure /dev/audio is the right one, don't you mean /dev/dsp ?

See here for more info:
http://ffmpeg.org/ffmpeg-doc.html#SEC3

Su-Shee 06-07-2009 02:00 PM

Do you really want to use ffmpeg directly?

If not, recordmydesktop is the convenient tool of choice for recording X (for screencasts etc.).


All times are GMT -5. The time now is 06:28 PM.