Wowza Community

A confusing array of differences when using Xuggler

So, I’ve got to have a solution where I can take output from the FlashPlayer Microphone and Camera, produce Live Video and (at least) VOD for Flash and IOS. Until a Transcoder for Wowza 3, or until Adobe updates FlashPlayer, that means Transcoding is a DIY project.

The tool that seems right for the job is XUGGLER with ffmpeg.

The news on the streets is that using ffmpeg to transcode the FLV stream is awful - it is awful. What’s odd though is that the Converter.java example that is a kind of example stand-in for ffmpeg generates files that aren’t awful. This is strange in that most of the code is supposed to be the same.

The ffmpeg args are like this generate a poor video:

ffmpeg -i rtmp://localhost/live/vrtest -acodec libfaac -y vrtest.mov

The Converter.java args are like this generate a nice video:

java Converter -vquality 0 -acodec libfaac rtmp://localhost/live/vrtest file://Users/myHome/tmp/vrtest.mov

What gets stranger is that when I use LiveStreamRecord module to save the output from FlashPlayer on the Live stream, the output can’t be processed by the Converter class if I save it with startOnKeyFrame set to true with the following errors:

16:49:10.627 [main] ERROR org.ffmpeg - [flv @ 0x10300e800] Bad picture start code
16:49:10.632 [main] ERROR org.ffmpeg - [flv @ 0x10300e800] header damaged
Error: could not decode any video.  stream: 0

Strangely, this doesn’t happen when I use FlashLiveEncoder with similar settings to what the FlashPlayer is putting out. Using FlashLiveEncoder is not a solution for me and I’ve got to start with a complete frame (which you don’t get without using startOnKeyFrame).

Any suggestions would be appreciated.

Thanks,

Leo

I don’t have any more suggestions on this, which is same as several other posts that I have responded to.

Richard

Thanks for even getting back to this Richard…

I was hoping that someone might have come across this with Xuggler. FWIW - the same thing with the video header happens if I use the dvr_origin app of FMS.

The sad, sad, and might I add, unsatisfying solution is the following:

  • write a server that recognizes when a new FLV stream has been created - e.g. through file creation detection - other means are possible

  • make the server attach to the stream via rtmp and use the Java Xuggler API to transcode to MP4 with AAC/H.264 encoding

    The quality is far better than ffmpeg doing the same. If anyone has settings for ffmpeg that produce good quality output, I’d love to hear about it.

    The problem with this solution, IMO, is that its super kludgey and not, what i’d expect to be robust for a commercial service. Still, it could be a reasonable stop-gap measure.

    If anyone is interested in this solution, I’d be happy to consider sharing if I’m contacted directly.

    Cheers,

    Leo O’Donnell

    BigLifeLabs.com

    @leosbiglife