Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching wrong byte range for HLS with fMP4 using BYTERANGE #925

Closed
rkuroiwa opened this issue Jul 13, 2017 · 2 comments
Closed

Fetching wrong byte range for HLS with fMP4 using BYTERANGE #925

rkuroiwa opened this issue Jul 13, 2017 · 2 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@rkuroiwa
Copy link

Have you read the FAQ and checked for duplicate issues:
yes. I don't see a duplicate.

What version of Shaka Player are you using:
Shaka Player v2.1.0-117-gaf252c9-debug
at https://nightly-dot-shaka-player-demo.appspot.com/demo

Can you reproduce the issue with our latest release version:
N/A

Can you reproduce the issue with the latest code from master:
N/A

Are you using the demo app or your own custom app:
Demo app.

If custom app, can you reproduce the issue using our demo app:
N/A

What browser and OS are you using:
Linux with Chrome
Version 59.0.3071.115 (Official Build) (64-bit)

What are the manifest and license server URIs:
(you can send the URIs to [email protected] instead, but please use GitHub and the template for the rest)
HLS manifest at: https://storage.googleapis.com/wvtemp/rkuroiwa/hls_single_segment/single_segment.m3u8

(Just for comparison and repro) MPD manifest at: https://storage.googleapis.com/wvtemp/rkuroiwa/hls_single_segment/sintel_mpd_hls_compare.mpd

What did you do?
Used the HLS manifest and watched the network dev console.

What did you expect to happen?
For the second segment, the player fetched this (copy pasting HTTP request headers)
range:bytes=11316324-14165510

Where as it should be:
range:bytes=11316325-14165511

Looks like there is off by 1 error.
If you use the MPD manifest you get the second HTTP headers.

Although I see 3016 error, the MPD and the HLS playlist point to the same media file, so it looks like shaka-player is not appending the right buffer.

What actually happened?
Fetch range is "range:bytes=11316324-14165510"

Also the playback stops with an error after playing for 2 seconds.
It seems like after the first 2 seconds, the player tries to append the second subsegment to MSE.
The message in the console looks like this
"Shaka Error MEDIA.VIDEO_ERROR (3,,CHUNK_DEMUXER_ERROR_APPEND_FAILED: Append: stream parsing failed. Data size=131072 append_window_start=0 append_window_end=888.04)"

@ismena ismena self-assigned this Jul 24, 2017
@ismena ismena added type: bug Something isn't working correctly and removed needs triage labels Jul 24, 2017
@ismena
Copy link
Contributor

ismena commented Jul 24, 2017

@rkuroiwa Thanks a lot for such a detailed repro that potentially saved me hours of debugging!
I think it is indeed an off by 1 error and will start working on the fix right away.

@joeyparrish joeyparrish added this to the v2.2.0 milestone Jul 25, 2017
joeyparrish pushed a commit that referenced this issue Jul 25, 2017
The BYTERANGE attribute on an hls playlist can either specify
start of the byterange and length or length only. If start
of the range is not specified, it means that the segment starts
right after the previous one, which means (prevSegment.endByte +
1). We used to have it as prevSegment.endByte instead.

Closes #925.

Change-Id: I207ed73dead7cba2c93587a00a519de5b5164f03
@joeyparrish
Copy link
Member

The fix has been cherry-picked for v2.1.6.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants