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

Downloaded files renamed without reflecting this in JSON file #21445

Closed
jtotht opened this issue Jun 18, 2019 · 1 comment
Closed

Downloaded files renamed without reflecting this in JSON file #21445

jtotht opened this issue Jun 18, 2019 · 1 comment
Labels

Comments

@jtotht
Copy link

@jtotht jtotht commented Jun 18, 2019

I try to use youtube-dl from another program. I request info JSON as its name is predictable and it contains the actual file’s file name (which can vary depending on the file format chosen). However, when youtube-dl decides to use another format after starting the download, the file extension’s change isn’t reflected in the JSON file.

Example output:

$ youtube-dl -v --write-info-json EVr__5Addjw
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--write-info-json', 'EVr__5Addjw']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.06.08
[debug] Python version 3.5.3 (CPython) - Linux-4.19.0-0.bpo.5-amd64-x86_64-with-debian-9.9
[debug] exe versions: ffmpeg 3.2.14-1, ffprobe 3.2.14-1, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] EVr__5Addjw: Downloading webpage
[youtube] EVr__5Addjw: Downloading video info webpage
[youtube] {22} signature length 104, html5 player vfltBCqwT
[youtube] EVr__5Addjw: Downloading player https://www.youtube.com/yts/jsbin/player_ias-vfltBCqwT/en_US/base.js
[youtube] {43} signature length 108, html5 player vfltBCqwT
[youtube] EVr__5Addjw: Downloading player https://www.youtube.com/yts/jsbin/player_ias-vfltBCqwT/en_US/base.js
[youtube] {18} signature length 104, html5 player vfltBCqwT
[youtube] {137} signature length 108, html5 player vfltBCqwT
[youtube] {248} signature length 108, html5 player vfltBCqwT
[youtube] {136} signature length 108, html5 player vfltBCqwT
[youtube] {247} signature length 108, html5 player vfltBCqwT
[youtube] {135} signature length 108, html5 player vfltBCqwT
[youtube] {244} signature length 108, html5 player vfltBCqwT
[youtube] {134} signature length 108, html5 player vfltBCqwT
[youtube] {243} signature length 108, html5 player vfltBCqwT
[youtube] {133} signature length 108, html5 player vfltBCqwT
[youtube] {242} signature length 108, html5 player vfltBCqwT
[youtube] {160} signature length 108, html5 player vfltBCqwT
[youtube] {278} signature length 108, html5 player vfltBCqwT
[youtube] {140} signature length 104, html5 player vfltBCqwT
[youtube] {171} signature length 108, html5 player vfltBCqwT
[youtube] {249} signature length 104, html5 player vfltBCqwT
[youtube] {250} signature length 104, html5 player vfltBCqwT
[youtube] {251} signature length 108, html5 player vfltBCqwT
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video description metadata as JSON to: David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.info.json
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://r2---sn-qpbpu8-c0qs.googlevideo.com/videoplayback?expire=1560918019&ei=o2MJXYK6LZHB1gK6s52YDg&ip=84.236.58.154&id=o-ABjM56aAb0h8glhUl_cxEC-Jxv3-cRTX4nMIdGgNy5Yh&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-qpbpu8-c0qs%2Csn-c0q7lnly&ms=au%2Crdu&mv=m&pl=24&initcwndbps=1516250&mime=video%2Fmp4&gir=yes&clen=142602206&dur=428.040&lmt=1540045196224227&mt=1560896297&fvip=2&keepalive=yes&c=WEB&txp=5533432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cpl%2Cinitcwndbps&lsig=AHylml4wRgIhAIQKLzFWSFrVxjboeMkf3j16O0bogyvhiLPVg4eqvO3xAiEAi2mLlP037ZqmRk9uR41w6yNdkvdVwDtnmNQWjonTwY0%3D&sig=ALgxI2wwRQIgCXSditfgL5LOaPcE5pOX8p2r6rDtPkHTMt5Ju4OY6GICIQDj5GGeTXe10q4u-Hy4XUneEB5EgzO6Q7ymwCFCAkZAcA==&ratebypass=yes'
[download] Destination: David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.f137.mp4
[download] 100% of 136.00MiB in 00:30
[debug] Invoking downloader on 'https://r2---sn-qpbpu8-c0qs.googlevideo.com/videoplayback?expire=1560918019&ei=o2MJXYK6LZHB1gK6s52YDg&ip=84.236.58.154&id=o-ABjM56aAb0h8glhUl_cxEC-Jxv3-cRTX4nMIdGgNy5Yh&itag=171&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-qpbpu8-c0qs%2Csn-c0q7lnly&ms=au%2Crdu&mv=m&pl=24&initcwndbps=1516250&mime=audio%2Fwebm&gir=yes&clen=6779545&dur=428.049&lmt=1540048891739392&mt=1560896297&fvip=2&keepalive=yes&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cpl%2Cinitcwndbps&lsig=AHylml4wRgIhAIQKLzFWSFrVxjboeMkf3j16O0bogyvhiLPVg4eqvO3xAiEAi2mLlP037ZqmRk9uR41w6yNdkvdVwDtnmNQWjonTwY0%3D&sig=ALgxI2wwRgIhAM4fx8P1mEf5h0AHCWpevF5jGCDFzZV2isLKk-kl8l1DAiEAz8aCyiu6A_FmyDJAZTbess7Db_V8hZa5yA978KskS7o=&ratebypass=yes'
[download] Destination: David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.f171.webm
[download] 100% of 6.47MiB in 00:01
[ffmpeg] Merging formats into "David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.f137.mp4' -i 'file:David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.f171.webm' -c copy -map 0:v:0 -map 1:a:0 'file:David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.temp.mkv'
Deleting original file David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.f137.mp4 (pass -k to keep)
Deleting original file David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.f171.webm (pass -k to keep)

I won’t paste the whole JSON file as it’s pretty large (I can if it’s really needed), but it contains something like this:

{..., "_filename": "David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.mp4", ...}

(The output file name is David Guetta - Dangerous (Official video) ft Sam Martin-EVr__5Addjw.mkv.)

@dstftw dstftw closed this Jun 19, 2019
@dstftw dstftw added the duplicate label Jun 19, 2019
@jtotht
Copy link
Author

@jtotht jtotht commented Jun 19, 2019

@dstftw Could you please mention what is this issue the duplicate of?

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.