# Live Stream mp4 recording is corrupted due to additional track with AMF data?

**URL:** https://community.wowza.com/t/live-stream-mp4-recording-is-corrupted-due-to-additional-track-with-amf-data/46925
**Category:** Wowza Streaming Engine
**Created:** [April 21, 2016, 7:05pm UTC](https://community.wowza.com/t/live-stream-mp4-recording-is-corrupted-due-to-additional-track-with-amf-data/46925 "2016-04-21T19:05:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Benjamin\_Fitzgerald](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@Benjamin\_Fitzgerald](https://community.wowza.com/u/Benjamin_Fitzgerald)
#### Post date: [April 21, 2016, 7:05pm UTC](https://community.wowza.com/t/live-stream-mp4-recording-is-corrupted-due-to-additional-track-with-amf-data/46925/1 "2016-04-21T19:05:16Z")

</div>

I am writing an Android encoder that publishes live streams to Wowza. I would like the playback the recorded mp4 streams in Windows and Mac native clients (WMP and Quicktime respectively) yet the file is corrupted. The file plays back fine in VLC but in both WMP/Quicktime the file will stop playing at random points, become unseekable, or the audio will stop. I have used ffmpeg to look at working and corrupted files and have found that Wowza is adding a third track to the mp4 container. I am not sure what this track is or how it got there, it might be streaming metadata but in any case removing it fixes the file. My encoder is only sending an audio and video track which leads me to believe Wowza is adding the third track. Here is the ffmpeg output of the THIRD track only (it looks like it may contain some AMF data?).

./ffprobe -show\_streams file.mp4

[STREAM]

index=2

codec\_name=unknown

codec\_long\_name=unknown

profile=unknown

codec\_type=data

codec\_time\_base=0/1

codec\_tag\_string=amf0

codec\_tag=0x30666d61

id=N/A

r\_frame\_rate=0/0

avg\_frame\_rate=0/0

time\_base=1/1000

start\_pts=0

start\_time=0.000000

duration\_ts=213348

duration=213.348000

bit\_rate=N/A

max\_bit\_rate=N/A

bits\_per\_raw\_sample=N/A

nb\_frames=2

nb\_read\_frames=N/A

nb\_read\_packets=N/A

DISPOSITION:default=1

DISPOSITION:dub=0

DISPOSITION:original=0

DISPOSITION:comment=0

DISPOSITION:lyrics=0

DISPOSITION:karaoke=0

DISPOSITION:forced=0

DISPOSITION:hearing\_impaired=0

DISPOSITION:visual\_impaired=0

DISPOSITION:clean\_effects=0

DISPOSITION:attached\_pic=0

TAG:creation\_time=2016-04-22 02:06:39

TAG:language=eng

TAG:handler\_name=WowzaStreamingEngine

[/STREAM]

./ffprobe -i file.mp4

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc95c00a200] Invalid SampleDelta -449 in STTS, at 4001 st:1

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc95c00a200] Invalid SampleDelta -90 in STTS, at 4152 st:1

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc95c00a200] multiple fourcc not supported

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘…/motopure-broken.mp4’:

Metadata:

major\_brand : f4v

minor\_version : 0

compatible\_brands: isommp42m4v

creation\_time : 2016-04-22 02:06:39

Duration: 00:03:33.35, start: 0.000000, bitrate: 1051 kb/s

Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 1024 kb/s, 14.98 fps, 15 tbr, 90k tbn, 180k tbc (default)

Metadata:

creation\_time : 2016-04-22 02:06:39

handler\_name : WowzaStreamingEngine

encoder : WowzaStreamingEngine

Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 22 kb/s (default)

Metadata:

creation\_time : 2016-04-22 02:06:39

handler\_name : WowzaStreamingEngine

Stream #0:2(eng): Data: none (amf0 / 0x30666D61) (default)

Metadata:

creation\_time : 2016-04-22 02:06:39

handler\_name : WowzaStreamingEngine

---

<div class="post-metadata">

### Author: ![Andy\_Engberson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/andy_engberson/32/392_2.png) [@Andy\_Engberson](https://community.wowza.com/u/Andy_Engberson)
#### Post date: [April 24, 2016, 11:46pm UTC](https://community.wowza.com/t/live-stream-mp4-recording-is-corrupted-due-to-additional-track-with-amf-data/46925/2 "2016-04-24T23:46:54Z")

</div>

Hi Benjamin,

This was handled in the created support ticket (168093). I see that you reported finding a solution:

> The resolution was to change a couple settings for Streams in the Manager. I turned off MP4WriteData/MP4WriteMetaData and that fixed the issue with recordings.
