You are not logged in.
Again, apologies for opening multiple questions, but I feel these things are best addressed in separate threads:
I am using this command:
ffmpeg -f alsa -i hw:0 -f x11grab -s wxga -r 25 -i :0.0 -qscale 31 /tmp/out.mpgI am trying to do a screencast and have noticed that even though I set the lowest quality, I still get a 1-2 second delay in audio into my feed. Does anyone know what I have to do to get rid of this delay?
Thanks!
Offline
bump
Offline
Do you have a constantly 1 - 2 second delay or will it increase, the longer you record? First: Dunno. Second: Probably a better pc will fix it. Or a better sound card. Or whatever. Looking for an answer to that, too.
Offline
@awayand: did you tried with other parameters (see ffmpeg manual audio section)? I use ffmpeg with great results:
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1280x960 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mpg
Or, simplest:
ffmpeg -f x11grab -s 1280x960 -r 30 -b 6500 -bt 712k -sameq output.mpg
Even audio- video capture on tty is ok (and i have an old PC...):
ffmpeg -f alsa -i pulse -f fbdev -r 30 -i /dev/fb0 output.mpg
Last edited by stressat (2011-11-08 13:31:37)
Offline
hi stressat, thanks for all that! I tried your examples, with the following results:
ffmpeg -f alsa -ac 2 -i hw:0 -f x11grab -r 30 -s wxga -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mpgplaying back the above with "mplayer output.mpg" yields error:
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback..followed by squeaky noises out of the speaker. No idea why mplayer chooses OSS, after all I selected alsa? Also, as you can see, no video, even though I do have x264 installed. ![]()
Your second example:
ffmpeg -f x11grab -i :0.0 -s wxga -r 30 -b 6500 -bt 712k -sameq output.mpgPlayback shows only part of my screen, but bigger as if it had been switched to 640x480 before recording. Odd.
Didn't try fbdev as I want to record an X session. No idea why the video in the first example won't record, maybe I have to play with a different codec? I am using a fairly recent laptop, so I shouldn't have an issue (Aspire AS3810tg)
Thanks for your help so far! It is very much appreciated, even if I may not ever find the right settings...
I also took a peek inside /usr/lib/x264.h but that didn't enlighten me at all about what other options I could try passing to the library...
Offline