Blackmagic DeckLink Quad 2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Blackmagic DeckLink Quad 2

Robert Frazier
Hi there, I am very very new to this and have a big project to tackle.

I am trying to accomplish streaming videos from 4 or more feeds on a local
display from a DeckLink Quad 2 using FFmpeg. I can play two different
videos (I only have two sources I can use simultaneously at my desk) fine,
but struggle with connecting them into a single video if they are both on
the DeckLink. The code I have for a two videos running as a .bat in a box
of 4 is below..

*ffmpeg -video_size 1280x720 -pixel_format uyvy422 -framerate 60 -vsync
> drop -f dshow -rtbufsize 150M -i video="Decklink Video Capture (5)" -i
> video="Decklink Video Capture" -i video="Decklink Video Capture (5)" -i
> video="Decklink Video Capture" -an -filter_complex "[0:v][1:v]hstack[t];
> [2:v][3:v]hstack[b]; [t][b]vstack" -c:v libx264 -preset ultrafast -f mpegts
> pipe: | ffplay pipe: -vf scale=1280:720 \ pause*


Full console is below:


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * ffmpeg -video_size 1280x720 -pixel_format uyvy422 -framerate 60 -vsync
> drop -f dshow -rtbufsize 150M -i video="Decklink Video Capture (5)" -i
> video="Decklink Video Capture" -i video="Decklink Video Capture (5)" -i
> video="Decklink Video Capture" -an -filter_complex "[0:v][1:v]hstack[t];
> [2:v][3:v]hstack[b]; [t][b]vstack" -c:v libx264 -preset ultrafast -f mpegts
> pipe:   | ffplay pipe: -vf scale=1280:720ffmpeg version N-91024-g293a6e8332
> Copyright (c) 2000-2018 the FFmpeg developers  built with gcc 7.3.0 (GCC)
> configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib
> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> --enable-libbluray --enable-libfreetype --enable-libmp3lame
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
> --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
> --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
> --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
> --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
> --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
> --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
> --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
> --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
> --enable-avisynth  libavutil      56. 18.100 / 56. 18.100  libavcodec
>  58. 19.101 / 58. 19.101  libavformat    58. 13.102 / 58. 13.102
> libavdevice    58.  4.100 / 58.  4.100  libavfilter     7. 21.100 /  7.
> 21.100ffplay version N-91024-g293a6e8332 Copyright (c) 2003-2018 the FFmpeg
> developers  libswscale      5.  2.100 /  5.  2.100  built with gcc 7.3.0
> (GCC)  libswresample   3.  2.100 /  3.  2.100  configuration: --enable-gpl
> --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig
> --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
> --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
> --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
> --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
> --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg
> --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab
> --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
> --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
> --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va
> --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth  libavutil
>     56. 18.100 / 56. 18.100  libpostproc    55.  2.100 / 55.  2.100
> libavcodec     58. 19.101 / 58. 19.101  libavformat    58. 13.102 / 58.
> 13.102  libavdevice    58.  4.100 / 58.  4.100  libavfilter     7. 21.100
> /  7. 21.100  libswscale      5.  2.100 /  5.  2.100  libswresample   3.
> 2.100 /  3.  2.100  libpostproc    55.  2.100 / 55.  2.100Input #0, dshow,
> from 'video=Decklink Video Capture (5)':0B f=0/0  Duration: N/A, start:
> 0.140463, bitrate: N/A    Stream #0:0: Video: rawvideo (HDYC / 0x43594448),
> uyvy422(tv), 1280x720, 60 fps, 60 tbr, 10000k tbn, 10000k tbcvideo=Decklink
> Video Capture: No such file or directorypipe:: Invalid data found when
> processing inputKB sq=    0B f=0/0*


And that stream works running on its own too. So my optimistic concern is
just that I'm using the wrong naming scheme; my only other idea is that I
can't read two streams from the DeckLink card simultaneously (though I feel
like I've read I can). Another concern is introduced here too: one of my
streams does not run with frame rate set to 60fps, I need to set it to
59.94fps to work, otherwise it is a black screen.

Would I need to split these into multiple processed to run each stream
simultaneously, save them to a temporary file or a pipeline, then combine
them in another stream to display? I am concerned about the latency that
program would introduce though.

Thank you in advance!

Robert
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Blackmagic DeckLink Quad 2

Moritz Barsnick
On Wed, Jun 06, 2018 at 15:52:48 -0600, Robert Frazier wrote:

