[FFmpeg-user] 4K RGB->YUV realtime conversion.

Anders Degerberg anders at europasound.se
Tue Mar 9 00:32:22 EET 2021


On Mon, Mar 8, 2021 at 10:44 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> Just to make sure that our assumption that this would need
> changes in libswscale is correct, please also test the following:
> -pix_fmt yuv444p16 -vcodec rawvideo -an -f null -
> -i "Decklink ..." -an -f null -
> and compare the speed (or fps) indicator.

Hi Carl Eugen,
 thanks for looking into this, and my apologies for the top-posting mistake.

- With pix_fmt yuv444p16 and rawvideo, auto_scaler engages, and I get
15fps/0.6x. One cpu thread at 100%, a few other threads around 10-20%.
- Without changing pix_fmt, passing on the rgb data straight to null
pipe, I get full framerate, 25fps/1x. One or two cpu-threads around
20-40%.

See output for the two tests below, a bit shortened for convenience.
Kind regards
Anders



$ ffmpeg -loglevel verbose -f decklink -raw_format rgb10 -i "DeckLink
8K Pro (1)" -pix_fmt yuv444p16 -vcodec rawvideo -an -f null -

[decklink @ 0x455e900] Found Decklink mode 4096 x 2160 with rate 25.00
Input #0, decklink, from 'DeckLink 8K Pro (1)':
  Duration: N/A, start: 0.000000, bitrate: 6637056 kb/s
  Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
  Stream #0:1: Video: r210, 1 reference frame, gbrp10le(progressive),
4096x2160, 6635520 kb/s, 25 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:1 -> #0:0 (r210 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:1 @ 0x45ab280] w:4096 h:2160
pixfmt:gbrp10le tb:1/1000000 fr:25000/1000 sar:0/1
[auto_scaler_0 @ 0x45ae1c0] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x45ac3c0] auto-inserting filter 'auto_scaler_0' between the
filter 'Parsed_null_0' and the filter 'format'
[auto_scaler_0 @ 0x45ae1c0] w:4096 h:2160 fmt:gbrp10le sar:0/1 ->
w:4096 h:2160 fmt:yuv444p16le sar:0/1 flags:0x4
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf58.71.100
  Stream #0:0: Video: rawvideo, 1 reference frame (Y3[0][16] /
0x10003359), yuv444p16le(tv, progressive), 4096x2160 (0x0), q=2-31,
10616832 kb/s, 25 fps, 25 tbn
    Metadata:
      encoder         : Lavc58.129.100 rawvideo
[decklink @ 0x455e900] Decklink input buffer overrun!bitrate=N/A speed=0.604x
-------------------------------------------

$ ffmpeg -loglevel verbose -f decklink -raw_format rgb10 -i "DeckLink
8K Pro (1)" -an -f null -

[decklink @ 0x451c8c0] Found Decklink mode 4096 x 2160 with rate 25.00
Input #0, decklink, from 'DeckLink 8K Pro (1)':
  Duration: N/A, start: 0.000000, bitrate: 6637056 kb/s
  Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
  Stream #0:1: Video: r210, 1 reference frame, gbrp10le(progressive),
4096x2160, 6635520 kb/s, 25 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:1 -> #0:0 (r210 (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:1 @ 0x456a600] w:4096 h:2160
pixfmt:gbrp10le tb:1/1000000 fr:25000/1000 sar:0/1
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf58.71.100
  Stream #0:0: Video: wrapped_avframe, 1 reference frame,
gbrp10le(progressive), 4096x2160 (0x0), q=2-31, 200 kb/s, 25 fps, 25
tbn
    Metadata:
      encoder         : Lavc58.129.100 wrapped_avframe
frame=  492 fps= 25 q=-0.0 Lsize=N/A time=00:00:19.68 bitrate=N/A speed=   1x


More information about the ffmpeg-user mailing list