Mpv: ytdl options

Created on 20 Dec 2015  ·  3Comments  ·  Source: mpv-player/mpv

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 https://github.com/mpv-player/mpv/commit/78caf6ae8634b9fe9589187d8febb927dce2ddeb

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?

Most helpful comment

Ok. Figured it out. Forgot a pair of quotations

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

works

All 3 comments

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.

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.

Ok. Figured it out. Forgot a pair of quotations

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

works

Was this page helpful?
0 / 5 - 0 ratings