DeckLink SDI 4K ffmpeg interlace scan

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Bob DeCarlo

  • Posts: 4
  • Joined: Tue Jun 09, 2015 3:32 am

DeckLink SDI 4K ffmpeg interlace scan

PostTue Jun 09, 2015 3:45 am

Hi,
I have having trouble getting the correct interlace order with the DeckLink SDI 4K using ffmpeg.
I have tried several versions of the command, here are two examples:

./ffmpeg -f decklink -i 'DeckLink SDI 4K@1' -vf "setfield=1, fieldorder=bff" -target ntsc-dvd -flags +cgop+ilme+ildct -alternate_scan 1 -top 0 -g 15 -sc_threshold 1000000000 -threads 4 -y VTS_01_1.VOB

./ffmpeg -f decklink -i 'DeckLink SDI 4K@1' -target ntsc-dvd -flags +cgop+ilme+ildct -alternate_scan 1 -top 1 -g 15 -sc_threshold 1000000000 -threads 4 -y VTS_01_1.VOB

When I finally author a DVD and play it on a panasonic DMR-E55 player using a CRT studio NTSC monitor, the still picture quality is good. During motion, it looks line the interlace fields are out of order.

The Decklink SDK document indicates that the hardware is bottom field first which is fine except I do not know how to get that correctly into ffmpeg. Can anyone help?

I think I need to filter using: -vf "setfield=1, fieldorder=bff" or
or to flip it:
-vf "setfield=1, fieldorder=tff"

Thanks!
Bob
Offline

Matt Jefferson

Blackmagic Design

  • Posts: 130
  • Joined: Fri Aug 31, 2012 12:50 am

Re: DeckLink SDI 4K ffmpeg interlace scan

PostWed Jun 10, 2015 1:50 am

Bob,
We don't support any FFMPEG even via our SDK support system. Hopefully one of the community members can comment but I might suggest contacting the developers at FFMPEG as they have developed support on their side via our APIs. They would have to implement the correct ordering of fields and would need to support NTSC formats correctly.

Matt Jefferson
Offline

Dave Johnstone

  • Posts: 223
  • Joined: Mon Dec 08, 2014 11:12 am
  • Location: Adelaide

Re: DeckLink SDI 4K ffmpeg interlace scan

PostWed Jun 10, 2015 11:18 am

Hi Bob,

Do you have to use ffmpeg? I don't have much experience with Decklinks and ffmpeg but gstreamer appears to work well with Decklink cards, both source and destination now (version 1.41 and above) and I have used it for playback. If I understand your situation correctly, you want to capture an SD 525i source and create a file for subsequent burning to DVD-Video. If so, I can have a play with my system tomorrow and give you the equivalent gstreamer command line. I have a Decklink HD 3D Extreme to test with and am in PAL-land but should be able to find a 625i source to test with. The gstreamer Decklink plugin uses code from the official Decklink API and so should work well even though not directly supported by BMD.

Regards,

Dave.
Freelance Television Broadcast Engineer
and Software Programmer.
Offline

Bob DeCarlo

  • Posts: 4
  • Joined: Tue Jun 09, 2015 3:32 am

Re: DeckLink SDI 4K ffmpeg interlace scan

PostThu Jun 11, 2015 6:20 pm

Hi Dave,
Thank you for the reply.

I can certainly give gstreamer a try. I'm an ffmpeg user but I can try other things. Overall, I prefer command line versus a gui. I could even use it to correct the field order and still use ffmpeg. If gstreamer has encoding for DVD-video, I would then compare the overall video quality.

I appreciate any ideas!

Regards,
Bob
Offline

Dave Johnstone

  • Posts: 223
  • Joined: Mon Dec 08, 2014 11:12 am
  • Location: Adelaide

Re: DeckLink SDI 4K ffmpeg interlace scan

PostMon Jun 15, 2015 11:51 pm

Hi Bob,

Gstreamer is a library designed for incorporation into your own code, but there is a command line interface for testing pipelines called gst-launch. The pipeline for DVD creation would be something like this:
Code: Select all
gst-launch-1.0 decklinkvideosrc mode=1 ! queue ! autovideoconvert ! mpeg2enc bufsize=300 bitrate=4000 ! mplex name=mux ! filesink location=/path/to/video.mpeg decklinkaudiosrc ! audioconvert ! mux.
.
There is a setting for mpeg2enc (playback-field-order) which can be used to select top/bottom field first. I'm no expert on Gstreamer but have found it useful and easier to use than the SDK in some situations.

Regards,

Dave.
Freelance Television Broadcast Engineer
and Software Programmer.
Offline

Bob DeCarlo

  • Posts: 4
  • Joined: Tue Jun 09, 2015 3:32 am

Re: DeckLink SDI 4K ffmpeg interlace scan

PostWed Jun 17, 2015 10:47 pm

Sorry, I cant get past the decklinkvideosrc. Do I need to build gst with the decklink sdk or something?

recorder@recorder-All-Series:~$ gst-launch-1.0 decklinkvideosrc
ERROR: pipeline could not be constructed: no element "decklinkvideosrc".
recorder@recorder-All-Series:~$

Using videotestsrc functions ok, so gst-launch is working

This functions:
./ffplay -f decklink -i 'DeckLink SDI 4K@1'
So the hardware is operational.

Thanks!
Offline

Dave Johnstone

  • Posts: 223
  • Joined: Mon Dec 08, 2014 11:12 am
  • Location: Adelaide

Re: DeckLink SDI 4K ffmpeg interlace scan

PostThu Jun 18, 2015 11:23 am

Hi Bob,

I can't remember exactly but yes, I think you need to compile gst-plugins-bad yourself with the Decklink driver and/or SDK installed. When you do an ./autogen.sh (in the gst-plugins-bad source directory) Decklink should be listed under "Plugins with external dependencies which will be built". Then, after the usual make/make install, you can then issue a "gst-inspect-1.0 decklinkvideosrc" to confirm plugin availability.

Regards,

Dave.
Freelance Television Broadcast Engineer
and Software Programmer.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 17 guests