[FFmpeg-user] Capturing Video/Audio for Screen Casting

Lou lou at lrcd.com
Mon Jan 6 02:26:18 CET 2014

On Sun, Jan 5, 2014, at 03:53 PM, Grad Vector wrote:
> Thanks very much, that worked just fine.
> So the complete command that I'm now using is:
> ffmpeg -f pulse -ac 2 
> -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
> -f x11grab -r 30 -b:v 6000k -aspec 16:9
> -s 1280x800 -i :0.0 -acodec pcm_s16le
> -vcodec huffyuv -preset ultrafast -threads 2
> -ss 15 -t 35
> outPut.avi

The complete ffmpeg console output is missing.

* Try "-framerate 30" instead of "-r 30"
* "-aspec" is a typo
* "-preset ultrafast" is for libx264, not huffyuv
* Option placement matters. You're trying to apply -aspect and -b:v to
the input.
* You can probably stream copy the audio: -acodec copy
* You don't need to give a bitrate when using huffyuv, so remove -b:v
* huffyuv does not have any threading capabilities according to "ffmpeg
-h encoder=huffyuv" and "ffmpeg -encoders".

If sync issues are still occurring then you can try capturing audio and
video with separate ffmpeg processes and then mux them together after
recording is complete.

> The above command captures both audio and video but there appears to be
> three issues:
> 1.) A warning is displayed indicating that "duration is being estimated
> based on bitrate."

You can ignore this. How should ffmpeg know the duration of an input
with an indefinite duration?

> 2.) Another warning is displayed indicating that ffmpeg had to guess the
> channel layout for input stream #0.0 as stereo.

You can ignore this too if the output sounds correct (other than the
sync issue) and if you know your input is stereo.

> and 3.) the audio is not synchronized with the video in the resultant
> "outPut.avi" file.

With what player(s)?

Please do not top-post on this mailing list.

More information about the ffmpeg-user mailing list