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

Fix video streaming #4

Closed
vgarleanu opened this issue Feb 14, 2021 · 1 comment · Fixed by #43
Closed

Fix video streaming #4

vgarleanu opened this issue Feb 14, 2021 · 1 comment · Fixed by #43
Assignees
Labels
A-backend Anything to do with the backend (dim server) A-ui Area: User Interface T-bug Something isn't working the way it is supposed to

Comments

@vgarleanu
Copy link
Member

vgarleanu commented Feb 14, 2021

Currently video.js is very picky about streams. Streaming with nightfall works fine in MPV and Vlc, however its partially broken in browsers and more specifically video.js.

This is because video.js is very strict about segment continuity. Because of this seeking doesnt work, and hard timeouts (ffmpeg getting killed after a timeout instead of being issues a SIGSTP) have to be disabled. On further inspection video.js crashes because when ffmpeg is restarted with a new timestamp offset, the fragments it outputs also have a timestamp offset that is reset to 0, and because init.mp4 is never reloaded by videojs automatically video.js thinks that the segment requested is actually older than it is, thus it tries to fetch the next segment infinitely until it gets a valid segment timestamp offset.

We can fix this two ways, either we patch video.js to be more lenient, or when we seek in a non-transcoded region we restart video.js and reload the dash manifest (this needs to be paired with soft-timeouts for transcoding sessions).

@vgarleanu
Copy link
Member Author

Perhaps we could open a issue on the video.js repo and ask the developers if there is a better way to handle this.

@vgarleanu vgarleanu added A-backend Anything to do with the backend (dim server) T-bug Something isn't working the way it is supposed to A-ui Area: User Interface labels Feb 16, 2021
@vgarleanu vgarleanu linked a pull request Mar 23, 2021 that will close this issue
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend Anything to do with the backend (dim server) A-ui Area: User Interface T-bug Something isn't working the way it is supposed to
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants