[FFmpeg-user] Causes of color bars?
Simon Roberts
simon at dancingcloudservices.com
Wed Jul 15 02:03:34 EEST 2020
> > > Decklink boards are _very_ touchy about formats and parameters. Try setting
> > > at least the resolution and frame rate on the input and see if that helps.
> > >
> > > I don't guarantee these, but it's a start:
> > > -f decklink -pix_fmt uyvy422 -s 720x486 -r 30000/1001 "DeckLink SDI 4K"
>
> I'm certain there's an "-i" missing before "DeckLink SDI 4K".
Yes, I did put that back in my attempts (though I also tried without)
> > - it says there's no such option as -r, but if I change it to
> > -framerate, that part is happy in ffplay, but still doesn't work in ffmpeg
> > - ffplay it says -s and -pix_fmt are deprecated and should be
> > -video_size and -pixel_format respectively. However, those options are not offered at all in ffmpeg
>
> This indicates that your version of ffmpeg is not in line with your
> version of ffplay. Are you sure you are calling the correct executable,
> and not an older binary in your PATH?
>
[...]
> If you show us the exact command line and its *complete* console
> output, we can help you with this (even those of us who don't know
> Decklink and its quirks).
The versions of ffmpeg and ffplay were built together:
-----------------------------------------------------------------
$ which ffmpeg
/home/simon/bin/ffmpeg
$ which ffplay
/home/simon/bin/ffplay
-----------------------------------------------------------------
This is an attempt to record using my interpretation of the suggested arguments
-----------------------------------------------------------------
$ ffmpeg -f decklink -pix_fmt uyvy422 -s 1920x1080 -r 30000/1001 -i
'DeckLink Quad HDMI Recorder (1)' -c:a copy -c:v copy out.avi
ffmpeg version N-98470-g7772666 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/home/simon/ffmpeg_build
--pkg-config-flags=--static
--extra-cflags='-I/home/simon/ffmpeg_build/include
-I/home/simon/ffmpeg_sources/BMD_SDK/include'
--extra-ldflags=-L/home/simon/ffmpeg_build/lib --extra-libs='-lpthread
-lm' --bindir=/home/simon/bin --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
--enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libx265 --enable-nonfree --enable-decklink
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 95.100 / 58. 95.100
libavformat 58. 48.100 / 58. 48.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
[decklink @ 0x558010ccf8c0] Autodetected the input mode
[decklink @ 0x558010ccf8c0] Found Decklink mode 1920 x 1080 with rate 59.94
Option video_size not found.
-----------------------------------------------------------------
if I leave out the -s it fails again (I've truncated this output since
most of it I assume is not interesting):
-----------------------------------------------------------------
$ ffmpeg -f decklink -pix_fmt uyvy422 -r 30000/1001 -i 'DeckLink Quad
HDMI Recorder (1)' -c:a copy -c:v copy out.avi
ffmpeg version
[snip snip]
[decklink @ 0x563f1b5e4800] Autodetected the input mode
[decklink @ 0x563f1b5e4800] Found Decklink mode 1920 x 1080 with rate 59.94
Option pixel_format not found.
-----------------------------------------------------------------
If I leave out the -pix_fmt it records color bars (I've chopped the
thousands of lines in the middle of this that are repeated about
non-monotonic DTS, since they're all the same kind of thing):
-----------------------------------------------------------------
$ ffmpeg -f decklink -r 30000/1001 -i 'DeckLink Quad HDMI Recorder
(1)' -c:a copy -c:v copy out.avi
ffmpeg version N-98470-g7772666 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/home/simon/ffmpeg_build
--pkg-config-flags=--static
--extra-cflags='-I/home/simon/ffmpeg_build/include
-I/home/simon/ffmpeg_sources/BMD_SDK/include'
--extra-ldflags=-L/home/simon/ffmpeg_build/lib --extra-libs='-lpthread
-lm' --bindir=/home/simon/bin --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
--enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libx265 --enable-nonfree --enable-decklink
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 95.100 / 58. 95.100
libavformat 58. 48.100 / 58. 48.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
[decklink @ 0x564e97c13780] Autodetected the input mode
[decklink @ 0x564e97c13780] Found Decklink mode 1920 x 1080 with rate 59.94
[decklink @ 0x564e97c13780] Frame received (#1) - No input signal
detected - Frames dropped 1
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, decklink, from 'DeckLink Quad HDMI Recorder (1)':
Duration: N/A, start: 0.000000, bitrate: 1990203 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream #0:1: Video: rawvideo (UYVY / 0x59565955),
uyvy422(progressive), 1920x1080, 1988667 kb/s, 59.94 tbr, 1000k tbn,
1000k tbc
Output #0, avi, to 'out.avi':
Metadata:
ISFT : Lavf58.48.100
Stream #0:0: Video: rawvideo (UYVY / 0x59565955),
uyvy422(progressive), 1920x1080, q=2-31, 1988667 kb/s, 59.94 tbr,
29.97 tbn, 29.97 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz,
stereo, s16, 1536 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[avi @ 0x564e97c57c80] Non-monotonous DTS in output stream 0:0;
previous: 0, current: 0; changing to 1. This may result in incorrect
timestamps in the output file.
[avi @ 0x564e97c57c80] Non-monotonous DTS in output stream 0:0;
previous: 1, current: 1; changing to 2. This may result in incorrect
timestamps in the output file.
[avi @ 0x564e97c57c80] Non-monotonous DTS in output stream 0:0;
previous: 2, current: 2; changing to 3. This may result in incorrect
timestamps in the output file.
[avi @ 0x564e97c57c80] Non-monotonous DTS in output stream 0:0;
previous: 3, current: 2; changing to 4. This may result in incorrect
timestamps in the output file.
[snip snip]
[avi @ 0x564e97c57c80] Non-monotonous DTS in output stream 0:0;
previous: 435, current: 218; changing to 436. This may result in
incorrect timestamps in the output file.
[avi @ 0x564e97c57c80] Non-monotonous DTS in output stream 0:0;
previous: 436, current: 218; changing to 437. This may result in
incorrect timestamps in the output file.
[avi @ 0x564e97c57c80] Non-monotonous DTS in output stream 0:0;
previous: 437, current: 219; changing to 438. This may result in
incorrect timestamps in the output file.
frame= 439 fps= 57 q=-1.0 Lsize= 1779633kB time=00:00:14.64
bitrate=995275.0kbits/s speed=1.92x
video:1777950kB audio:1370kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.017601%
Exiting normally, received signal 2.
-----------------------------------------------------------------
Here's ffplay with all the suggested options
-----------------------------------------------------------------
$ ffplay -f decklink -pix_fmt uyvy422 -s 1920x1080 -r 30000/1001 -i
'DeckLink Quad HDMI Recorder (1)'
ffplay version N-98470-g7772666 Copyright (c) 2003-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/home/simon/ffmpeg_build
--pkg-config-flags=--static
--extra-cflags='-I/home/simon/ffmpeg_build/include
-I/home/simon/ffmpeg_sources/BMD_SDK/include'
--extra-ldflags=-L/home/simon/ffmpeg_build/lib --extra-libs='-lpthread
-lm' --bindir=/home/simon/bin --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
--enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libx265 --enable-nonfree --enable-decklink
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 95.100 / 58. 95.100
libavformat 58. 48.100 / 58. 48.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Option -pix_fmt is deprecated, use -pixel_format.
Option -s is deprecated, use -video_size.
Failed to set value '30000/1001' for option 'r': Option not found
-----------------------------------------------------------------
This time without the -r and -s it objected to and with middle bits snipped out:
-----------------------------------------------------------------
$ ffplay -f decklink -pixel_format uyvy422 -i 'DeckLink Quad HDMI Recorder (1)'
ffplay version N-98470-g7772666 Copyright (c) 2003-2020 the FFmpeg developers
[snip snip]
[decklink @ 0x7fb784000bc0] Autodetected the input mode 0B f=0/0
[decklink @ 0x7fb784000bc0] Found Decklink mode 1920 x 1080 with rate 59.94
Option pixel_format not found.
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
$
-----------------------------------------------------------------
Thanks for all your effort, it's really very much appreciated!
More information about the ffmpeg-user
mailing list