Output of mediafilesegmenter generates warnings in mediastreamvalidator (and break streaming in iOS 7)
| Originator: | clozach | ||
| Number: | rdar://15060374 | Date Originated: | 9/23/2013 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Serious Bug | Reproducible: | YES |
Summary:
The output from mediafilessegmenter is behaving differently in iOS 7 than it does in iOS 6, with a decidedly worse experience for our customers. The problem is intermittent and possibly related to track length.
Just a hypothesis, but perhaps if there's only a sliver of audio left over when the segmenting's done, that final sliver doesn't work right? This hypothesis comes from a response I got in the forums: https://devforums.apple.com/message/895656#895656
Steps to Reproduce:
1. Encode .mp3 in preparation for streaming. We've been doing this for 2 years without issue for Band of the Day, so I'll skip the details for now.
2. Segment & upload the .mp3:
> mediafilesegmenter -t 10 --generate-variant-plist -f <segments_dir> <encoded_mp3>
# followed by our usual uploading script, which seems to be working fine
3. Validate the uploaded playlist:
> mediastreamvalidator --verbose <url_of_playlist.m3u8>
4. Play stream for problem track.
Expected Results:
Expected (Step 3): no warnings from validator. This is the case for most of our tracks. But, given that there _are warnings from the validator, we expect in iOS 6...
Expected (Step 4): We're using AVQueuePlayer. In iOS 6, when spitting out the AVPlayerItem's errorLog, we see 2 errors, then the track finishes normally and the AVQueuePlayer advances to the next track. Segment urls removed for brevity:
-12645 "CoreMediaErrorDomain" "No response for media file in 0.49632s"
-12318 "CoreMediaErrorDomain" "Segment exceeds specified bandwidth for variant"
Actual Results:
Actual (Step 3, only on badly-segmented tracks):
WARNING: Media segment bandwidth exceeded target playlist bandwidth by 2080 % ( 5.43 Mbits/sec vs.249.18 kbits/sec, limit is 10 %).
WARNING: Media segment exceeds target duration of 0.50 seconds by 10.00 seconds (segment duration is 10.50 seconds)
These warnings aren't inherently problematic. As mentioned, in iOS 6, the offending tracks merely skipped ahead to the next track. We didn't even know the problem existed, until...
Actual (Step 4): In iOS 7, same track, the "no response" error keeps firing without end and AVQueuePlayer never advances to the next track:
-12645 "CoreMediaErrorDomain" "No response for media file in 0.528s"
-12645 "CoreMediaErrorDomain" "No response for media file in 0.528s"
-12645 "CoreMediaErrorDomain" "No response for media file in 0.528s"
-12645 "CoreMediaErrorDomain" "No response for media file in 0.528s"
-12645 "CoreMediaErrorDomain" "No response for media file in 0.528s"
-12645 "CoreMediaErrorDomain" "No response for media file in 0.528s"
-12318 "CoreMediaErrorDomain" "Segment exceeds specified bandwidth for variant"
-12645 "CoreMediaErrorDomain" "No response for media file in 0.528s"
-12645 "CoreMediaErrorDomain" "No response for media file in 0.528s"
-12645 "CoreMediaErrorDomain" "No response for media file in 0.528s"
... etc.
Version:
Xcode 5A1412
Notes:
Configuration:
iOS 7, both in simulator and on iPhone 5. Probably other hardware as well. Though, as mentioned above, we're concerned that there may be a bug in mediafilesegmenter that precludes the iOS 7 misbehavior.
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!