Encode/Decode pair with Decklinks and FFMPEG

Questions about ATEM Switchers, Camera Converter and everything live!
  • Author
  • Message
Offline

munozj

  • Posts: 5
  • Joined: Wed Feb 13, 2019 8:13 pm
  • Location: DFW
  • Real Name: john munoz

Encode/Decode pair with Decklinks and FFMPEG

PostSat May 18, 2024 8:25 pm

Has anyone ever setup a encode/decode pair using FFMPEG and Decklinks? (or any other software?). The end goal is to bring in a remote camera feed into the studio switcher so quality and low latency is important. There is a private ethernet network already setup between the two studios.

I'm testing using this on the encoder (10.40.0.100)

Code: Select all
ffmpeg -f decklink -video_input 'sdi' -i 'DeckLink SDI (1)' -f mpegts  udp://10.40.0.111:8090


and on the receiving computer (10.40.0.111) I'm just trying to playback using ffplay (eventually this will output to another decklink)

Code: Select all
ffplay -f mpegts udp://10.40.0.111:8090


but the playback is unstable and I get all these errors. I'm sure I have some settings wrong but no idea what.

Code: Select all
[mpeg2video @ 0x7a6fcc0c7500] Invalid mb type in I-frame at 0 30
[mpeg2video @ 0x7a6fcc0c7500] Warning MVs not available
[mpeg2video @ 0x7a6fcc0c7500] concealing 540 DC, 540 AC, 540 MV errors in I frame
[mpegts @ 0x7a6fcc000cc0] PES packet size mismatchsq=    0B f=0/0   
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 1, dts = 7109221).
[mpeg2video @ 0x7a6fcc0c7500] ac-tex damaged at 20 19
[mpeg2video @ 0x7a6fcc0c7500] Warning MVs not available
[mpeg2video @ 0x7a6fcc0c7500] concealing 540 DC, 540 AC, 540 MV errors in P frame
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 1, dts = 7113541).
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 0, dts = 7116984).
[mpeg2video @ 0x7a6fcc0c7500] end mismatch left=1060 8893 at 0 31   
[mpeg2video @ 0x7a6fcc0c7500] Warning MVs not available
[mpeg2video @ 0x7a6fcc0c7500] concealing 0 DC, 0 AC, 0 MV errors in P frame
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 1, dts = 7117861).
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 1, dts = 7122181).
[mp2 @ 0x7a6fcc0c9680] Header missingB vq=  456KB sq=    0B f=0/0   
[mpeg2video @ 0x7a6fcc0c7500] end mismatch left=1124 9380 at 0 31
[mpeg2video @ 0x7a6fcc0c7500] Warning MVs not available
[mpeg2video @ 0x7a6fcc0c7500] concealing 0 DC, 0 AC, 0 MV errors in P frame
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 1, dts = 7126501).
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 1, dts = 7130821).
[mpeg2video @ 0x7a6fcc0c7500] end mismatch left=1060 8893 at 0 31   
[mpeg2video @ 0x7a6fcc0c7500] Warning MVs not available
[mpeg2video @ 0x7a6fcc0c7500] concealing 0 DC, 0 AC, 0 MV errors in P frame
[mpeg2video @ 0x7a6fcc0c7500] ac-tex damaged at 16 25    0B f=0/0   
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 1, dts = 7139461).
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 0, dts = 7144011).
[mpeg2video @ 0x7a6fcc0c7500] ac-tex damaged at 41 30
[mpeg2video @ 0x7a6fcc0c7500] Invalid mb type in I-frame at 0 20
[mpeg2video @ 0x7a6fcc0c7500] Warning MVs not available
[mpeg2video @ 0x7a6fcc0c7500] concealing 1260 DC, 1260 AC, 1260 MV errors in I frame
[mp2 @ 0x7a6fcc0c9680] Header missing
    Last message repeated 1 times
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 1, dts = 7143781).
[mpegts @ 0x7a6fcc000cc0] Packet corrupt (stream = 0, dts = 7153020).

Any guidance would be appreciated.
Offline
User avatar

Roman Pytkin Pekarek

  • Posts: 2420
  • Joined: Tue Oct 30, 2012 1:11 pm
  • Location: SVK

Re: Encode/Decode pair with Decklinks and FFMPEG

PostSun May 19, 2024 4:33 pm

U was not specified codec and video parameters
http://tally.pytkin.sk
http://chucktv.eu
http://www.stonepp.tv
http://www.media-planet.sk
Offline

munozj

  • Posts: 5
  • Joined: Wed Feb 13, 2019 8:13 pm
  • Location: DFW
  • Real Name: john munoz

Re: Encode/Decode pair with Decklinks and FFMPEG

PostSun May 19, 2024 5:40 pm

I ended up changing to...

Code: Select all
ffmpeg -f decklink -video_input 'sdi' -i 'DeckLink SDI (1)' -c:v libx264 -preset veryfast -tune zerolatency -bf 0 -c:a aac -f mpegts udp://10.40.0.111:8090


...with much better success. now I just need to find the right codec and parameters to work well with the actual remote connection.
Offline
User avatar

Roman Pytkin Pekarek

  • Posts: 2420
  • Joined: Tue Oct 30, 2012 1:11 pm
  • Location: SVK

Re: Encode/Decode pair with Decklinks and FFMPEG

PostMon May 20, 2024 8:38 am

x264 is top .. but veryfast is not verygood .. Its the lowest quality , but lower latency too ..
http://tally.pytkin.sk
http://chucktv.eu
http://www.stonepp.tv
http://www.media-planet.sk
Offline

munozj

  • Posts: 5
  • Joined: Wed Feb 13, 2019 8:13 pm
  • Location: DFW
  • Real Name: john munoz

Re: Encode/Decode pair with Decklinks and FFMPEG

PostFri May 24, 2024 11:32 am

Any guidance on what the proper command would be on the decoder to playback this UDP stream on it's Decklink? I was able to successfully encode using:
Code: Select all
ffmpeg -f decklink -video_input 'sdi' -i 'DeckLink SDI (1)' -c:v libx264 -preset veryfast -tune zerolatency -bf 0 -c:a aac -f mpegts udp://192.168.100.10:8080
I'm able to playback on 192.168.100.10 using ffplay but ultimately I'd like to be able to playout using another blackmagic card. I can play out a local video file with
Code: Select all
ffmpeg -i videofile.mp4 -f decklink -pix_fmt uyvy422 'DeckLink SDI (1)'
but I can't figure out how to playout the receiving stream to the SDI output
Offline
User avatar

Roman Pytkin Pekarek

  • Posts: 2420
  • Joined: Tue Oct 30, 2012 1:11 pm
  • Location: SVK

Re: Encode/Decode pair with Decklinks and FFMPEG

PostFri May 24, 2024 10:49 pm

AT FIRST .. add -re as a realtime encoding ..

and try multicast output :

-f mpegts "udp://239.101.101.1:1234?ttl=10&pkt_size=1316"

on second side try

ffmpeg -re -i "udp://239.101.101.1:1234?ttl=10&pkt_size=1316" -f decklink -pix_fmt uyvy422 'DeckLink SDI (1)'
http://tally.pytkin.sk
http://chucktv.eu
http://www.stonepp.tv
http://www.media-planet.sk

Return to Live Production

Who is online

Users browsing this forum: Asgeir Hustad and 35 guests