Pass Xvfb directly to ffmpeg

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Pass Xvfb directly to ffmpeg

mario90yxz
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/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Pass Xvfb directly to ffmpeg

Carl Eugen Hoyos-2
2018-01-08 15:58 GMT+01:00 mario90yxz <[hidden email]>:

> 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 command line looks strange to me but in any case:
Complete, uncut console output missing, please remove
-hide_banner.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".