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

Andy Furniss adf.lists at gmail.com
Fri Sep 9 02:01:56 EEST 2016


Sven C. Dack wrote:
> On 08/09/16 15:17, Andy Furniss wrote:
>> Carl Eugen Hoyos wrote:
>>> 2016-09-08 12:01 GMT+02:00 Andy Furniss <adf.lists at gmail.com>:
>>>
>>>> I don't know what it is about x11grab/CSC with ffmpeg, but
>>>> on my old CPU gstreamer is twice as fast.
>>>
>>> x11grab or xcb?
>>
>> I guess xcb as I don't --enable anything related with configure.
>
> In case it got mistaken...
>
> The following is what gives the 100 fp/s (with a GTX 960):
> $ ffmpeg -f x11grab -framerate 200 -s hd1080 -i :0.0 -c:v hevc_nvenc -y
> test.mkv
>
> The mentioned 100 fp/s refers to the HEVS/H.265 hardware encoder
> (nvenc). X11grab is here only the input device.
>
> Without the encoder does it give me 160 fp/s:
> $ ffmpeg -f x11grab -s hd1080 -framerate 500 -i :0.0 -f null -
>
> Different sizes then give different results:
>
> - For hd720 is it 200 fp/s (with nvenc) and 420 fp/s (without nvenc).
> - For hd480 is it 460 fp/s (with nvenc) and 890 fp/s (without nvenc).
>
> Can you compare gstreamer to those numbers?

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.

I do know that I have really grabbed and encoded 1080p60 with my AMD h/w
and including nv12 conversion gives a sane looking result -

gst-launch-1.0 -f ximagesrc use-damage=0 startx=0 starty=0 endx=1919 
endy=1079 num-buffers=1000 ! queue ! videoconvert ! 
video/x-raw,framerate=100/1,format=NV12  ! 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.419928745
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

1000/14.419928745 = 69.3....

I also tried (fake) 2160p and got around 90fps BGRx and 17 nv12.

My PC is old = Phenom II x4 965 3.4GHz Cpus, 1333 ram.




More information about the ffmpeg-devel mailing list