Streaming with VLC and Decklink SDI card (Blackmagic)

*nix specific usage questions
cristush
New Cone
New Cone
Posts: 3
Joined: 11 Dec 2009 09:08

Streaming with VLC and Decklink SDI card (Blackmagic)

Postby cristush » 11 Dec 2009 10:17

Hi all,

I tried finding any information regarding this type of capture card on Linux systems, but had no success in solving my problem.
I have tried slackware linux 13.0 using the Linux drivers downloaded from the vendor's site (DeckLink 7.3.2), I installed blackmagic.ko module, depmod, loaded it to the kernel, the /dev/blackmagic/card0 and serial0 devices are there and all seems ok.
First of all I tried to playback the SDI input of the card using VLC, but I couldn't make it work (SD, PAL, 720x576). Does anybody know how to do that? (I suppose there should be some command line that works with other Decklink cards too, if you have another type of Decklink card and you could playback the digital input, please be kind and post the commandline for that).
In the end, I want to stream SDI input over the network, but first of all I think that it should playback the input.
I tried using V4L2 but the VLC message was like "Cannot open /dev/blackmagic/card0", and with PVR there is no error, but it says "Buffering 0%" and that's all (the log says "prebuffering" and nothing after that).
If you need more info, please ask and I'll try to post it even if at the moment I am trying Ubuntu hoping to have more luck :(
Thanks.

Chris

cristush
New Cone
New Cone
Posts: 3
Joined: 11 Dec 2009 09:08

Re: Streaming with VLC and Decklink SDI card (Blackmagic)

Postby cristush » 11 Dec 2009 11:06

Hi,

These are the messages when I try to playback using VLC and v4l2:

[0x86d5330] v4l2 demux debug: Trying direct kernel v4l2
[0x86d5330] v4l2 demux debug: opening device '/dev/blackmagic0'
[0x86d5330] v4l2 demux debug: V4L2 device: using driver: (version: 0.0.0) on
[0x86d5330] v4l2 demux debug: the device has the capabilities: ( ) Video Capure, ( ) Audio, ( ) Tuner
[0x86d5330] v4l2 demux debug: supported I/O methods are: ( ) Read/Write, ( ) Streaming, ( ) Asynchronous
[0x86d5330] v4l2 demux debug: '/dev/blackmagic0' is a video device
[0x86d5330] v4l2 demux warning: invalid input. Using the default one
[0x86d5330] v4l2 demux debug: Extended control API supported by v4l2 driver

and immediately after that a lot of repeating:

[0x86d5330] v4l2 demux debug: Available private control: (80000000)
[0x86d5330] v4l2 demux debug: unknown control type (FIXME)
[0x86d5330] v4l2 demux warning: FIXME: v4l2.c ControlListPrint 2738
[0x86d5330] v4l2 demux debug: Available private control: (80000000)
[0x86d5330] v4l2 demux debug: unknown control type (FIXME)
[0x86d5330] v4l2 demux warning: FIXME: v4l2.c ControlListPrint 2738
[0x86d5330] v4l2 demux debug: Available private control: (80000000)
[0x86d5330] v4l2 demux debug: unknown control type (FIXME)
[0x86d5330] v4l2 demux warning: FIXME: v4l2.c ControlListPrint 2738
.............

Am I doing something wrong?
thanks

Chris

forest
New Cone
New Cone
Posts: 1
Joined: 10 Jan 2010 22:26

Re: Streaming with VLC and Decklink SDI card (Blackmagic)

Postby forest » 10 Jan 2010 22:42

Hi Chris.

The Decklink SDI card does not work with V4L2 (v4l2) and thus VLC. In fact, no Blackmagic cards work with V4L2— and are not expected to, ever, until/unless that company gets over their attachment to Binary Blobs.

Unfortunately, BM does not make clear on its website that its cards do not work at all with any Linux software, instead giving the impression that their cards work with Linux. However if you talk to them, they will tell you they just put that on their website "to be cool" (as one BM rep literally told me) and as a proof of concept, that their limited functionality MediaExpress program can capture to HD under certain flavours of Linux.

While I am hopeful that they will one day see the light and release themselves from their self-imposed Binary Blob prison, and have found them to be personable and friendly, I do not have specific cause for optimism that the will be moving in the direction Open Video is going any time soon.

HTH,

Forest Mars

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Streaming with VLC and Decklink SDI card (Blackmagic)

Postby Rémi Denis-Courmont » 11 Jan 2010 17:25

Yep. Someone would need to write VLC/Linux input and output plugins specifically for those cards, until/unless they're fixed to implement V4L2 input and FB output.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

morphemass
Blank Cone
Blank Cone
Posts: 20
Joined: 12 Nov 2008 21:38

Re: Streaming with VLC and Decklink SDI card (Blackmagic)

Postby morphemass » 01 Mar 2010 19:02

Hi Chris.

The Decklink SDI card does not work with V4L2 (v4l2) and thus VLC. In fact, no Blackmagic cards work with V4L2— and are not expected to, ever, until/unless that company gets over their attachment to Binary Blobs.

Unfortunately, BM does not make clear on its website that its cards do not work at all with any Linux software, instead giving the impression that their cards work with Linux. However if you talk to them, they will tell you they just put that on their website "to be cool" (as one BM rep literally told me) and as a proof of concept, that their limited functionality MediaExpress program can capture to HD under certain flavours of Linux.

While I am hopeful that they will one day see the light and release themselves from their self-imposed Binary Blob prison, and have found them to be personable and friendly, I do not have specific cause for optimism that the will be moving in the direction Open Video is going any time soon.

HTH,

