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

Strange selection of video format #18928

Closed
Xan-Kun opened this issue Jan 20, 2019 · 3 comments
Closed

Strange selection of video format #18928

Xan-Kun opened this issue Jan 20, 2019 · 3 comments

Comments

@Xan-Kun
Copy link

@Xan-Kun Xan-Kun commented Jan 20, 2019

First of all: thanks for the great software!
I am not sure if this is a bug or if I just misunderstand the video format selection process

  • I've verified and I assure that I'm running youtube-dl 2019.01.17
    (double-checked :-) )

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

Output A (for [height<=?1080])

youtube-dl --config-location _f.youtube-dl-config "https://www.youtube.com/watch?v=va-To7-7hx8"
[debug] System config: []
[debug] User config: []
[debug] Custom config: ['--ignore-errors', '-o', '%(uploader)s_%(title)s.%(ext)s', '-v', '-f', 'bestvideo[vcodec!=av01][height<=?1080]+bestaudio/best', '--yes-playlist', '--merge-output-format', 'mkv', '--console-title', '--buffer-size', '2048']
[debug] Command-line args: ['--config-location', '_f.youtube-dl-config', 'https://www.youtube.com/watch?v=va-To7-7hx8']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2019.01.17
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-89803-g856b7cae9f, ffprobe N-89803-g856b7cae9f
[debug] Proxy map: {}
[youtube] va-To7-7hx8: Downloading webpage
[youtube] va-To7-7hx8: Downloading video info webpage
[debug] Invoking downloader on 'https://r1---sn-h0jeeney.googlevideo.com/videoplayback?expire=1547972950&c=WEB&ei=9txDXPT_B5b27gPG6bLYCQ&lmt=1544671845494833&clen=107754334&key=yt6&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397%2C398&txp=5535432&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&gir=yes&requiressl=yes&mt=1547950437&keepalive=yes&ipbits=0&source=youtube&mv=u&mime=video%2Fmp4&signature=8F1D4BF85247A09B7B0E9E25771D06B0459749B7.250D0ED4740F143A024F74D74172471DBC7D8168&ms=au%2Conr&fvip=6&dur=900.066&id=o-AMpG9QgeFXKFMrS_GgQRl7f90bYQr2_QbKsSoCwVgT8X&pl=26&itag=137&ip=217.231.203.237&mm=31%2C26&mn=sn-h0jeeney%2Csn-4g5e6ne6&ratebypass=yes'
[download] Destination: Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f137.mp4
[download] 100% of 102.76MiB in 01:48
[debug] Invoking downloader on 'https://r1---sn-h0jeeney.googlevideo.com/videoplayback?expire=1547972950&c=WEB&ei=9txDXPT_B5b27gPG6bLYCQ&lmt=1544686064214677&clen=14345328&key=yt6&txp=5511222&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&gir=yes&requiressl=yes&mt=1547950437&keepalive=yes&ipbits=0&source=youtube&mv=u&mime=audio%2Fwebm&signature=5EE6F8BF121CF5A7B468116FC773418E12907A02.D52424A97EE93F4ED5BE96892E4E617BE72E1EDF&ms=au%2Conr&fvip=6&dur=900.101&id=o-AMpG9QgeFXKFMrS_GgQRl7f90bYQr2_QbKsSoCwVgT8X&pl=26&itag=251&ip=217.231.203.237&mm=31%2C26&mn=sn-h0jeeney%2Csn-4g5e6ne6&ratebypass=yes'
[download] Destination: Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f251.webm
[download] 100% of 13.68MiB in 00:15
[ffmpeg] Merging formats into "Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.mkv"
[debug] ffmpeg command line: ffmpeg -y -i "file:Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f137.mp4" -i "file:Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f251.webm" -c copy -map "0:v:0" -map "1:a:0" "file:Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.temp.mkv"
Deleting original file Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f137.mp4 (pass -k to keep)
Deleting original file Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f251.webm (pass -k to keep)

