[FFmpeg-devel] decklink rgb10 and 600.0fps ?!
Douglas Marsh
ffmpeg at dx9s.net
Wed Oct 4 03:49:16 EEST 2017
Has anybody tested and reported back success (no issues) with the recent
decklink and rgb support added? In particular rgb10 mode.
I've have good luck in capturing from my 'DeckLink Studio 4K' only when
RGB (can't seem to capture YUV, perhaps the HDMI data is only RGB --
still need to do testing with known YUV over HDMI as well)
-raw_format argb (and bgra) work and fairly well I will add!
-raw_format rgb10 does wierd things
(Sorry in advance for the long post, took most of the information out
because I was told to not be soooo long)
dx at x299:~/storage/temp$ ffmpeg10 -format_code Hp59 -f decklink
-video_input hdmi -audio_input embedded -raw_format rgb10 -i 'DeckLink
Studio 4K' -acodec copy -vcodec copy -to 4 raw.avi
[...]
dx at x299:~/storage/temp$ mediainfo raw.avi
General
Complete name : raw.avi
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
File size : 1.85 GiB
Duration : 4 s 4 ms
Overall bit rate : 3 979 Mb/s
Writing application : Lavf57.82.102
Video
ID : 0
Format : YUV
Codec ID : R210
Codec ID/Info : BlackMagic YUV (Quick Time)
Duration : 4 s 3 ms
Bit rate : 3 978 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 600.000 FPS
Color space : YUV
Compression mode : Lossless
Bits/(Pixel*Frame) : 3.198
Stream size : 1.85 GiB (100%)
Audio
ID : 1
Format : PCM
Format settings : Little / Signed
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 4 s 4 ms
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 751 KiB (0%)
Alignment : Aligned on interleaves
Interleave, duration : 17 ms (10.01 video frames)
dx at x299:~/storage/temp$ ffmpeg10 -i raw.avi -c:a copy -c:v libx264 -crf
0 -preset ultrafast fromrawavi.mov
ffmpeg version N-87614-g3d4f8b9-dx9s-decklink Copyright (c) 2000-2017
the FFmpeg developers
[...]
dx at x299:~/storage/temp$ mediainfo fromrawavi.mov
General
Complete name : fromrawavi.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 0000.02 (qt )
File size : 4.08 MiB
Duration : 4 s 4 ms
Overall bit rate : 8 548 kb/s
Writing application : Lavf57.82.102
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:4:4 Predictive at L5.2
Format settings : 1 Ref Frames
Format settings, CABAC : No
Format settings, RefFrames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 4 s 2 ms
Bit rate : 6 987 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 600.000 FPS
Chroma subsampling : 4:4:4
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.006
Stream size : 3.33 MiB (82%)
Writing library : x264 core 148 r2643 5c65704
Encoding settings : cabac=0 / ref=1 /
deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 /
psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 /
8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=6 /
threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1
/ interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 /
weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 /
rc=crf / mbtree=0 / crf=0.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4
/ ip_ratio=1.40 / aq=0
Language : English
Audio
ID : 2
Format : PCM
Format settings : Little / Signed
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : sowt
Duration : 4 s 4 ms
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 751 KiB (18%)
Language : English
Default : Yes
Alternate group : 1
********WHEREAS compressing directly to libx264 has THIS weirdness
(buffer overflows, but outputs 59.94)***********
dx at x299:~/storage/temp$ ffmpeg10 -format_code Hp59 -f decklink
-video_input hdmi -audio_input embedded -raw_format rgb10 -i 'DeckLink
Studio 4K' -acodec copy -vcodec libx264 -crf 0 -preset ultrafast -to 2
x264-10.mov
ffmpeg version N-87614-g3d4f8b9-dx9s-decklink Copyright (c) 2000-2017
the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr/local/ffmpeg
--extra-version=dx9s-decklink --build-suffix=-dx9s-decklink
--toolchain=hardened --cc=cc --cxx=g++ --enable-gpl --enable-shared
--disable-stripping --disable-decoder=libopenjpeg --enable-avresample
--enable-avisynth --enable-gnutls --enable-ladspa --enable-libass
--enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio
--enable-libflite --enable-libfontconfig --enable-libfreetype
--enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug
--enable-libmp3lame --enable-libopenjpeg --enable-libopus
--enable-libpulse --enable-librtmp --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid
--enable-libzvbi --enable-openal --enable-opengl --enable-libdc1394
--enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264
--enable-libopencv --enable-decklink --enable-nonfree
libavutil 55. 77.101 / 55. 77.101
libavcodec 57.106.104 / 57.106.104
libavformat 57. 82.102 / 57. 82.102
libavdevice 57. 9.101 / 57. 9.101
libavfilter 6.106.100 / 6.106.100
libavresample 3. 6. 0 / 3. 6. 0
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
[decklink @ 0x55b52e060300] Found Decklink mode 1920 x 1080 with rate
59.94
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, decklink, from 'DeckLink Studio 4K':
Duration: N/A, start: 0.000000, bitrate: 3730287 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream #0:1: Video: r210 (R210 / 0x30313252), rgb48le(10 bpc,
progressive), 1920x1080, 3728751 kb/s, 59.94 tbr, 1000k tbn, 1000k tbc
Stream mapping:
Stream #0:1 -> #0:0 (r210 (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x55b52e06f460] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x55b52e06f460] profile High 4:4:4 Predictive, level 4.2,
4:4:4 10-bit
[libx264 @ 0x55b52e06f460] 264 - core 148 r2643 5c65704 - H.264/MPEG-4
AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html -
options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=24
lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=0.0
qcomp=0.60 qpmin=0 qpmax=81 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mov, to 'x264-10.mov':
Metadata:
encoder : Lavf57.82.102
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p10le,
1920x1080, q=-1--1, 59.94 fps, 60k tbn, 59.94 tbc
Metadata:
encoder : Lavc57.106.104 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo,
s16, 1536 kb/s
[decklink @ 0x55b52e060300] Decklink input buffer overrun!
bitrate=3697.3kbits/s speed=0.465x
Last message repeated 40 times
[decklink @ 0x55b52e060300] Decklink input buffer overrun!
bitrate=4297.7kbits/s speed=0.467x
Last message repeated 12 times
frame= 120 fps= 28 q=-1.0 Lsize= 1578kB time=00:00:01.98
bitrate=6510.8kbits/s speed=0.461x
video:1199kB audio:375kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.226224%
[libx264 @ 0x55b52e06f460] frame I:1 Avg QP: 9.00 size: 53427
[libx264 @ 0x55b52e06f460] frame P:119 Avg QP: 5.83 size: 9863
[libx264 @ 0x55b52e06f460] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x55b52e06f460] mb P I16..4: 0.2% 0.0% 0.0% P16..4:
2.8% 0.0% 0.0% 0.0% 0.0% skip:97.0%
[libx264 @ 0x55b52e06f460] coded y,u,v intra: 6.6% 4.0% 2.4% inter: 1.5%
1.0% 0.5%
[libx264 @ 0x55b52e06f460] i16 v,h,dc,p: 94% 3% 2% 1%
[libx264 @ 0x55b52e06f460] kb/s:4903.65
dx at x299:~/storage/temp$ mediainfo x264-10.mov
General
Complete name : x264-10.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 0000.02 (qt )
File size : 1.54 MiB
Duration : 2 s 2 ms
Overall bit rate : 6 457 kb/s
Writing application : Lavf57.82.102
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:4:4 Predictive at L4.2
Format settings : 1 Ref Frames
Format settings, CABAC : No
Format settings, RefFrames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 2 s 2 ms
Bit rate : 4 906 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 59.940 (60000/1001) FPS
Chroma subsampling : 4:4:4
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.039
Stream size : 1.17 MiB (76%)
Writing library : x264 core 148 r2643 5c65704
Encoding settings : cabac=0 / ref=1 /
deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 /
psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 /
8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=6 /
threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1
/ interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 /
weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 /
rc=crf / mbtree=0 / crf=0.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4
/ ip_ratio=1.40 / aq=0
Language : English
Audio
ID : 2
Format : PCM
Format settings : Little / Signed
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : sowt
Duration : 2 s 2 ms
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 375 KiB (24%)
Language : English
Default : Yes
Alternate group : 1
(ffmpeg10 is ffmpeg pointing at libx264-10-bit version)
FWIW, it seem the output file (x264-10.mov in the example above) is
okay, but haven't tested enough to make sure it isn't dropping actually
dropping frames (I know it's confused between 600.0fps and 60000/1001
[59.94]).
--Doug (dx9s)
More information about the ffmpeg-devel
mailing list