Looking for information/success stories using blackmagic/decklink cards with VLC

*nix specific usage questions
eof
New Cone
New Cone
Posts: 4
Joined: 10 Mar 2016 19:14

Looking for information/success stories using blackmagic/decklink cards with VLC

Postby eof » 10 Mar 2016 19:58

I have compiled VLC with decklink drivers

Code: Select all

[0000000001e2a1a8] core libvlc debug: VLC media player - 3.0.0-git Vetinari [0000000001e2a1a8] core libvlc debug: Copyright © 1996-2016 the VideoLAN team [0000000001e2a1a8] core libvlc debug: revision 2.2.0-git-6743-gd6b6f0f [0000000001e2a1a8] core libvlc debug: configured with ./configure '--disable-qt4' '--disable-skins2' '--disable-xcb' '--enable-twolame' '--enable-dvbpsi' '--enable-lua' '--disable-mad' '--disable-postproc' '--disable-a52' '--disable-libgcrypt' '--disable-dbus' '--enable-run-as-root' '--enable-x264' '--disable-nls' '--enable-httpd' '--disable-dvdnav' '--disable-dshow' '--disable-bluray' '--disable-smb' '--disable-live555' '--disable-vcd' '--disable-libcddb' '--disable-ogg' '--disable-mux_ogg' '--disable-shout' '--disable-mkv' '--disable-dvdread' '--disable-samplerate' '--disable-udev' '--disable-upnp' '--disable-mtp' '--disable-flac' '--disable-notify' '--disable-bonjour' '--disable-caca' '--disable-libass' '--disable-schroedinger' '--disable-theora' '--disable-opus' '--disable-speex' '--disable-vorbis' '--disable-dirac' '--disable-fluidsynth' '--disable-dca' '--disable-libmpeg2' '--disable-goom' '--disable-dv' '--disable-svg' '--disable-kate' '--disable-sftp' '--disable-sid' '--disable-dc1394' '--disable-opencv' '--disable-gnomevfs' '--disable-sdl' '--disable-taglib' '--disable-libxml2' '--disable-portaudio' '--disable-telx' '--disable-libva' '--disable-jack' '--disable-mod' '--disable-projectm' '--disable-faad' '--enable-shared' '--with-decklink-sdk=/data/DecklinkSDK/Linux'
And am able to play video (fwiw, the aim here is to actually listen on UDP to spit out over SDI), but the video is plagued with problems.


This is an example attempt:

Code: Select all

cvlc --ignore-config -I dummy 20090227_235906-H.264.m2ts.mp4 -V decklinkoutput -A decklinkoutput --decklink-aspect-ratio 16:9 --decklink-mode Hi59
When I run this command, video does come out, but it is not formatted correctly. It is always 576i; so when I send it 1080i I onlyh get like 25% of the frame (roughly the the top left quarter of the video will play). Whereas if I instead play a 360p, I will get the full frame of video padded with a static green background.

I also get the following errors:

Code: Select all

root@6b5ba9dab404:/data# cvlc --ignore-config -I dummy 20090227_235906-H.264.m2ts.mp4 -V decklinkoutput -A decklinkoutput --decklink-mode Hi59 VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-6743-gd6b6f0f) [0000000001f7eef8] core xml reader error: XML reader not found [0000000001f79848] core interface error: no suitable interface module [0000000001ed11a8] core libvlc error: interface "globalhotkeys,none" initialization failed [0000000001f79848] dummy interface: using the dummy interface module... [00007fa0e4005018] core vout display error: Failed to change zoom [00007fa0e4005018] core vout display error: Failed to change source AR [h264 @ 0x7fa0d4e7f700] AVC: nal size 0 [h264 @ 0x7fa0d4e7f700] error while decoding MB 117 61, bytestream -6 [h264 @ 0x7fa0d4e7f700] AVC: nal size 0 *** Error in `/usr/local/bin/vlc': free(): invalid next siz

I'm somewhat stuck on even where to move forward. Here is a link to -vvv output for the above command: http://termbin.com/bouz


