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

Specfying "^=" ("begin with" filter) in format selection doesn't seem to work #18002

Closed
mzso opened this issue Oct 28, 2018 · 4 comments
Closed

Specfying "^=" ("begin with" filter) in format selection doesn't seem to work #18002

mzso opened this issue Oct 28, 2018 · 4 comments
Labels

Comments

@mzso
Copy link

@mzso mzso commented Oct 28, 2018

Hi!

I get this:

youtube-dl --ignore-config -f bestvideo[vcodec^=avc]+bestaudio -o teszt.%(ext)s https://www.youtube.com/watch?v=Zpyxuf30pYc
[youtube] Zpyxuf30pYc: Downloading webpage
[youtube] Zpyxuf30pYc: Downloading video info webpage
ERROR: requested format not available

I have no idea, why wouldn't it work. It works with exact format codes such as vp9 or avc1.640028. So the filter fails I guess.

Format list:

[youtube] Zpyxuf30pYc: Downloading webpage
[youtube] Zpyxuf30pYc: Downloading video info webpage
[info] Available formats for Zpyxuf30pYc:
format code  extension  resolution note
249          webm       audio only DASH audio   52k , opus @ 50k, 1.24MiB
250          webm       audio only DASH audio   73k , opus @ 70k, 1.64MiB
171          webm       audio only DASH audio  107k , vorbis@128k, 2.41MiB
140          m4a        audio only DASH audio  130k , m4a_dash container, mp4a.40.2@128k, 3.19MiB
251          webm       audio only DASH audio  157k , opus @160k, 3.56MiB
160          mp4        256x144    144p   94k , avc1.4d400c, 29fps, video only, 1.55MiB
278          webm       256x144    144p  122k , webm container, vp9, 29fps, video only, 2.18MiB
242          webm       426x240    240p  223k , vp9, 29fps, video only, 3.90MiB
133          mp4        426x240    240p  229k , avc1.4d4015, 29fps, video only, 3.69MiB
243          webm       640x360    360p  407k , vp9, 29fps, video only, 7.13MiB
134          mp4        640x360    360p  461k , avc1.4d401e, 29fps, video only, 7.86MiB
244          webm       854x480    480p  690k , vp9, 29fps, video only, 10.93MiB
135          mp4        854x480    480p  929k , avc1.4d401f, 29fps, video only, 14.91MiB
247          webm       1280x720   720p 1194k , vp9, 29fps, video only, 19.42MiB
136          mp4        1280x720   720p 1620k , avc1.4d401f, 29fps, video only, 27.13MiB
137          mp4        1920x1080  1080p 2589k , avc1.640028, 29fps, video only, 40.76MiB
248          webm       1920x1080  1080p 2657k , vp9, 29fps, video only, 56.54MiB
17           3gp        176x144    small , mp4v.20.3, mp4a.40.2@ 24k, 1.88MiB
36           3gp        320x180    small , mp4v.20.3, mp4a.40.2, 5.21MiB
18           mp4        640x360    medium , avc1.42001E, mp4a.40.2@ 96k, 13.89MiB
43           webm       640x360    medium , vp8.0, vorbis@128k, 18.81MiB
22           mp4        1280x720   hd720 , avc1.64001F, mp4a.40.2@192k (best)

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 28, 2018

> py -3.4 .\youtube_dl\__main__.py --ignore-config -f bestvideo[vcodec^=avc]+bestaudio -o 'teszt.%(ext)s' https://www.youtube.com/watch?v=Zpyxuf30pYc
[youtube] Zpyxuf30pYc: Downloading webpage
[youtube] Zpyxuf30pYc: Downloading video info webpage
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: teszt.f137.mp4
[download] 100% of 40.76MiB in 00:05
[download] Destination: teszt.f251.webm
[download] 100% of 3.56MiB in 00:00
[ffmpeg] Merging formats into "teszt.mkv"
Deleting original file teszt.f137.mp4 (pass -k to keep)
Deleting original file teszt.f251.webm (pass -k to keep)
@dstftw dstftw closed this Oct 28, 2018
@mzso
Copy link
Author

@mzso mzso commented Oct 28, 2018

@dstftw commented on 2018. okt. 28. 19:04 CET:

> py -3.4 .\youtube_dl_main_.py --ignore-config -f bestvideo[vcodec^=avc]+bestaudio -o 'teszt.%(ext)s' https://www.youtube.com/watch?v=Zpyxuf30pYc
[youtube] Zpyxuf30pYc: Downloading webpage
[youtube] Zpyxuf30pYc: Downloading video info webpage
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: teszt.f137.mp4
[download] 100% of 40.76MiB in 00:05
[download] Destination: teszt.f251.webm
[download] 100% of 3.56MiB in 00:00
[ffmpeg] Merging formats into "teszt.mkv"
Deleting original file teszt.f137.mp4 (pass -k to keep)
Deleting original file teszt.f251.webm (pass -k to keep)

Well, I was using the latest exe it updated to (2018.10.05) and not a python script. So that's a difference:

youtube-dl -v
[debug] System config: []
[debug] User config: ['-f', '(bestvideo[vcodec=vp9]/bestvideo[vcodec^=avc]/bestvideo[vcodec!=vp8])[height<=1440]+(bestaudio[acodec=opus]/bes
taudio[acodec=vorbis]/bestaudio[acodec^=m4a]/bestaudio)/(best[vcodec=vp9]/best[vcodec^=avc]/best[vcodec!=vp8])[height<=1440]', '--ignore-err
ors', '--write-description', '--write-sub', '--write-thumbnail', '--sub-lang', 'en,en-GB,en-US,hu', '--no-playlist', '--no-mtime', '-o', '.\
\%(title)s.%(ext)s']
[debug] Custom config: []
[debug] Command-line args: ['-v']
[debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250
[debug] youtube-dl version 2018.10.05
[debug] Python version 3.4.4 (CPython) - Windows-8.1-6.3.9600
[debug] exe versions: ffmpeg N-91961-g5109c38162, ffprobe N-91961-g5109c38162, rtmpdump 2.4
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 28, 2018

Using exe makes no difference.

@lvqcl
Copy link

@lvqcl lvqcl commented Oct 28, 2018

IIRC ^ (caret) is a special character that allows to continue a command on next line.

Instead of
-f bestvideo[vcodec^=avc]+bestaudio
try this:
-f "bestvideo[vcodec^=avc]+bestaudio"
or
-f bestvideo[vcodec^^=avc]+bestaudio

@dstftw dstftw added the invalid label Oct 28, 2018
@ytdl-org ytdl-org locked and limited conversation to collaborators Oct 28, 2018
@dstftw dstftw removed the cant-reproduce label Oct 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.