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

%() not being interpreted #18213

Closed
davekimble2 opened this issue Nov 17, 2018 · 3 comments
Closed

%() not being interpreted #18213

davekimble2 opened this issue Nov 17, 2018 · 3 comments
Labels

Comments

@davekimble2
Copy link

@davekimble2 davekimble2 commented Nov 17, 2018

Armbian 5.59 based on Debian Stretch (running on ARM64 architecture).
Why is %(title).%(ext) not creating a file of the right name ? It creates /home/username/videos/$(ext).mkv . It plays OK.

$ youtube-dl -v -o '/home/username/videos/%(title).%(ext)' https://www.youtube.com/watch?v=LrNsJrWL4kI
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-o', u'/home/username/videos/%(title).%(ext)', u'https://www.youtube.com/watch?v=LrNsJrWL4kI']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.11.07
[debug] Python version 2.7.13 (CPython) - Linux-4.14.70-sunxi64-aarch64-with-debian-9.6
[debug] exe versions: ffmpeg 3.2.12-1, ffprobe 3.2.12-1
[debug] Proxy map: {}
[youtube] LrNsJrWL4kI: Downloading webpage
[youtube] LrNsJrWL4kI: Downloading video info webpage
[debug] Default format spec: bestvideo+bestaudio/best
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on u'https://r5---sn-n4v7sn7z.googlevideo.com/videoplayback?ipbits=0&ei=SH_vW_XfL4qpgQOYkK7wCw&key=yt6&c=WEB&pl=24&ip=196.52.38.6&mm=31%2C26&mn=sn-n4v7sn7z%2Csn-q4fl6nss&initcwndbps=482500&itag=135&ms=au%2Conr&mt=1542422208&mv=m&dur=167.967&id=2eb36c26b58be242&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&keepalive=yes&fvip=5&gir=yes&mime=video%2Fmp4&requiressl=yes&lmt=1464268591626562&expire=1542443946&signature=39AFA698DB0612ACFC6C981487789D8AD2C8FE59.29013BCFF1C7F7DCF0A930DD49AC51E8B6BD0A90&source=youtube&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&clen=14012563&ratebypass=yes'
[download] Destination: /home/username/videos/%(ext).f135
[download] 100% of 13.36MiB in 01:02
[debug] Invoking downloader on u'https://r5---sn-n4v7sn7z.googlevideo.com/videoplayback?ipbits=0&ei=SH_vW_XfL4qpgQOYkK7wCw&key=yt6&c=WEB&pl=24&ip=196.52.38.6&mm=31%2C26&mn=sn-n4v7sn7z%2Csn-q4fl6nss&initcwndbps=482500&itag=251&ms=au%2Conr&mt=1542422208&mv=m&dur=167.961&id=2eb36c26b58be242&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&keepalive=yes&fvip=5&gir=yes&mime=audio%2Fwebm&requiressl=yes&lmt=1464276886778876&expire=1542443946&signature=397FAE2CF1E9750DFAFE715B041B7B6ED53D6902.0D55D62586296907617A0A90A54DB42EE52C47A4&source=youtube&clen=2648699&ratebypass=yes'
[download] Destination: /home/username/videos/%(ext).f251
[download] 100% of 2.53MiB in 00:21
[ffmpeg] Merging formats into "/home/username/videos/%(ext).mkv"
[debug] ffmpeg command line: ffmpeg -y -i 'file:/home/username/videos/%(ext).f135' -i 'file:/home/username/videos/%(ext).f251' -c copy -map '0✌️0' -map '1🅰️0' 'file:/home/username/videos/%(ext).temp.mkv'
Deleting original file /home/username/videos/%(ext).f135 (pass -k to keep)
Deleting original file /home/username/videos/%(ext).f251 (pass -k to keep)
username@prime:~$

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Nov 17, 2018

it's %(title)s.%(ext)s not %(title).%(ext).

@remitamine remitamine closed this Nov 17, 2018
@remitamine remitamine added the invalid label Nov 17, 2018
@davekimble2
Copy link
Author

@davekimble2 davekimble2 commented Nov 17, 2018

OK, thanks, but why does it need an "s"? Surely the ")" is sufficient as a terminator of the string. The typical Linux way of doing things would be %TITLE%.%EXT% .

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 17, 2018

https://github.com/rg3/youtube-dl#output-template why. "typical Linux way" can not into formatting at all.

@ytdl-org ytdl-org locked and limited conversation to collaborators Nov 17, 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.