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

ytdl options #2619

Closed
beew opened this issue Dec 20, 2015 · 4 comments
Closed

ytdl options #2619

beew opened this issue Dec 20, 2015 · 4 comments

Comments

@beew
Copy link

beew commented Dec 20, 2015

Hi, I need some clarifications for youtube-dl options for the latest mpv.

I have been using up to mpv-0.11.0 the option --ytdl-format=bestvideo[ext=mp4][width<=1920][height<=1080]+bestaudio[ext=m4a] for 1080p Dash videos for youtube. There have been some changes since mpv 0.12.0 because of 78caf6a

Now my mpv and ffmpeg versions are

mpv --version
mpv git-c019359 (C) 2000-2015 mpv/MPlayer/mplayer2 projects
 built on Sun Dec 20 03:01:15 EST 2015
ffmpeg library versions:
   libavutil       54.31.100
   libavcodec      56.60.100
   libavformat     56.40.101
   libswscale      3.1.101
   libavfilter     5.40.101
   libswresample   1.2.101
ffmpeg version: 2.8.3-1~wily

I am under the impression that --ytdl-format=best would automatically play dash videos in 1080p or above on Youtube now . But I find that I still need the --ytdl-format=bestvideo+bestaudio, --ytdl-format=best just plays in 720p. Am I missing something

Also the options [height<=] and [width <=] no longer works, are there ways to limit the resolution to under 1080p?

@AirPort
Copy link

AirPort commented Dec 20, 2015

I am under the impression that --ytdl-format=best would automatically play dash videos in 1080p or above on Youtube now . But I find that I still need the --ytdl-format=bestvideo+bestaudio, --ytdl-format=best just plays in 720p. Am I missing something

AFAIK the best format selects the best non-DASH option, in this case the 720p one, while bestvideo+bestaudio (which is youtube-dl's and mpv's default for quite some time now) selects the best one overall, so everything seems working as intended.

@kevinlekiller
Copy link

Run youtube-dl --list-formats with a URL of a 1080p video, you will see a list of supported formats for that video.

You then do something like this: --ytdl-format=137+140 to use 1080p 24/25/30fps mp4 avc1 video with 128k m4a aac audio.

You can add fallbacks: --ytdl-format=137+140/137+171/best for example to fall back on webm vorbis audio and fall back on 720p (best) if none of the previous combinations were found. You can add as many fallbacks as you want.

299 is 1080p 50/60 fps mp4 h264, 303 1080p is 50/60fps webm vp9 for example.

@beew
Copy link
Author

beew commented Dec 21, 2015

Ok. Figured it out. Forgot a pair of quotations

--ytdl-format='bestvideo[ext=mp4][width<=1920][height<=1080]+bestaudio[ext=m4a]' 

works

@beew beew closed this as completed Dec 21, 2015
@Theo1996
Copy link

Theo1996 commented May 15, 2024

its double quotes on windows cmd --ytdl-format="bestvideo[ext=mp4][width<=1920][height<=1080]+bestaudio[ext=m4a]"

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

No branches or pull requests

4 participants