option to skip corrupted segments?
Nobody has claimed this yet.
- Dominant language
- ActionScript
- Stars
- 744
- Forks
- 259
- PR merge metrics
- No merged PRs in 30d
Description
Hi folks. So, we're running into an odd issue with Akamai HDN. If you're not familiar with Akamai HDN, it's a service Akamai provides where you can upload MPEG4s and Akamai will dynamically package them into HLS for you. It uses a fixed segment size, usually 10 seconds per segment. However, there's a known issue in Akamai where if you give a file that's, say, 30.026 seconds long, Akamai will return 3 good 10 second chunks for the first segments, and then a corrupted fourth chunk for the small leftover component.
You can see that in action here:
http://link.theplatform.com/s/LOdVRC/7O8SCwzDlbpZ/master.m3u8?format=redirect&manifest=m3u
This is a 30 second and change asset, and when you look at the video variant, the fourth and final segment is corrupted. Note that this is an HLS v2 configuration, but that isn't the issue: we see the same exact thing in a v3 configuration.
If you play this in an iOS client or Mac Safari, those clients will skip the busted segment and playback can continue. However, with flashls, the following error gets thrown:
[Mon Nov 02 2015 08:58:20 GMT-0800 (Pacific Standard Time)] onError():error code:6 url:http://tpr205471def-vh.akamaihd.net/i/,Tech_Summit_2014_-_UX/632/555/151030_2929503_Cloud_9__Home_for_Halloween_Savings_mpx_896.mp4,.csmil/segment4_0_av.ts?null= message:error parsing fragment, no tag found
And playback stops.
You can repro this by pasting http://link.theplatform.com/s/LOdVRC/7O8SCwzDlbpZ/master.m3u8?format=redirect&manifest=m3u into http://www.flashls.org/latest/examples/chromeless/ and starting playback.
So, there's no expectation flashls could play this, because it's corrupted: but the hope is that flashls could add an "ignore decode errors" mode where if a given segment is bad, it just skips over it to play the next, for parity with iOS. Flashls has great handling for I/O errors (timeouts, 404s), but this isn't an I/O error. And in this case, it's not an option to fix the HLS stream: this is an inherent issue with Akamai HDN whenever the length of the file ends up being a multiple of 10 seconds plus a small fractional component that the HLS returns a bad final segment. It gets ignored in iOS and Mac Safari: we just want it to be optionally ignored in flashls as well.
Thanks, and feel free to add comments if you need additional clarification.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure through the flashls chromeless example using the linked Akamai HLS manifest, and inspect the existing handling for fragment parsing errors versus I/O errors. Done means an optional ignore-decode-errors mode can skip a corrupted segment and continue playback without changing the default behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- audio-video-rtc
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100