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

Format Selectors for Twitch.tv #15910

Closed
thisSIDEofRANDOM opened this issue Mar 19, 2018 · 2 comments
Closed

Format Selectors for Twitch.tv #15910

thisSIDEofRANDOM opened this issue Mar 19, 2018 · 2 comments

Comments

@thisSIDEofRANDOM
Copy link

@thisSIDEofRANDOM thisSIDEofRANDOM commented Mar 19, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.03.14. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.03.14

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other


If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):


Description of your issue, suggested solution and other information

Format for youtube format selection doesn't seem to work for twitch.

For example currently my format options are:

ytdl-format=bestvideo[height<=?480][fps<=?30][vcodec!=?vp9]+bestaudio/best

These work great on youtube however when using these with twitch it seems to always select the highest quality stream available.

youtube-dl -F https://www.twitch.tv/geekandsundry
[twitch:stream] geekandsundry: Downloading stream JSON
[twitch:stream] geekandsundry: Downloading channel access token
[twitch:stream] geekandsundry: Downloading m3u8 information
[info] Available formats for 27979143888:
format code     extension  resolution note
audio_only      mp4        audio only  129k , mp4a.40.2
160p            mp4        284x160     230k , avc1.77.31, mp4a.40.2
360p            mp4        640x360     630k , avc1.77.31, mp4a.40.2
480p            mp4        852x480    1395k , avc1.77.31, mp4a.40.2
720p            mp4        1280x720   2340k , avc1.77.31, mp4a.40.2
1080p__source_  mp4        1920x1080  3686k , avc1.640028, mp4a.40.2 (best)

Removing the 'bestvideo' and 'bestaudio/best' pieces seems to work for twitch so I was just curious if anyone was familiar with why the above settings work for youtube but not twitch.

youtube-dl --get-format -f "bestvideo[height<=?480][fps<=?30][vcodec!=?vp9]+bestaudio/best" https://www.twitch.tv/geekandsundry
1080p__source_ - 1920x1080
youtube-dl --get-format -f "[height<=?480][fps<=?30][vcodec!=?vp9]" https://www.twitch.tv/geekandsundry
480p - 852x480
@thisSIDEofRANDOM
Copy link
Author

@thisSIDEofRANDOM thisSIDEofRANDOM commented Mar 19, 2018

I think this might be solved by doing something like
"(bestvideo+bestaudio/best)[height<=?480][fps<=?30][vcodec!=?vp9]"

But was hoping to get others thoughts on this. Is the issue here that twitch has no audio only formats so its always picking the highest quality stream as the best "audio" format?

@thisSIDEofRANDOM
Copy link
Author

@thisSIDEofRANDOM thisSIDEofRANDOM commented Mar 19, 2018

Closing as reading documentation better helped me get what I needed.

Since twitch doesn't have a good way to gauge FPS on videos going by a combination of the above and also tbr helped me get a good balance for youtube/twitch without destroying my CPU for streamers with insane quality settings.

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.