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