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

HLS: Defective videos in cache #91

Closed
nschlia opened this issue Oct 9, 2021 · 1 comment
Closed

HLS: Defective videos in cache #91

nschlia opened this issue Oct 9, 2021 · 1 comment
Assignees
Labels

Comments

@nschlia
Copy link
Owner

nschlia commented Oct 9, 2021

Sometimes videos are garbled. Happens when playback is skipped several times. Obviously the cache gets corrupted, as the video then is defective if played on any device. To restore it, the cached file directory must be manually deleted.

Probable reason:

Whenever playback is skipped to a new position, the cache gets invalidated and the file should be transcoded from scratch next time it is accessed. It seems that does not work as intended. Probably the cache should be deleted when the file is closed instead of simply marking it invalid. That would make double sure no remains get illegally incorporated.

@nschlia nschlia added the bug label Oct 9, 2021
@nschlia nschlia self-assigned this Oct 9, 2021
@nschlia
Copy link
Owner Author

nschlia commented Nov 13, 2021

Confirmed:

To reproduce, start playback a few seconds into the file. Then restart playback. All segments starting at this position are corrupted.

Example:

  1. Started playback at 51 seconds (segment size 6 seconds). Log reports "Performing seek request to HLS segment no. 17."
  2. File plays well until the end. Log reports "Transcoding completed successfully." File is tagged incomplete in database. OK so far.
  3. Restart playback from the beginning. File plays properly for the first 51 seconds, playback jumps after this position (starting with segment 17).

A look in the cache shows that all files from segment 17 up are too large!

Obviously the transcoding is restarted, this is correct, but the cache is not deleted/overwritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant