[FFmpeg-user] FFmpeg won't stay connected to Wowza server over the internet.

Andrey Utkin andrey.krieger.utkin at gmail.com
Tue Sep 3 20:32:21 CEST 2013


2013/8/31 Leonard Bogard <leonard at kcfchurch.org>:
> I've setup a new and updated version of the Amazon AMI EC2 machine image of
> a Wowza server for live streaming.  I'm trying to migrate away from Adobe's
> Flash Media Live Encoder (FMLE) on Windows and change to FFmpeg on Linux.
> I am currently running the server version of Ubuntu with a Decklink SDI
> input card using "bmdcapture" to pipe into FFmpeg.  I am using the "tee"
> command to split the data to two separate instances of FFmpeg, one to
> record to the local harddrive and another to rtmp stream to the remote
> Wowza server.  At the moment I am using 3 named pipes to do all this.
>
> If I setup FFmpeg to RTMP to a Wowza server running on a machine behind my
> internet router, everything appears to run absolutely fine.  I've left it
> running for 5 hours once (much longer than I plan to run it for
> continuously) and I get no problems.  Zero, nada, zilch.  It will continue
> to run for as long as I don't tell it to stop.  I've tested it connecting
> to a Wowza server on Windows XP, a Wowza on a modern Mac, and a Wowza on a
> virtual Ubuntu machine.
>
> However, if I RTMP to the remote (over-the-internet) Wowza server, after
> about some random period of time that is sometimes 10 minutes to as short
> as 10 seconds after connecting, it just drops, with no connection specific
> error messages or anything.  It does this all the time.  The only way I am
> able to keep a connection is if I set the bitrate to 100K or lower, but
> sometimes 200K.
>
> Now for the kicker: FMLE works fine at 500K+ to the same remote server.  It
> will stay connected, it seems, no matter what.
>
> The big reasons why I want to migrate away from FMLE is that FMLE can't
> seem to keep the audio in sync, the recording to the HDD is [teh] crap
> (probably because it just saves the encoded frames from the stream instead
> of remuxing to a file format), the volume is way too low, it doesn't have
> an internal video resampler to get the size of the video we need (which
> makes it incompatible with the Decklink card), and it absolutely will not
> do 48Khz audio sample rate or AAC.
>
> Here's a pastebin of my bash script to startup FFmpeg (with alot of
> commands related to recorded file maintenance and PID based process
> protection/management removed for sake of readability/simplicity.)
>
> http://pastebin.com/2Ht3wxJb
>
> Any help appreciated.  TIA

Investigate the reason of disconnection. You can
1) increase ffmpeg verbosity with -loglevel debug, (+share the full
output with us there)
2) sniff the RTMP traffic and investigate it
3) check the logs of problematic remote Wowza, or ask its admins to do
that. BTW compare involved Wowza instances' versions.
Good luck.

-- 
Andrey Utkin


More information about the ffmpeg-user mailing list