Playback MPEG2 TS video file on Decklink output

*nix specific usage questions
sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Playback MPEG2 TS video file on Decklink output

Postby sforster » 07 May 2013 22:13

Hi all,

I've been attempting to play a video file (MPEG2 TS), which I've encoded using Adobe Media Encoder, using the decklinkoutput module to output video from the Blackmagic card. In order to do this, I have compiled VLC against the Decklink SDK, which after much trial and error *seems* to have compiled. I have been unable to playback the video, however, using the following command:

./cvlc -vvv /media/SD2013D01.mpg --aout decklinkoutput --vout decklinkoutput --decklink-output-card 0 --decklink-vout-video-connection composite --decklink-vout-mode ntsc --decklink-aout-audio-connection analog

With the resulting output:

http://pastebin.com/drcv4Zx2

I noticed that VLC is having trouble recognizing that the file is Transport Stream. I've specified the --demux=ts and get:

http://pastebin.com/nkJ63YX8

In this log, I see VLC can't recognize the input's format. It seems like it's not finding the demux module? Isn't that always enabled at compile time? And since the PS module is there, shouldn't the TS be as well?

It seems like this problem would trace back to the configuration before compiling. I'm not really sure what would cause the missing module, however. Any ideas, anyone? I am compiling on CentOS 6.4.

Thanks!

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: Playback MPEG2 TS video file on Decklink output

Postby Jean-Baptiste Kempf » 08 May 2013 12:09

Did you compile the ts module?
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.

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 08 May 2013 17:25

Thank you for your response!I will recompile and log this time. The TS module should be part of the VLC git package, right? I am working on a CentOS minimal install, so I've had issues with dependencies. I thought I had them resolved, but I might be missing something or have the wrong version of something.

I will report back. Thanks!

kolevlc
New Cone
New Cone
Posts: 6
Joined: 14 Feb 2013 18:22

Re: Playback MPEG2 TS video file on Decklink output

Postby kolevlc » 09 May 2013 13:02

Hello,

ive been working with that decklink output module for quite some time but im having problems with audio.

Would you be kind to show me your ./configure script?

Thanks!

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 09 May 2013 19:48

I have been able to compile with the TS module included- I didn't realize I needed to include --enable-libdvb during configuration for the TS module to compile. But now, I'm seeing a different error while trying to play video with the same command line,
./cvlc -vvv /media/SD2013D01.mpg --aout decklinkoutput --vout decklinkoutput --decklink-output-card 0 --decklink-vout-video-connection composite --decklink-vout-mode ntsc --decklink-aout-audio-connection analog

Output from VLC is: http://pastebin.com/f3f2NPJx

It looks like the Decklinkoutput module doesn't like the video-connection parameter (down at line 155), so I tried the others. hdmi, component, svideo, they all return the same error.

Is there something wrong with the command line I'm using? It seems from the help output that 'composite' would be the parameter I'd specify.

Thanks!

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 09 May 2013 19:50

Hello,

ive been working with that decklink output module for quite some time but im having problems with audio.

Would you be kind to show me your ./configure script?

Thanks!
I haven't been able to get this to work for me yet, but I'll certainly share the details once my problems are resolved!

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 10 May 2013 19:33

I'll preface this by saying I am not someone who is skilled enough in C++ to be developing modules such as these VLC video outputs, but I had a look through decklink.cpp. There is some error checking in there concerning the video-connection parameter, but it appears that the error I'm seeing in the debug log, "*** readValueFromPrefs[635]: invalid video output connection value: 0", is not directly generated by the decklink module. It would appear that the VLC core is possibly generating this message?

I'm not sure how to go about debugging this really, it's a bit over my head. If there's anything wrong with what I'm specifying on the command line, then I'd love to hear about it or if someone out there can identify this as a bug, then maybe there's an appropriate place to report it. Otherwise, I may have to move on and find another solution.

Thanks for any and all suggestions!

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: Playback MPEG2 TS video file on Decklink output

Postby Jean-Baptiste Kempf » 12 May 2013 02:06