Output B (for [height<=?720])

youtube-dl --config-location _f.youtube-dl-config "https://www.youtube.com/watch?v=va-To7-7hx8"
[debug] System config: []
[debug] User config: []
[debug] Custom config: ['--ignore-errors', '-o', '%(uploader)s_%(title)s.%(ext)s', '-v', '-f', 'bestvideo[vcodec!=av01][height<=?720]+bestaudio/best', '--yes-playlist', '--merge-output-format', 'mkv', '--console-title', '--buffer-size', '2048']
[debug] Command-line args: ['--config-location', '_f.youtube-dl-config', 'https://www.youtube.com/watch?v=va-To7-7hx8']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2019.01.17
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-89803-g856b7cae9f, ffprobe N-89803-g856b7cae9f
[debug] Proxy map: {}
[youtube] va-To7-7hx8: Downloading webpage
[youtube] va-To7-7hx8: Downloading video info webpage
[debug] Invoking downloader on 'https://r1---sn-h0jeeney.googlevideo.com/videoplayback?fvip=6&ms=au%2Conr&source=youtube&mv=m&ip=217.231.203.237&key=yt6&lmt=1545022448481638&id=o-AEzRWwVPfODAumsPiSvm3kRM4P9W5CxrZGLap2pWcO2e&dur=900.066&mm=31%2C26&mn=sn-h0jeeney%2Csn-4g5e6ne6&txp=5532432&keepalive=yes&requiressl=yes&ipbits=0&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&mt=1547951468&c=WEB&initcwndbps=1120000&mime=video%2Fmp4&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397%2C398&signature=3D7ACDD7C907129D46255161C4EC5EC6B2EB7C46.D0200772B7E21352946C45F4C50F54178D486696&gir=yes&itag=398&clen=63847830&ei=z91DXPbpDo_ZgQfExbSwCw&pl=26&expire=1547973167&ratebypass=yes'
[download] Destination: Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f398.mp4
[download] 100% of 60.89MiB in 01:10
[debug] Invoking downloader on 'https://r1---sn-h0jeeney.googlevideo.com/videoplayback?fvip=6&ms=au%2Conr&source=youtube&mv=m&ip=217.231.203.237&key=yt6&lmt=1544686064214677&id=o-AEzRWwVPfODAumsPiSvm3kRM4P9W5CxrZGLap2pWcO2e&dur=900.101&mm=31%2C26&mn=sn-h0jeeney%2Csn-4g5e6ne6&txp=5511222&keepalive=yes&requiressl=yes&ipbits=0&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&c=WEB&initcwndbps=1120000&mime=audio%2Fwebm&mt=1547951468&signature=20C92DF7556D34E7C219B71EED340CB661FBF70B.0DE24F878070A3136E172BAD517280465C4F0B2A&gir=yes&itag=251&clen=14345328&ei=z91DXPbpDo_ZgQfExbSwCw&pl=26&expire=1547973167&ratebypass=yes'
[download] Destination: Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f251.webm
[download] 100% of 13.68MiB in 00:16
[ffmpeg] Merging formats into "Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.mkv"
[debug] ffmpeg command line: ffmpeg -y -i "file:Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f398.mp4" -i "file:Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f251.webm" -c copy -map "0:v:0" -map "1:a:0" "file:Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.temp.mkv"
Deleting original file Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f398.mp4 (pass -k to keep)
Deleting original file Whang!_The Internet's Most Notorious Shock Video - Tales From the Internet.f251.webm (pass -k to keep)

Output of --list-formats

