3

So using ffmpeg

/usr/local/bin/ffmpeg -i track.m4a -vn -c:a aac -b:a 192k  -f segment -segment_list 93_jrf2niqb7n2s8pzjopkqvbbw1wmzz3foqrsa93bm.m3u8 -segment_time 120 -segment_format_options movflags=faststart  93_jrf2niqb7n2s8pzjopkqvbbw1wmzz3foqrsa93bm.%03d.m4a

a playlist file is created where

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:121
#EXTINF:120.000726,
93_jrf2niqb7n2s8pzjopkqvbbw1wmzz3foqrsa93bm.000.m4a
#EXTINF:119.883175,
93_jrf2niqb7n2s8pzjopkqvbbw1wmzz3foqrsa93bm.001.m4a
#EXT-X-ENDLIST

Then using mediastreamvalidator I get the following output which leads me to believe there are errors which I have no idea how to fix. I am assuming that ffmpeg is jacking up the segmenting.

mediastreamvalidator http://**OMIT**/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8
mediastreamvalidator: Version 1.2(160525)

[/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8] Started root playlist download
[/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8] Started media playlist download
Error injecting segment data
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
Can't deal with multiple sample timings per sample buffer
[/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8] All media files delivered and have end tag, stopping

--------------------------------------------------------------------------------
http://**OMIT**/AMP/1/92_y7lu9u1qy5wsw2fqn61mankqof7lkuu5qvk7asv5.m3u8
--------------------------------------------------------------------------------
Processed 1 out of 2 segments
Average segment duration: 119.941950
Total segment bitrates (all discontinuities): average: 130.88 kb/s, max: 131.25 kb/s


Discontinuity: sequence: 0, parsed segment count: 1 of 2, duration: 239.884 sec, average: 130.88 kb/s, max: 131.25 kb/s
Track ID: 1
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channel layout: Stereo (L R)

So, my question is what is "Error injecting segment data" and "Can't deal with multiple sample timings per sample buffer" and why is the segment messed up?

1 Answers1

0

i also hit this two errors in mediaStreamValidator and managed to fix them

1) "Can't deal with multiple sample timings per sample buffer" - this happens with fMP4 chunks when sample duration is set "per sample". mediaStreamValidator require to use default sample duration, equal for all track samples in chunk, there is special flag in track-related atom for this

2) "Error injecting segment data" - means validator WAS NOT ABLE to download chunk for analyze. Not because of network problems, but for some other reasons.

In my case, m3u8 contained #EXT-X-BYTERANGE and #EXT-X-MAP:URI...BYTERANGE tags. And i used SimpleHTTPServer for testing purposes locally (python oneliner, popular in MacOS). And turned out SimpleHTTPServer works badly with ranged requests, serving such files without proper ranging. So validator got full chunks instead of byteranged data.

After switching to node.js http-server instead of SimpleHTTPServer error immediately gone

IPv6
  • 405
  • 4
  • 17