[FFmpeg-devel] adding RGBA and BGRA to nvenc.c

Andy Furniss adf.lists at gmail.com
Sat Sep 10 20:35:19 EEST 2016


Andy Furniss wrote:

> With gstreamer 1080p I can get around 350 fps testing like -
>
> gst-launch-1.0 -f ximagesrc use-damage=0 startx=0 starty=0 endx=1919
>  endy=1079 num-buffers=5000 ! queue ! videoconvert !
> video/x-raw,framerate=500/1,format=BGRx ! fakesink Setting pipeline
> to PAUSED ... Pipeline is live and does not need PREROLL ... Setting
> pipeline to PLAYING ... New clock: GstSystemClock Got EOS from
> element "pipeline0". Execution ended after 0:00:14.205120141 Setting
> pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline
> to NULL ... Freeing pipeline ...
>
> 5000/14.205120141 = 351.98....
>
> Of course I don't know if that's "real" as such.

Looking into this more with sysprof it seems with this test gstreamer is
twice as fast because it doesn't copy from shm but ffmpeg does.

Of course I may be misunderstanding, but >90% load according to sysprof
is __memcpy_sse2_unaligned.

ffmpeg is not using xcb for this test and like this both ffmpeg and
gstreamer are using XShmGetImage.

With gstreamer all calls to __memcpy_sse2_unaligned are from X
with ffmpeg half are from X and half ffmpeg.

OK I think, maybe the test was flawed, so I changed fakesink to filesink
location=/mnt/ramdisk/out.bgr0 where ramdisk is tmpfs. Sure enough it's
slower = 188fps which is more like ffmpeg (179 fps with -f null -).

Unfortunately if I force ffmpeg to really output to tmpfs using
-f rawvideo -y /mnt/ramdisk/out.bgr0 I only get 68fps so I am still slower.

FWIW -f rawvideo -y /dev/null gives 90fps.



More information about the ffmpeg-devel mailing list