This is written by the decklink SDK.
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.

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: Playback MPEG2 TS video file on Decklink output

Postby Jean-Baptiste Kempf » 12 May 2013 02:08

Are you sure --decklink-output-card 0 is right?
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.

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 13 May 2013 17:26

Sorry, I miss-typed that. I've been using --decklink-output-card-index 0

I do get the line in the log where it recognizes the card. It even reads it as an "Intensity Pro", as opposed to the other decklink cards that use the same drivers.

Thanks,

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 14 May 2013 00:02

Ok, in trying to debug this problem with decklink module / decklink sdk, I was able to find that the configuration parameter from --decklink-vout-video-connection was getting set properly via the SetInt() method of the SDK. I noticed that, in decklink.cpp, the IDecklink objects are getting released right after setting all config parameters and calling StartScheduledPlayback (line 489). I tried commenting these lines out, like this:

Code: Select all

/* start */ result = decklink_sys->p_output->StartScheduledPlayback( (mdate() * decklink_sys->timescale) / CLOCK_FREQ, decklink_sys->timescale, 1.0); CHECK("Could not start playback"); /* p_config->Release(); p_display_mode->Release(); p_display_iterator->Release(); p_card->Release(); decklink_iterator->Release(); */
I don't get the output connection error anymore. But, I am still getting the same errors:

[0x7f4e54001248] main vout display error: Failed to change zoom
[0x7f4e54001248] main vout display error: Failed to set on top
[0x7f4e54001248] main vout display error: Failed to change source AR

I am getting no playback still, so I will keep digging.

study0070
Blank Cone
Blank Cone
Posts: 26
Joined: 14 May 2013 13:07

Re: Playback MPEG2 TS video file on Decklink output

Postby study0070 » 14 May 2013 13:18

Urgently Dear i need you help even in my company i m doing same task but for the last 10 days not able to get some things

i have compiled vlc 2-0.5 and later reconfigure and added decklink input module . but in vlc --list|grep -i decklink - i m getting "decklink Blackmagic DeckLink SDI input"

1) now my problem is how i find n compile vlc with decklink output module . kindly help how u straming on decklink card i m using studio 2 card
2) second issue my vlc window in linux centos 6.2 not showing decklink capture device but only v4l2, tv and desktop
but in windows its is detecting same n showing bdm wdm and decklink input output.


my task is to take input from decklink studio 2 card and output on same pls help dear


kindly help on steps please or call 9312610734 ankur
or please give ur email id...

study0070
Blank Cone
Blank Cone
Posts: 26
Joined: 14 May 2013 13:07

Re: Playback MPEG2 TS video file on Decklink output

Postby study0070 » 14 May 2013 13:21

And yes sforster i have compliled libdvpsi for using TS streaming on udp .. waiting for ur reply on same asap

how to find n compile n attached vlc with output module for decklingk studio 2 card or any declink card u using give me some answers .. Acutaly i wana call u on same i think we using same task in our scenarios

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 14 May 2013 17:25

From your PM I noticed that you are compiling VLC version 2.0.5. This version does not include the decklink output module.

Get the latest git clone release at git://git.videolan.org/vlc.git

You may need to update some of the other packages, depending on what you've got. Use your same configuration parameters and compile again against the decklink SDK.

Again, I have not been able to get this output module to work for me yet. I am going to continue to try to do what I can, with my limited coding skill set, however.

study0070
Blank Cone
Blank Cone
Posts: 26
Joined: 14 May 2013 13:07

Re: Playback MPEG2 TS video file on Decklink output

Postby study0070 » 15 May 2013 10:58

Sforster kindly tell which version of vlc include decklink output module ... and on which version u r using.
even i have compiled vlc with decklink sdk but its not showing in vlc capture device.

Also can u also share mediaexpress is compulsory to download. if yes from where.

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 15 May 2013 17:12

I am using 2.1.0-pre1 Rincewind. I think I read in the documentation somewhere that the decklink output module was added in version 2. I haven't looked at the graphical VLC app at all, just using cvlc in a terminal, so I'm not sure about how it would show up in capture devices or output devices. If you run vlc --list | grep decklink, it will show the output module if it's compiled.

