Deckllink Quad bmdcapture and ffmpeg

Do you have questions about Desktop Video, Converters, Routers and Monitoring?
  • Author
  • Message
Offline

tripoli

  • Posts: 23
  • Joined: Fri Mar 15, 2013 1:11 pm

Deckllink Quad bmdcapture and ffmpeg

PostSun Apr 14, 2013 7:55 pm

Hi, Im trying to start several (6) streaming outputs from Decklink Quad.
Debian Linux 6.0.7 (Ram 16 GB, Corre i7)
I've compiled bmdtools and ffmpeg.
When I start 6 instances writing to pipes and ffmpeg writing to file they work ok. Problems begin when I try to launch several instances writing to pipe and transferring to rtmp I come to problems:
pipe:: Invalid data found when processing input
Code: Select all
./bmdcapture -C 1 -A 2 -m 8 -f pipe:1 -F nut | ffmpeg -i - -y -vf scale=-1:720  -threads 0 -b:v 1500k -acodec mp3 -ar 22050 -vcodec libx264  -f flv  "rtmp://server/deo/13991099/sdsadsa"

What changes is input: C 0, C 1 etc. and rtmp link.
1 instance works ok, but when I start more I get error listed above.
My current upload is limited and maybe this depends on fact that there is a 'queue' of data by bmdcapture in pipe which needs to be uploaded breaking the pipe or something to do with CPU - but I checked and CPU is not loaded, crashes occur event with 2 instances of the command above. Did anybody come across such a problem. I would prefer frame drops rather than process crash.
Offline

Reuben

  • Posts: 85
  • Joined: Wed Dec 12, 2012 3:50 pm

Re: Deckllink Quad bmdcapture and ffmpeg

PostMon Apr 15, 2013 4:49 am

Try adding the "-re" option to ffmpeg in front of the "-i" option.
Offline

tripoli

  • Posts: 23
  • Joined: Fri Mar 15, 2013 1:11 pm

Re: Deckllink Quad bmdcapture and ffmpeg

PostMon Apr 15, 2013 6:11 am

I have tried that. It did not help.
Offline
User avatar

Roman Pytkin Pekarek

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

Re: Deckllink Quad bmdcapture and ffmpeg

PostMon Apr 15, 2013 8:35 am

what upload bandwidth U have ? U creating bitrate 1.5mbps .. so U need 6x1.5mbps = 9mbps , better 10mbps ..
http://tally.pytkin.sk
http://chucktv.eu
http://www.stonepp.tv
http://www.media-planet.sk
Offline

tripoli

  • Posts: 23
  • Joined: Fri Mar 15, 2013 1:11 pm

Re: Deckllink Quad bmdcapture and ffmpeg

PostMon Apr 15, 2013 11:29 am

I have 3 mbit currently, I have crashes even with 2 streams, I've tried 600k, 200k but all fail within certain period. I suggest that this problem is directly connected with bandwidth - ffmepg cannot upload to rtmp all data coming and some buffers becomes "overloaded" - this is only suggestion.
I would prefer if ffmpeg drops frames - but not whole process fails. Maybe I missed some options to discard errors, skip frames or drop buffer in case it's overloaded.
Offline
User avatar

Roman Pytkin Pekarek

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

Re: Deckllink Quad bmdcapture and ffmpeg

PostMon Apr 15, 2013 11:30 am

and one stream is going OK ? even in 2.5kbps ?
http://tally.pytkin.sk
http://chucktv.eu
http://www.stonepp.tv
http://www.media-planet.sk
Offline

tripoli

  • Posts: 23
  • Joined: Fri Mar 15, 2013 1:11 pm

Re: Deckllink Quad bmdcapture and ffmpeg

PostMon Apr 15, 2013 3:30 pm

1 stream was ok. I have investigated with Windows version and I aslo get same errors but at least process does not stop, I just get "frame dropped" message when upload comes to limit. In windows ffmpeg gets directly via dshow and no pipes are used. I think in Linux pipe gets overloaded with data coming and not sent to rtmp in time and whole process crashes. Is it possible to avoid crashing - as loosing frames is normal when Internet connection is not perfect.
Offline
User avatar

Roman Pytkin Pekarek

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

Re: Deckllink Quad bmdcapture and ffmpeg

PostMon Apr 15, 2013 9:52 pm

i think It cant .. when ffmpeg not getting data from bmdcapture , pipe will crash ..
http://tally.pytkin.sk
http://chucktv.eu
http://www.stonepp.tv
http://www.media-planet.sk
Offline

Reuben

  • Posts: 85
  • Joined: Wed Dec 12, 2012 3:50 pm

Re: Deckllink Quad bmdcapture and ffmpeg

PostTue Apr 16, 2013 4:59 am

Reguardless of wheather or not the "-re" option fixes your immediate problem or not, you're still going to need to have that in there.

Try running piping them all to ffplay to make sure that all pipes are actually pushing video through.

If that works, have one pipe feeding an encoder and the others still feeding ffplay and see what happens.

Return to Post Production

Who is online

Users browsing this forum: Adriano Castaldini and 43 guests