# A confusing array of differences when using Xuggler

**URL:** https://community.wowza.com/t/a-confusing-array-of-differences-when-using-xuggler/37228
**Category:** Wowza Streaming Engine
**Created:** [September 5, 2011, 4:06pm UTC](https://community.wowza.com/t/a-confusing-array-of-differences-when-using-xuggler/37228 "2011-09-05T16:06:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Leopold\_O\_Donnell](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@Leopold\_O\_Donnell](https://community.wowza.com/u/Leopold_O_Donnell)
#### Post date: [September 5, 2011, 4:06pm UTC](https://community.wowza.com/t/a-confusing-array-of-differences-when-using-xuggler/37228/1 "2011-09-05T16:06:57Z")

</div>

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:

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

```

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

```auto
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:

```auto
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

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [September 6, 2011, 2:22am UTC](https://community.wowza.com/t/a-confusing-array-of-differences-when-using-xuggler/37228/2 "2011-09-06T02:22:05Z")

</div>

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

Richard

---

<div class="post-metadata">

### Author: ![Leopold\_O\_Donnell](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@Leopold\_O\_Donnell](https://community.wowza.com/u/Leopold_O_Donnell)
#### Post date: [September 6, 2011, 11:36am UTC](https://community.wowza.com/t/a-confusing-array-of-differences-when-using-xuggler/37228/3 "2011-09-06T11:36:27Z")

</div>

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