study0070
Blank Cone
Blank Cone
Posts: 26
Joined: 14 May 2013 13:07

Re: Playback MPEG2 TS video file on Decklink output

Postby study0070 » 16 May 2013 06:26

sforster media express is compulsory and bmd tools are com pulsory to work with vlc n decklink ??
also i m using 2-0.5 then also it doesnt have decklink output module added.

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 16 May 2013 17:49

sforster media express is compulsory and bmd tools are com pulsory to work with vlc n decklink ??
also i m using 2-0.5 then also it doesnt have decklink output module added.
My understanding is that no, you don't need either Media Express or bmdtools to use the VLC output module. You only need the Decklink SDK available for the module to compile. Bmdtools can be used with named pipes to play decoded video, which you can generate using ffmpeg or libav (avconv). Be aware if you are compiling bmdtools that, as of this writing, you must use an older version of libav and thus ffmpeg. I ended up using ffmpeg-1.0.7, which allowed bmdtools to compile.

Again, I still haven't been able to play any video, but it's looking more now that I have an issue with the addressing of the card. I don't fully understand it yet, but the card is properly listed in PCI devices, is present at /dev/blackmagic/card0, the module is listed, driver loaded, but BlackmagicFirmwareUpdater is not able to talk to the card. I get an "nobody cared" message and disabling IRQ 17. I've heard there are possible bios issues, but I've update my bios and still have the same issue. I think this is likely my problem with playout though, not software.

study0070
Blank Cone
Blank Cone
Posts: 26
Joined: 14 May 2013 13:07

Re: Playback MPEG2 TS video file on Decklink output

Postby study0070 » 17 May 2013 06:30

i compiles bmdtools with ffmpeg 1.2 successfully with vlc 2.0.5 version now me working on ur recomended versino 2.1.0pre1 but i think vlc only pasted decklink.cpp file in this it is not compiled any help if u have compiled n remove linkage error from vlc_plugin.h etc.

have u workign on vlc output module now??

study0070
Blank Cone
Blank Cone
Posts: 26
Joined: 14 May 2013 13:07

Re: Playback MPEG2 TS video file on Decklink output

Postby study0070 » 17 May 2013 12:53

i m now compiling vlc version 2.1.0pre1\
and getting 2 make error in deinternlace/algo_x.c blah blah

ya i have run make and configure with these options
--prefix=/usr/local/v210/ --disable-skins2 --disable-lua PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/share/pkgconfig --enable-a52 --enable-x264 --enable-libtar --enable-pulse --enable-postproc --enable-dvbpsi --enable-dvdread --enable-dvdnav --disable-fribidi --enable-faad --enable-run-as-root --enable-merge-ffmpeg --enable-screen --enable-xvideo --enable-twolame --without-contrib --enable-visual --enable-vlc --enable-udev --enable-decklink --with-decklink-sdk=/opt/Blackmagic_DeckLink_SDK_9.7/Linux/

its fine
but make giving two errors
make[5]: Leaving directory `/opt/vlc/modules/video_chroma'
make[4]: Leaving directory `/opt/vlc/modules/video_chroma'
make[3]: Leaving directory `/opt/vlc/modules/video_chroma'
Making install in video_filter
make[3]: Entering directory `/opt/vlc/modules/video_filter'
make install-am
make[4]: Entering directory `/opt/vlc/modules/video_filter'
CC libdeinterlace_plugin_la-algo_x.lo
deinterlace/algo_x.c: In function ‘XDeintBand8x8MMXEXT’:
deinterlace/algo_x.c:503: internal compiler error: in memory_address, at explow.c:493
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccipGDTw.out file, please attach this to your bugreport.
make[4]: *** [libdeinterlace_plugin_la-algo_x.lo] Error 1
make[4]: Leaving directory `/opt/vlc/modules/video_filter'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/opt/vlc/modules/video_filter'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/opt/vlc/modules'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/opt/vlc'
make: *** [install] Error 2

