[FFmpeg-user] Best way to record video on a computer with a really bad CPU yet really good GPU?

Sven C. Dack sven.c.dack at sky.com
Sat Sep 10 22:33:16 EEST 2016


On 10/09/16 20:04, Andy Furniss wrote:
> Sven C. Dack wrote:
>
>> For those who haven't followed the developers mailing list; this has
>>  improved with the latest git. One can stream in H.264 and H.265 from
>> a 1920x1080 desktop with a frame rate well above 60Hz (~100fp/s with
>> an Nvidia GeForce GTX 960). Anyone who has never tried it and wants
>> to can test it on Twitch.TV: 1.) Create an account, 2.) go to the
>> dashboard, 3.) reveal the streaming key and 4.) run ffmpeg:
>>
>> $ export KEY="live_0123456789_aBcDeFgH...." # keep it secret - don't
>>  stream the command line arguments or it will show up on the video $
>> ffmpeg -f x11grab -s hd1080 -framerate 200 -i :0.0 -c:v h264_nvenc
>> -rc cbr -b:v 500k -f flv -y "rtmp://live.justin.tv/app/$KEY"
>
> So does twitch accept h264rgb or does nvenc convert it to 420? 

The rgb output of x11grab gets passed on to the hardware encoder as is, meaning, 
as 32-bit packed rgb data, any alpha channel information that might be present 
gets effectively ignored and may well be zero. Would have been cool if one could 
have used the alpha as a chroma key for a "green box" effect, but no. The 
hardware encoder can handle a variety of formats like rgb, bgr, yuv packed and 
planar, as input. I don't know if can produce rgb in its output. All I've ever 
seen it produce is yuv420.



More information about the ffmpeg-user mailing list