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

Can't play back downloaded YouTube videos after using -f bestvideo+bestaudio parameter? #4220

Closed
antdude opened this issue Nov 17, 2014 · 7 comments

Comments

@antdude
Copy link

@antdude antdude commented Nov 17, 2014

I did a "youtube-dl -f bestvideo+bestaudio https://www.youtube.com/watch?v=AjSr8RvAzJE", but playing its local download back seems to be incomplete like after a quarter in it? I did not have this problem with other videos. Is anyone else seeing this problem too?

Thank you in advance. :)

@clampak
Copy link

@clampak clampak commented Nov 17, 2014

Can you put the output with the --verbose option?

@antdude
Copy link
Author

@antdude antdude commented Nov 17, 2014

clampak: I reproduced it again. It seems like merging file resulted corrupted file? The file size is smaller than the actual video's download status.My MP4 video file was only 337 MB. It should be way bigger than 604 MB? Here is the log I saw:

$ youtube-dl --verbose -f bestvideo+bestaudio https://www.youtube.com/watch?v=AjSr8RvAzJE
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '-f', 'bestvideo+bestaudio', 'https://www.youtube.com/watch?v=AjSr8RvAzJE']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.11.16
[debug] Python version 2.7.3 - Linux-3.2.0-4-amd64-x86_64-with-debian-7.7
[debug] exe versions: avconv 1.0.10, avprobe 1.0.10, ffmpeg 1.0.10, ffprobe 1.0.10, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] Confirming age
[youtube] AjSr8RvAzJE: Downloading webpage
[youtube] AjSr8RvAzJE: Downloading video info webpage
[youtube] AjSr8RvAzJE: Extracting video information
[youtube] AjSr8RvAzJE: Downloading DASH manifest
[debug] Invoking downloader on 'https://r8---sn-a5m7ln7y.googlevideo.com/videoplayback?id=0234abf11bc0cc91&itag=136&source=youtube&requiressl=yes&mm=31&mv=m&ms=au&ratebypass=yes&mime=video/mp4&gir=yes&clen=555539244&lmt=1416177561653873&dur=2454.618&sver=3&upn=lCMF_1RR5L0&signature=33209E32144FDF366EDAA7086536D49BB81DA539.387522E6FF7CFDB267AD9DFA2731C68E8B7A2203&fexp=907259,927622,931854,932404,943909,947209,947215,948124,952302,952605,952901,953903,953912,957103,957105,957201&key=dg_yt0&mt=1416191124&ip=76.91.126.202&ipbits=0&expire=1416212823&sparams=ip,ipbits,expire,id,itag,source,requiressl,mm,mv,ms,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Matt Chat 266 - Legend of Grimrock II-AjSr8RvAzJE.f136.mp4
[download] 100% of 529.80MiB in 09:23
[debug] Invoking downloader on 'https://r8---sn-a5m7ln7y.googlevideo.com/videoplayback?id=0234abf11bc0cc91&itag=141&source=youtube&requiressl=yes&mm=31&mv=m&ms=au&ratebypass=yes&mime=audio/mp4&gir=yes&clen=78260611&lmt=1416177536722671&dur=2454.674&sver=3&upn=lCMF_1RR5L0&signature=490020022F76273579A0ACEAE65883F435888A5D.8546F569A2AAD4EC746AA0DDDA0C89588E1C27A0&fexp=907259,927622,931854,932404,943909,947209,947215,948124,952302,952605,952901,953903,953912,957103,957105,957201&key=dg_yt0&mt=1416191124&ip=76.91.126.202&ipbits=0&expire=1416212823&sparams=ip,ipbits,expire,id,itag,source,requiressl,mm,mv,ms,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Matt Chat 266 - Legend of Grimrock II-AjSr8RvAzJE.f141.m4a
[download] 100% of 74.64MiB in 01:09
[ffmpeg] Merging formats into "Matt Chat 266 - Legend of Grimrock II-AjSr8RvAzJE.mp4"
[debug] ffmpeg command line: avconv -y -i 'Matt Chat 266 - Legend of Grimrock II-AjSr8RvAzJE.f136.mp4' -i 'Matt Chat 266 - Legend of Grimrock II-AjSr8RvAzJE.f141.m4a' -c copy -map 0✌️0 -map 1🅰️0 -shortest 'Matt Chat 266 - Legend of Grimrock II-AjSr8RvAzJE.mp4'

Note that this is on my Debian stable.

@clampak
Copy link

@clampak clampak commented Nov 17, 2014

A couple of things to try- see if --prefer-ffmpeg helps, and if not then try updating ffmpeg/avconv, they're both a bit out of date.

Any reason why you're downloading the video and audio separately? Sometimes that'll give you a higher quality video, but not in this case. A look at youtube-dl -F AjSr8RvAzJE shows the same quality:

format code extension resolution  note
136         mp4       1280x720    DASH video 2253k , video only, 529.80MiB
22          mp4       1280x720    (best)

So basically all you're doing in this is putting back together what Youtube split apart.

You might just try youtube-dl AjSr8RvAzJE.

Incidentally, check out Markdown (top of the little text window), it makes the code and output a lot easier to read.

@antdude
Copy link
Author

@antdude antdude commented Nov 17, 2014

Oh, I always want to download the HQ video available. I didn't know -f bestvideo+bestaudio was already giving me the best of that video URL. Let's wait for another video URL that has a legit problem since bestvideo+bestaudio didn't give me problem with 4K and 60 FPS videos so far. This report wasn't 60 FPS and 4K. :/

Thanks for the tips.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 18, 2014

I have the same problem with 60fps videos (like https://www.youtube.com/watch?v=7SRTEXSpcyI), although ffmpeg works fine. Removing the -shortest option seems to produce a correct file. It could be a bug in avconv, I don't know.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 26, 2014

It has been reported in the libav bugtracker.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jan 4, 2015

In the next version it won't use the -shortest option.

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