Skip to content

Conversation

@yavuzKomecoglu
Copy link
Contributor

Resolves #3724

I have been using streamlink for more than 1 year and recording Youtube live streams. I started to have the same problem as of May 14, 2021. The PR I posted seems to solve the problem.

Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I can confirm that this solves the problem, at least with the video ID posted in #3724.

current master

$ streamlink -l debug 'youtube.com/watch?v=yZ7CWjuMCe8' best
[cli][debug] OS:         Linux-5.12.4-2-git-x86_64-with-glibc2.33
[cli][debug] Python:     3.9.5
[cli][debug] Streamlink: 2.1.1+16.g034173d
[cli][debug] Requests(2.25.1), Socks(1.7.1), Websocket(0.58.0)
[cli][debug] Arguments:
[cli][debug]  url=youtube.com/watch?v=yZ7CWjuMCe8
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --player=mpv
[cli][info] Found matching plugin youtube for URL youtube.com/watch?v=yZ7CWjuMCe8
[plugins.youtube][debug] Video ID from URL
[plugins.youtube][debug] Using video ID: yZ7CWjuMCe8
error: Unable to open URL: https://youtube.com/get_video_info (404 Client Error: Not Found for url: https://www.youtube.com/get_video_info?video_id=yZ7CWjuMCe8&el=detailpage)

this PR

$ streamlink -l debug 'youtube.com/watch?v=yZ7CWjuMCe8' best
[cli][debug] OS:         Linux-5.12.4-2-git-x86_64-with-glibc2.33
[cli][debug] Python:     3.9.5
[cli][debug] Streamlink: 2.1.1+17.g105cc24
[cli][debug] Requests(2.25.1), Socks(1.7.1), Websocket(0.58.0)
[cli][debug] Arguments:
[cli][debug]  url=youtube.com/watch?v=yZ7CWjuMCe8
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --player=mpv
[cli][info] Found matching plugin youtube for URL youtube.com/watch?v=yZ7CWjuMCe8
[plugins.youtube][debug] Video ID from URL
[plugins.youtube][debug] Using video ID: yZ7CWjuMCe8
[plugins.youtube][debug] get_video_info - 1: Found data
[plugins.youtube][debug] MuxedStream: v 299 a 251 = 1080p60
[plugins.youtube][debug] MuxedStream: v 302 a 251 = 720p60
[plugins.youtube][debug] MuxedStream: v 135 a 251 = 480p
[plugins.youtube][debug] MuxedStream: v 133 a 251 = 240p
[plugins.youtube][debug] MuxedStream: v 160 a 251 = 144p
[cli][info] Available streams: audio_mp4a, audio_opus, 144p (worst), 240p, 360p, 480p, 720p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (muxed-stream)
[stream.ffmpegmux][debug] Opening http substream
[stream.ffmpegmux][debug] Opening http substream
[utils.named_pipe][info] Creating pipe streamlinkpipe-93906-1-8141
[utils.named_pipe][info] Creating pipe streamlinkpipe-93906-2-5957
[stream.ffmpegmux][debug] ffmpeg command: ffmpeg -nostats -y -i /tmp/streamlinkpipe-93906-1-8141 -i /tmp/streamlinkpipe-93906-2-5957 -c:v copy -c:a copy -map 0 -map 1 -f matroska pipe:1
[stream.ffmpegmux][debug] Starting copy to pipe: /tmp/streamlinkpipe-93906-1-8141
[stream.ffmpegmux][debug] Starting copy to pipe: /tmp/streamlinkpipe-93906-2-5957
[cli][debug] Pre-buffering 8192 bytes
[cli][info] Starting player: mpv
[cli.output][debug] Opening subprocess: mpv --force-media-title=youtube.com/watch?v=yZ7CWjuMCe8 -
[cli][debug] Writing stream to output
[cli][info] Player closed
[stream.ffmpegmux][debug] Closing ffmpeg thread
[stream.ffmpegmux][debug] Pipe copy complete: /tmp/streamlinkpipe-93906-1-8141
[stream.ffmpegmux][error] Pipe copy aborted: /tmp/streamlinkpipe-93906-2-5957
[stream.ffmpegmux][debug] Closed all the substreams
[cli][info] Stream ended
[cli][info] Closing currently open stream...

If nobody has any further comments, I'm going to merge this a bit later today.

@bastimeyer bastimeyer added PR: needs commit message fix PR: squash commits Commits need to be squashed as a single commit - eg. multiple commits for a single component labels May 19, 2021
@yavuzKomecoglu
Copy link
Contributor Author

Thanks for the test. I hope it will be the definitive solution.

@bastimeyer bastimeyer changed the title plugins.youtube: Add html5=1 parameter to avoid Youtube 404 Client Error: Unable to open URL: https://youtube.com/get_video_info plugins.youtube: add html5=1 parameter May 19, 2021
@bastimeyer bastimeyer merged commit 46c1776 into streamlink:master May 19, 2021
@scottbernstein
Copy link

scottbernstein commented May 19, 2021 via email

@bastimeyer
Copy link
Member

Yes, we can do that. I will open a PR with a changelog for a new patch release tomorrow.

Billy2011 pushed a commit to Billy2011/streamlink-27 that referenced this pull request May 20, 2021
Billy2011 pushed a commit to Billy2011/streamlink-27 that referenced this pull request Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin issue A Plugin does not work correctly PR: needs commit message fix PR: squash commits Commits need to be squashed as a single commit - eg. multiple commits for a single component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugins.youtube Receiving "Unable to open URL: https://youtube.com/get_video_info" when trying to do --retry-streams after a few retry attempts.

3 participants