i m not getting whats the error denote deinterlace/algo_x.c is having error pls give some idea n help to compile it successfully

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 17 May 2013 17:22

I have not looked further into the decklink output module because I believe the issues I've been experiencing were related to the way the PCI bus was being accessed- my card appeared to be working normally, but couldn't be communicated with by the driver correctly. I fixed this by adding "pcie_aspm=off" in my kernel boot line in /boot/grub/menu.lst. Apparently there are issues in later versions of CentOS (the driver docs list Fedora core 12). Now I've been able to get output using ffmpeg | bmdtools, but it's greyscale (?!)

I'll be recompiling VLC and trying the decklink output module again soon.


I think you're compiler error might be due to the version of gcc? I would check that first. I did not get this error and I'm using gcc 4.4.7

study0070
Blank Cone
Blank Cone
Posts: 26
Joined: 14 May 2013 13:07

Re: Playback MPEG2 TS video file on Decklink output

Postby study0070 » 18 May 2013 11:02

can u resolve i m not getting breaking audio in output on decklink dats all any improvement in command line

this command we can use to output its working fine here with me
/usr/local/v210/bin/cvlc -vvv /opt/a.mp4 --aout decklinkoutput --vout decklinkoutput --decklink-output-card-index 0 --decklink-vout-video-connection composite --decklink-vout-mode ntsc --decklink-aout-audio-connection analog


video blending module "blend"
[0x8eca220] main video output debug: Detected interlaced video
[0x8eca220] main video output debug: deinterlace 0, mode blend, is_needed 1
[0xb7286f40] main vout display error: Failed to change zoom
[0xb7286f40] main vout display error: Failed to set on top
[0xb7286f40] main vout display error: Failed to change source AR
[0xb7400b18] main input debug: Buffering 42%
[0xb7400b18] main input debug: Buffering 49%
[0xb7400b18] main input debug: Buffering 56%
[0xb7400b18] main input debug: Buffering 63%
[0xb7400b18] main input debug: Buffering 70%
[0xb7400b18] main input debug: Buffering 77%
[0xb7400b18] main input debug: Buffering 84%
[0xb7400b18] main input debug: Buffering 91%
[0xb7400b18] main input debug: Buffering 98%
[0xb7400b18] main input debug: Stream buffering done (1050 ms in 1047 ms)
[0xb7400b18] main input debug: Decoder buffering done in 0 ms
[0x8ec1b58] decklinkoutput audio output error: Written only 768 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 samples out of 1152
[0x8ec1b58] decklinkoutput audio output error: Written only 0 sam

sforster
Blank Cone
Blank Cone
Posts: 13
Joined: 07 May 2013 19:10
Operating System: CentOS

Re: Playback MPEG2 TS video file on Decklink output

Postby sforster » 20 May 2013 20:51

I am now able to output video and audio in NTSC mode using the decklinkoutput module. It seems that my previous issue with the PCI boot setting was the cause of my problems.

I do still get the "invalid video output connection value: 0" error with the unmodified module. It doesn't seem to affect the function of the module, that I can tell at least.

study0070: Check to be sure that your audio sample rate is at 48000 Hz. I don't think the card will accept a different rate. Passed that, maybe check that the mux is good as well. Also, I just remember seeing comments in the decklink module that mono audio had not been tested yet- is your audio in mono or stereo?

study0070
Blank Cone
Blank Cone
Posts: 26
Joined: 14 May 2013 13:07

Re: Playback MPEG2 TS video file on Decklink output

Postby study0070 » 22 May 2013 07:32

atlast i have done the decklink output in hdmi and sdi possible with vlc. thanks for ideas n inputs but my above problem remains for algo_x.c file error but i do trick by removing some line den its ok but why the above error any idea?

kolevlc
New Cone
New Cone
Posts: 6
Joined: 14 Feb 2013 18:22

Re: Playback MPEG2 TS video file on Decklink output

Postby kolevlc » 24 Oct 2013 20:08

I have absolutely same problem as study0070. Audio is very choppy. Has anyone figured reason for such behaviour so far?


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

Who is online

Users browsing this forum: No registered users and 12 guests