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

Grad Vector gvect31415926 at yahoo.com
Mon Jan 6 01:53:55 CET 2014

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

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."

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

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

Does anyone have any suggestions on how to address any of the above three issues?

Thanks again.

On Friday, January 3, 2014 8:56 AM, Frank Tetzel <s1445051 at mail.zih.tu-dresden.de> wrote:
> I'm running Linux Fedora 18 and I'm trying to capture both audio and
> video as I'm playing an mp4 file on the Linux Totem player. I could
> capture the video but I get no audio.  The ffmpeg command that I'm
> using is:
> ffmpeg  -f alsa  -ac 2  -i pulse  -f x11grab
> -r 30  -b:v 6000k  -acodec pcm_s16le
> -vcodec huffyuv  -preset ultrafast
> -threads 2  -ss 2  -t 15  outfile.avi
> Does anyone have any suggestions on how I could also capture the
> audio? Thanks very much for your help.


i guess you're using pulseaudio as sound server. Then it's best to also
use pulseaudio as input device instead of alsa.

When i recorded both, a microphone and internal sound, i used the
following command:

for mic:
-f pulse -i default

for internal sound:
-f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor

to get a list of devices:
$ pactl list sources

ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org

More information about the ffmpeg-user mailing list