[FFmpeg-user] Pass Xvfb directly to ffmpeg

mario90yxz mario.90yxz at gmail.com
Mon Jan 8 16:58:48 EET 2018


I'm trying to pass Xvfb buffor directly to ffmpeg inside Docker. This is
approach give me really big performance benefits. 

This is how I'm doing it:

Xvfb write the screen output:
`sudo Xvfb $DISPLAY -ac -screen 0 1680x900x24 -fbdir /tmp/screen/test.xwd >
/dev/null 2>&1 &`

ffmpeg read command: 

ffmpeg -hide_banner -loglevel debug -loop 1 ' \
    '-re -i /tmp/screen/test.xwd ' \
    '-f alsa -i default -strict -2 -ac 2 -preset ultrafast -f ' \
    '-c:av copy ' \
    'output_file.mkv'


The problem is: ffmpeg missed many frames and the video should be 3 minutes
long, but is half of expected time (video accelerates at some point). 
On following video you can see the problem:
https://drive.google.com/file/d/1HWjEqrtPfZCRSndxpUpY1iXsrfMNWdp7/view

I guess there is a problem with ffmpeg command and it requires some tweaks,
but no idea how to configure it properly. 

Thanks!



--
Sent from: http://www.ffmpeg-archive.org/


More information about the ffmpeg-user mailing list