youtube-dl --list-formats "https://www.youtube.com/watch?v=va-To7-7hx8"
[youtube] va-To7-7hx8: Downloading webpage
[youtube] va-To7-7hx8: Downloading video info webpage
[info] Available formats for va-To7-7hx8:
format code  extension  resolution note
249          webm       audio only DASH audio   62k , opus @ 50k, 5.82MiB
250          webm       audio only DASH audio   75k , opus @ 70k, 7.36MiB
171          webm       audio only DASH audio  114k , vorbis@128k, 10.95MiB
140          m4a        audio only DASH audio  131k , m4a_dash container, mp4a.40.2@128k, 13.89MiB
251          webm       audio only DASH audio  148k , opus @160k, 13.68MiB
394          mp4        256x144    144p   83k , av01.0.05M.08, 30fps, video only, 6.25MiB
160          mp4        256x144    144p  122k , avc1.4d400c, 30fps, video only, 3.93MiB
278          webm       256x144    144p  137k , webm container, vp9, 30fps, video only, 8.67MiB
395          mp4        426x240    240p  197k , av01.0.05M.08, 30fps, video only, 10.60MiB
242          webm       426x240    240p  215k , vp9, 30fps, video only, 9.67MiB
133          mp4        426x240    240p  227k , avc1.4d4015, 30fps, video only, 7.70MiB
396          mp4        640x360    360p  378k , av01.0.05M.08, 30fps, video only, 18.31MiB
243          webm       640x360    360p  403k , vp9, 30fps, video only, 15.66MiB
134          mp4        640x360    360p  466k , avc1.4d401e, 30fps, video only, 12.99MiB
244          webm       854x480    480p  684k , vp9, 30fps, video only, 21.61MiB
397          mp4        854x480    480p  700k , av01.0.05M.08, 30fps, video only, 30.04MiB
135          mp4        854x480    480p  761k , avc1.4d401f, 30fps, video only, 18.02MiB
136          mp4        1280x720   720p 1088k , avc1.4d401f, 30fps, video only, 25.99MiB
247          webm       1280x720   720p 1219k , vp9, 30fps, video only, 36.30MiB
398          mp4        1280x720   720p 1563k , av01.0.05M.08, 30fps, video only, 60.89MiB
248          webm       1920x1080  1080p 2645k , vp9, 30fps, video only, 111.20MiB
137          mp4        1920x1080  1080p 3190k , avc1.640028, 30fps, video only, 102.76MiB
17           3gp        176x144    small   73k , mp4v.20.3, mp4a.40.2@ 24k (22050Hz), 7.88MiB
36           3gp        320x180    small  212k , mp4v.20.3, mp4a.40.2 (22050Hz), 22.81MiB
43           webm       640x360    medium , vp8.0, vorbis@128k, 54.82MiB
18           mp4        640x360    medium  385k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 41.32MiB
22           mp4        1280x720   hd720  371k , avc1.64001F, mp4a.40.2@192k (44100Hz) (best)

When using bestvideo[vcodec!=av01][height<=?1080] (Output A) it downloads format 137 (avc1) as one would expect.

But when using bestvideo[vcodec!=av01][height<=?720] (Output B) it downloads format 398, which is av01 and should not happen because of [vcodec!=av01].

The expected behaviour would be the download of format 22, whicht is not av01 and <=720.

I also tried without the trailing /best but the results are exactly the same.

I am terribly sorry if I just understood something wrong (and possibly wasted someones time :-) ) but I tested this very thoroughly, read through the complete section of format selection again and could not find an explanation for the strange behaviour.

And most redundantly: Thank you all again so much for this incredible piece of software, it's keeping my whole family sane ;-)

P.S.: I actually use -f 'bestvideo[height<=?1080][vcodec!=av01][vcodec!=vp9]+bestaudio/best' but removed the vp9 exclusion and tried to change the order to make sure it has nothing to do with that.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 20, 2019

There is no such codec av01. You must either use its full name or "begins with" comparison.

@dstftw dstftw closed this Jan 20, 2019
@Xan-Kun
Copy link
Author

@Xan-Kun Xan-Kun commented Jan 20, 2019

Thanks for the answer. I just realized the name is actually av01.0.05M.08. Is there a "does not begin with" equivalent?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 20, 2019

Will be in the next version.

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
2 participants
You can’t perform that action at this time.