I don't think it's directly related, but this is being built inside of a docker container (and being run as a privileged container). This is the dockerfile that is building the container


https://github.com/gdoteof/vlc-docker-d ... Dockerfile

eof
New Cone
New Cone
Posts: 4
Joined: 10 Mar 2016 19:14

Re: Looking for information/success stories using blackmagic/decklink cards with VLC

Postby eof » 10 Mar 2016 21:19

Some success!


Turns out basically every example on the internet has the wrong flag for specifying the option for which mode to run in.

These are the options I have gleaned from the DecklinkSDK itself:

Code: Select all

/* SD Modes */ bmdModeNTSC = /* 'ntsc' */ 0x6E747363, bmdModeNTSC2398 = /* 'nt23' */ 0x6E743233, // 3:2 pulldown bmdModePAL = /* 'pal ' */ 0x70616C20, bmdModeNTSCp = /* 'ntsp' */ 0x6E747370, bmdModePALp = /* 'palp' */ 0x70616C70, /* HD 1080 Modes */ bmdModeHD1080p2398 = /* '23ps' */ 0x32337073, bmdModeHD1080p24 = /* '24ps' */ 0x32347073, bmdModeHD1080p25 = /* 'Hp25' */ 0x48703235, bmdModeHD1080p2997 = /* 'Hp29' */ 0x48703239, bmdModeHD1080p30 = /* 'Hp30' */ 0x48703330, bmdModeHD1080i50 = /* 'Hi50' */ 0x48693530, bmdModeHD1080i5994 = /* 'Hi59' */ 0x48693539, bmdModeHD1080i6000 = /* 'Hi60' */ 0x48693630, // N.B. This _really_ is 60.00 Hz. bmdModeHD1080p50 = /* 'Hp50' */ 0x48703530, bmdModeHD1080p5994 = /* 'Hp59' */ 0x48703539, bmdModeHD1080p6000 = /* 'Hp60' */ 0x48703630, // N.B. This _really_ is 60.00 Hz. /* HD 720 Modes */ bmdModeHD720p50 = /* 'hp50' */ 0x68703530, bmdModeHD720p5994 = /* 'hp59' */ 0x68703539, bmdModeHD720p60 = /* 'hp60' */ 0x68703630, /* 2k Modes */ bmdMode2k2398 = /* '2k23' */ 0x326B3233, bmdMode2k24 = /* '2k24' */ 0x326B3234, bmdMode2k25 = /* '2k25' */ 0x326B3235, /* DCI Modes (output only) */ bmdMode2kDCI2398 = /* '2d23' */ 0x32643233, bmdMode2kDCI24 = /* '2d24' */ 0x32643234, bmdMode2kDCI25 = /* '2d25' */ 0x32643235, /* 4k Modes */ bmdMode4K2160p2398 = /* '4k23' */ 0x346B3233, bmdMode4K2160p24 = /* '4k24' */ 0x346B3234, bmdMode4K2160p25 = /* '4k25' */ 0x346B3235, bmdMode4K2160p2997 = /* '4k29' */ 0x346B3239, bmdMode4K2160p30 = /* '4k30' */ 0x346B3330, bmdMode4K2160p50 = /* '4k50' */ 0x346B3530, bmdMode4K2160p5994 = /* '4k59' */ 0x346B3539, bmdMode4K2160p60 = /* '4k60' */ 0x346B3630, /* DCI Modes (output only) */ bmdMode4kDCI2398 = /* '4d23' */ 0x34643233, bmdMode4kDCI24 = /* '4d24' */ 0x34643234, bmdMode4kDCI25 = /* '4d25' */ 0x34643235, /* Special Modes */ bmdModeUnknown
So what *does* work to output 1080i seemingly perfectly

Code: Select all

cvlc udp://@:1234 --decklink-mode Hi59 --decklink-aspect-ratio=16:9 -V decklinkoutput -A decklinkoutput --decklink-vout-mode Hi59 --decklink-vout-video-connection sdi --network-caching 300

