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

How to download single file having specific resolution without ffmpeg #23805

Closed
lprc opened this issue Jan 21, 2020 · 2 comments
Closed

How to download single file having specific resolution without ffmpeg #23805

lprc opened this issue Jan 21, 2020 · 2 comments

Comments

@lprc
Copy link

@lprc lprc commented Jan 21, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

I'm using youtube-dl in an Android app and want to be able to specify the resolution of the video which should be downloaded from youtube. I know it's possible using e.g. format=bestvideo[height=360]+bestaudio however I don't have ffmpeg available on Android thus the video and audio files won't get merged. I tried to use format=best[height=360] but this only shows ERROR: requested format not available.

My question now is: Is it possible to filter by resolution only of the available single files (the files I get when I use -F)?

The example video I use:


> youtube-dl.exe -F https://www.youtube.com/watch?v=C0DPdy98e4c
[youtube] C0DPdy98e4c: Downloading webpage
[youtube] C0DPdy98e4c: Downloading video info webpage
[info] Available formats for C0DPdy98e4c:
format code  extension  resolution note
249          webm       audio only tiny   25k , opus @ 50k (48000Hz), 43.28KiB
250          webm       audio only tiny   38k , opus @ 70k (48000Hz), 59.42KiB
251          webm       audio only tiny   54k , opus @160k (48000Hz), 85.16KiB
140          m4a        audio only tiny  127k , m4a_dash container, mp4a.40.2@128k (44100Hz), 274.02KiB
278          webm       192x144    144p   27k , webm container, vp9, 13fps, video only, 52.21KiB
160          mp4        192x144    144p   37k , avc1.4d400b, 25fps, video only, 62.40KiB
133          mp4        320x240    240p   51k , avc1.4d400d, 25fps, video only, 85.11KiB
242          webm       320x240    240p   69k , vp9, 25fps, video only, 131.47KiB
134          mp4        480x360    360p   84k , avc1.4d4015, 25fps, video only, 138.98KiB
243          webm       480x360    360p  106k , vp9, 25fps, video only, 200.87KiB
135          mp4        640x480    480p  121k , avc1.4d401e, 25fps, video only, 197.65KiB
244          webm       640x480    480p  153k , vp9, 25fps, video only, 287.41KiB
43           webm       640x360    360p , vp8.0, vorbis@128k, 280.86KiB
18           mp4        480x360    360p  267k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 540.04KiB (best)
@lprc lprc added the question label Jan 21, 2020
@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jan 21, 2020

this command works fine:
youtube-dl -f 'best[height=360]' https://www.youtube.com/watch?v=C0DPdy98e4c

@lprc
Copy link
Author

@lprc lprc commented Jan 21, 2020

Whoops, I used single quotes on Windows for the format specifier. Apparently a bad idea, using double quotes works indeed. Maybe youtube-dl should include some check whether single quotes are used if the os is Windows instead of replying with a false error message.

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.