Forest Mars
Well if they have indeed created the drivers "to be cool" they will soon find that from a marketing perspective this is going to bite them on the ass. One can only presume that there has been enough demand for a Linux driver for them to put effort into the development, and indeed, after hearing that they now have a Linux driver I bought a card in good faith. I will be VERY annoyed if they have, in essence, opted to take the collective P### out of the Linux community. Annoyingly if these just worked I'd be in the market for 14 more cards this year :/

Anyways, I've got my card (doesn't seem to work even with their Media Express software....), there is source code for what appears to be the driver and the card is recognised...I hopeful (delusional) that it is going to become possible to capture with these things in the near future (if it doesn't I'm going to get value for this thing from my ranting if nothing else).

morphemass
Blank Cone
Blank Cone
Posts: 20
Joined: 12 Nov 2008 21:38

Re: Streaming with VLC and Decklink SDI card (Blackmagic)

Postby morphemass » 08 Mar 2010 23:14

Quick update.

I cant get the BM Intensity pro to work under Linux 9.10 at all for me (Windows is fine so it isn't hardware). I've played about with some of the code in the SDK and its failing on deckLinkInput->StartStreams() so I suspect their are a few niggles to be worked out.

Now for what I think is the good news. The drivers are available (with source code) however they come with a propriety license (which I haven't read). The SDK has examples of how to interface with the card/drivers (as said I can't currently get this to work) and there is code in the wild to integrate the BM cards with sumover. I would *suspect* that the sample capture code could be modified to stream to stdout and then piped through VLC or similar (I do much the same currently with dvgrab e.g. "dvgrab -f hdv - | vlc -"). As an aside, the reason it would need modification is that the capture app currently splits the audio and video into 2 seperate files so I assume it would need muxing....

Now if anyone has a BM card and gets it working on 32 bit Ubuntu I'd be interested to hear about it since the current technical support advice is to try it with the 64 bit version....

morphemass
Blank Cone
Blank Cone
Posts: 20
Joined: 12 Nov 2008 21:38

Re: Streaming with VLC and Decklink SDI card (Blackmagic)

Postby morphemass » 09 Mar 2010 21:56

Another update on this. It seems the Blackmagic driver has a conflict with NVIDIA drivers and I had to totally remove the NVIDIA driver to get things working. Tested with 185 (no capture) and 173 (capture but xorg hits 100% CPU utilisation).

Now the Capture app outputs rawvideo and I was able to play mplayer using "mplayer video.raw -demuxer rawvideo -rawvideo format=uyvy:w=1920:h=1080 -audiofile audio.raw -audio-demuxer 20 -rawaudio rate=48000". A couple of questions if anyone can save me some messing about :

1) What would be the VLC equivalent to the above mplayer string?

2) Can anyone suggest a quick and easy way for someone with rusty C/C++ skills like me to quickly hack together some way of muxing the video and audio (e.g. which common standard libs to look at)? I can access the point where the video and audio frames are received (although they are both received via separate callbacks) but I'm clueless on the next steps...

Many thanks

Lee

YoshanBMDSupport
New Cone
New Cone
Posts: 1
Joined: 12 Mar 2010 01:32

Blackmagic-Design Linux support

Postby YoshanBMDSupport » 12 Mar 2010 01:40

Hi everybody,

Blackmagic announced Linux support in April '09 and shipped our first Linux release in
September that year.

DeckLink and Media Express for Linux and the cross-platform SDK are free to download
and use and are available on the web at http://blackmagic-design.com/support/software

The API and Media Express Linux support all current products in our DeckLink, Intensity
and Multibridge ranges. Our cards are already supported in several commercial Linux
applications.

Media Express is a powerful video playback/capture app with deck control, batch capture,
edit to tape and other features. Media Express is built on top of the DeckLink API.

We don't currently support other media frameworks (eg gstreamer) or apps (eg VLC),
but hope that we or the Linux community can provide such support in the future.

If you have any queries, please contact support at http://blackmagic-design.com/support/
or developer support at developer@blackmagic.design.com !

cheers

Yoshan - Blackmagic Developer Support

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Streaming with VLC and Decklink SDI card (Blackmagic)

Postby Jean-Baptiste Kempf » 12 Mar 2010 11:06

Patches are welcome.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

morphemass
Blank Cone
Blank Cone
Posts: 20
Joined: 12 Nov 2008 21:38

Re: Streaming with VLC and Decklink SDI card (Blackmagic)

Postby morphemass » 17 Mar 2010 21:16

Nice to see some participation by BM :)

Sadly I've had to put this project on hold for the moment but I was able to hack something together based on the Capture application in the SDK to throw the rawvideo to stdout and pipe that into VLC to display it. I've still no idea how to proceed on muxing the audio and video together so if anyone has any pointers.... :)

A couple of things though - performance was absolutely dreadful (Q9650!), no idea why (PCIEx4 slot) so it would be interesting to here how anyone else is fairing with VLC and one of these cards; also there seems to be a driver problem when writing to a raid array (things just segfault) which I need to do a bug report to BM but just a heads-up to anyone else who is playing.

landen-10
New Cone
New Cone
Posts: 1
Joined: 19 Aug 2011 20:22

Re: Streaming with VLC and Decklink SDI card (Blackmagic)

Postby landen-10 » 19 Aug 2011 20:27

Recording BlackMagic Decklink Duo on Windows 7.

The following command worked for me on Windows7. It records 20 seconds and then exits. I have the audio disabled.
-I none ; disables the popup remote control windows.
--run-time 20 ; stops recording after 20 seconds
vlc://quit ; forces vlc to quit after recording the video.


vlc -I none dshow:// :dshow-vdev="Decklink Video Capture" :dshow-adev=none :dshow-chroma=UYVY :dshow-cache=1000 --sout=#transcode{venc=x264,vcodec=h264acodec=none}:standard{access=file,mux=mp4,dst=output.mp4} --run-time=20 vlc://quit


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 15 guests