eof
New Cone
New Cone
Posts: 4
Joined: 10 Mar 2016 19:14

Re: Looking for information/success stories using blackmagic/decklink cards with VLC

Postby eof » 10 Mar 2016 21:29

Code: Select all

root@2e3defa2db5f:/data# vlc -p decklink --advanced --help-verbose VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-6743-gd6b6f0f) output module to write to Blackmagic SDI card (decklinkoutput) DeckLink General Options: --decklink-output-card-index <integer [-2147483648 .. 2147483647]> DeckLink output card, if multiple exist. The cards are numbered from 0. DeckLink output card, if multiple exist. The cards are numbered from 0. DeckLink Video Options: --decklink-vout-video-connection {sdi,hdmi,opticalsdi,component,composite,svideo} Video connection for DeckLink output. Video connection for DeckLink output. --decklink-vout-mode <string> Desired output mode for DeckLink output. This value should be a FOURCC code in textual form, e.g. "ntsc". Desired output mode for DeckLink output. This value should be a FOURCC code in textual form, e.g. "ntsc". --decklink-vout-tenbits, --no-decklink-vout-tenbits Use 10 bits per pixel for video frames. (default disabled) Use 10 bits per pixel for video frames. --decklink-vout-nosignal-delay <integer [-2147483648 .. 2147483647]> Timelength after which we assume there is no signal. After this delay we black out the video. Timelength after which we assume there is no signal. After this delay we black out the video. --decklink-vout-nosignal-image <string> Picture to display on input signal loss. Picture to display on input signal loss. DeckLink Audio Options: --decklink-aout-audio-rate <integer [-2147483648 .. 2147483647]> Audio sampling rate (in hertz) for DeckLink output. 0 disables audio output. Audio sampling rate (in hertz) for DeckLink output. 0 disables audio output. --decklink-aout-audio-channels <integer [-2147483648 .. 2147483647]> Number of output channels for DeckLink output. Must be 2, 8 or 16. 0 disables audio output. Number of output channels for DeckLink output. Must be 2, 8 or 16. 0 disables audio output. Blackmagic DeckLink SDI input (decklink) --decklink-card-index <integer [-2147483648 .. 2147483647]> DeckLink capture card to use, if multiple exist. The cards are numbered from 0. DeckLink capture card to use, if multiple exist. The cards are numbered from 0. --decklink-mode <string> Desired input video mode for DeckLink captures. This value should be a FOURCC code in textual form, e.g. "ntsc". Desired input video mode for DeckLink captures. This value should be a FOURCC code in textual form, e.g. "ntsc". --decklink-audio-connection {embedded,aesebu,analog} Audio connection to use for DeckLink captures. Valid choices: embedded, aesebu, analog. Leave blank for card default. Audio connection to use for DeckLink captures. Valid choices: embedded, aesebu, analog. Leave blank for card default. --decklink-audio-rate <integer [-2147483648 .. 2147483647]> Audio sampling rate (in hertz) for DeckLink captures. 0 disables audio input. Audio sampling rate (in hertz) for DeckLink captures. 0 disables audio input. --decklink-audio-channels <integer [-2147483648 .. 2147483647]> Number of input audio channels for DeckLink captures. Must be 2, 8 or 16. 0 disables audio input. Number of input audio channels for DeckLink captures. Must be 2, 8 or 16. 0 disables audio input. --decklink-video-connection {sdi,hdmi,opticalsdi,component,composite,svideo} Video connection to use for DeckLink captures. Valid choices: sdi, hdmi, opticalsdi, component, composite, svideo. Leave blank for card default. Video connection to use for DeckLink captures. Valid choices: sdi, hdmi, opticalsdi, component, composite, svideo. Leave blank for card default. --decklink-aspect-ratio <string> Aspect ratio (4:3, 16:9). Default assumes square pixels. Aspect ratio (4:3, 16:9). Default assumes square pixels. --decklink-tenbits, --no-decklink-tenbits 10 bits (default disabled) 10 bits


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

Who is online

Users browsing this forum: No registered users and 14 guests