> *ffmpeg -video_size 1280x720 -pixel_format uyvy422 -framerate 60 -vsync
> > drop -f dshow -rtbufsize 150M -i video="Decklink Video Capture (5)" -i
> > video="Decklink Video Capture" -i video="Decklink Video Capture (5)" -i
> > video="Decklink Video Capture" -an -filter_complex "[0:v][1:v]hstack[t];
> > [2:v][3:v]hstack[b]; [t][b]vstack" -c:v libx264 -preset ultrafast -f mpegts
> > pipe: | ffplay pipe: -vf scale=1280:720 \ pause*
[...]
> > video=Decklink Video Capture: No such file or directory

I don't use Decklink, but what you did is to provide the input options
"-pixel_format uyvy422 -framerate 60 -f dshow" only to the first input
"-i". The three others ffmpeg doesn't realize are DShow devices. You
need to provide your input option before *every* input.

> So my optimistic concern is just that I'm using the wrong naming
> scheme;

Wrong syntax, actually.

> my only other idea is that I can't read two streams from the DeckLink
> card simultaneously (though I feel like I've read I can).

I have no idea, but my guess is that it will work.

> streams does not run with frame rate set to 60fps, I need to set it to
> 59.94fps to work, otherwise it is a black screen.

That may be a Decklink limitation, or have to do with the actual input.
BTW. 59.94 is also wrong or at least inprecise, you should probably
write it as "60000/1001", as ffmpeg accepts rationals.

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Blackmagic DeckLink Quad 2

Robert Frazier
Thank you so much for your help, Moritz!

On Thu, Jun 7, 2018 at 7:12 AM Moritz Barsnick <[hidden email]> wrote:

> On Wed, Jun 06, 2018 at 15:52:48 -0600, Robert Frazier wrote:
>
> > *ffmpeg -video_size 1280x720 -pixel_format uyvy422 -framerate 60 -vsync
> > > drop -f dshow -rtbufsize 150M -i video="Decklink Video Capture (5)" -i
> > > video="Decklink Video Capture" -i video="Decklink Video Capture (5)" -i
> > > video="Decklink Video Capture" -an -filter_complex
> "[0:v][1:v]hstack[t];
> > > [2:v][3:v]hstack[b]; [t][b]vstack" -c:v libx264 -preset ultrafast -f
> mpegts
> > > pipe: | ffplay pipe: -vf scale=1280:720 \ pause*
> [...]
> > > video=Decklink Video Capture: No such file or directory
>
> I don't use Decklink, but what you did is to provide the input options
> "-pixel_format uyvy422 -framerate 60 -f dshow" only to the first input
> "-i". The three others ffmpeg doesn't realize are DShow devices. You
> need to provide your input option before *every* input.
>

This definitely was my problem. I've had syntax errors this whole time, how
embarrassing! My program works now at least, albeit kind of slowly, with a
lot of overused buffer errors, and some occasional hiccups loading all my
videos. Any tips on cleaning up latency and buffers perchance?


>
> > So my optimistic concern is just that I'm using the wrong naming
> > scheme;
>
> Wrong syntax, actually.
>
> > my only other idea is that I can't read two streams from the DeckLink
> > card simultaneously (though I feel like I've read I can).
>
> I have no idea, but my guess is that it will work.
>
> > streams does not run with frame rate set to 60fps, I need to set it to
> > 59.94fps to work, otherwise it is a black screen.
>
> That may be a Decklink limitation, or have to do with the actual input.
> BTW. 59.94 is also wrong or at least inprecise, you should probably
> write it as "60000/1001", as ffmpeg accepts rationals.
>

This part as it turns out, is probably just a fluke on my part. Yesterday
that input would only take 59.94, but today I started with a different test
video loaded, and it is happy to use 60. So I'll just have to be careful to
check those before hand, but I will keep in mind the fractional form.


>
> Cheers,
> Moritz
>

Many thanks!
Robert


> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Blackmagic DeckLink Quad 2

Carl Zwanzig
In reply to this post by Robert Frazier
On 6/6/2018 2:52 PM, Robert Frazier wrote:
> And that stream works running on its own too. So my optimistic concern is
> just that I'm using the wrong naming scheme; my only other idea is that I
> can't read two streams from the DeckLink card simultaneously (though I feel
> like I've read I can).

AFAIK all Decklink Quads can run all four inputs (and outputs) independently
at the same time. It's easy enough to ask BMD (via their forum or email).
Their driver version also makes a difference, I think they're at 10.9.11 or
later now.

Two sources- if the distances are short, you can often split an SDI signal
with a 'tee' to feed multiple inputs. I've also used the desktop app to feed
a signal to one output and looped that into another input.

Have you tested each input with the decklink desktop apps? Or by capturing
each one into a file?

> Another concern is introduced here too: one of my
> streams does not run with frame rate set to 60fps, I need to set it to
> 59.94fps to work, otherwise it is a black screen.

BMD boards are notoriously sensitive to settings (and are they really 60fps
and not 59.94?).

Later,

z!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".