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

Add support for loading the owncast URL in mpv #1356

Merged
merged 2 commits into from Aug 31, 2021
Merged

Add support for loading the owncast URL in mpv #1356

merged 2 commits into from Aug 31, 2021

Conversation

MFTabriz
Copy link
Contributor

@MFTabriz MFTabriz commented Aug 29, 2021

mpv first tries to load the URL with the user-agent set as a typical browser. The returned page gets parsed with the yt-dl. In this phase we cannot detect/intercept it.

In case of failure in the first step, mpv will load the same URL with the user-agent set as “mpv” and pipes the result directly into ffmpeg. If we redirect it to the bot page here, ffmpeg will not be able to parse the html page and extract the hls link. But instead we can just redirect it to the hls link and ffmpeg should handle the rest.

PS: +Bonus VLC support! 😎

@MFTabriz MFTabriz requested a review from nebunez August 29, 2021 13:51
@MFTabriz MFTabriz marked this pull request as draft August 31, 2021 12:44
@MFTabriz MFTabriz marked this pull request as ready for review August 31, 2021 13:18
@MFTabriz MFTabriz changed the title add mpv useragent to the bots list Add support for loading the owncast URL in mpv Aug 31, 2021
@gabek
Copy link
Member

gabek commented Aug 31, 2021

🥇

@gabek gabek merged commit e8e21ca into owncast:develop Aug 31, 2021
@gabek gabek added this to the v0.0.9 - Bug fix release milestone Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants