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

youtube-dl downloads aac instead of ogg when --prefer-free-formats is specified #3485

Closed
mikhaelkh opened this issue Aug 10, 2014 · 2 comments
Closed

Comments

@mikhaelkh
Copy link

@mikhaelkh mikhaelkh commented Aug 10, 2014

[debug] System config: []
[debug] User config: ['--youtube-include-dash-manifest', '--format', 'bestvideo+bestaudio']
[debug] Command-line args: ['--verbose', '--prefer-free-formats', 'https://www.youtube.com/watch?v=2vjPBrBU-TM']
[debug] Encodings: locale cp1251, fs mbcs, out None, pref cp1251
[debug] youtube-dl version 2014.08.10
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] Proxy map: {}
[youtube] Setting language
[youtube] 2vjPBrBU-TM: Downloading webpage
[youtube] 2vjPBrBU-TM: Downloading video info webpage
[youtube] 2vjPBrBU-TM: Extracting video information
[youtube] 2vjPBrBU-TM: Encrypted signatures detected.
[youtube] {22} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {43} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {18} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {5} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {36} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {17} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {137} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {248} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {136} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {247} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {135} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {244} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {134} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {243} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {133} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {242} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {160} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {140} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {171} signature length 40.41, html5 player en_US-vflArxUZc
[youtube] {137} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {248} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {136} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {247} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {135} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {244} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {134} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {243} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {133} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {242} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {160} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {140} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] {171} signature length 43.40, html5 player en_US-vflArxUZc
[youtube] 2vjPBrBU-TM: Downloading DASH manifest
[debug] Invoking downloader on 'https://r3---sn-n8t51nxg8pjx-2xne.googlevideo.com/videoplayback?id=daf8cf06b054f933&itag=248&source=youtube&requiressl=yes&gcr=ru&cmbypass=yes&playback_host=r3---sn-n8t51nxg8pjx-2xne.googlevideo.com&ratebypass=yes&mime=video/webm&gir=yes&clen=41814825&lmt=1399524787500950&dur=231.273&signature=49C4C08BF11F34677E4C1E1FDFBAAE36AE34F60A.90FF2E056AAF33FDBFF2535C75C8E9DBC95C603D&mws=yes&mt=1407698897&mv=m&ms=au&sver=3&mm=31&upn=zIRLOWxVhFI&fexp=902408,927622,931983,934024,934030,935663,936118,941363,945058,946023&key=dg_yt0&ip=212.109.6.214&ipbits=0&expire=1407720574&sparams=ip,ipbits,expire,id,itag,source,requiressl,gcr,cmbypass,playback_host,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Sia - Chandelier (Official Video)-2vjPBrBU-TM.f248.webm

[download]   0.0% of 39.88MiB at 166.67KiB/s ETA 04:05
[download]   0.0% of 39.88MiB at 500.00KiB/s ETA 01:21
[download]   0.0% of 39.88MiB at  1.14MiB/s ETA 00:34 
[download]   0.0% of 39.88MiB at  2.44MiB/s ETA 00:16 
[download]   0.1% of 39.88MiB at  3.78MiB/s ETA 00:10 
[download]   0.2% of 39.88MiB at  4.73MiB/s ETA 00:08 
[download]   0.3% of 39.88MiB at  5.91MiB/s ETA 00:06 
[download]   0.6% of 39.88MiB at  6.73MiB/s ETA 00:05 
[download]   1.3% of 39.88MiB at  7.34MiB/s ETA 00:05 
[download]   2.5% of 39.88MiB at  7.46MiB/s ETA 00:05 
[download]   5.0% of 39.88MiB at  7.43MiB/s ETA 00:05 
[download]  10.0% of 39.88MiB at  7.77MiB/s ETA 00:04 
[download]  20.1% of 39.88MiB at  8.23MiB/s ETA 00:03 
[download]  30.1% of 39.88MiB at  6.84MiB/s ETA 00:04 
[download]  40.1% of 39.88MiB at  6.51MiB/s ETA 00:03 
[download]  50.2% of 39.88MiB at  6.31MiB/s ETA 00:03 
[download]  60.2% of 39.88MiB at  5.92MiB/s ETA 00:02 
[download]  70.2% of 39.88MiB at  5.87MiB/s ETA 00:02 
[download]  80.2% of 39.88MiB at  5.34MiB/s ETA 00:01 
[download]  88.5% of 39.88MiB at  5.33MiB/s ETA 00:00 
[download]  98.5% of 39.88MiB at  5.45MiB/s ETA 00:00 
[download] 100.0% of 39.88MiB at  5.43MiB/s ETA 00:00 
[download] 100% of 39.88MiB in 00:07                  
[debug] Invoking downloader on 'https://r3---sn-n8t51nxg8pjx-2xne.googlevideo.com/videoplayback?id=daf8cf06b054f933&itag=141&source=youtube&requiressl=yes&gcr=ru&cmbypass=yes&playback_host=r3---sn-n8t51nxg8pjx-2xne.googlevideo.com&ratebypass=yes&mime=audio/mp4&gir=yes&clen=7377056&lmt=1400327561633607&dur=231.363&signature=0F7BA141E049CE515F86313AADDAA4041DB9C8BF.064860209335BE0B04484652563104DF7A6A5905&mws=yes&mt=1407698897&mv=m&ms=au&sver=3&mm=31&upn=zIRLOWxVhFI&fexp=902408,927622,931983,934024,934030,935663,936118,941363,945058,946023&key=dg_yt0&ip=212.109.6.214&ipbits=0&expire=1407720574&sparams=ip,ipbits,expire,id,itag,source,requiressl,gcr,cmbypass,playback_host,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Sia - Chandelier (Official Video)-2vjPBrBU-TM.f141.m4a

[download]   0.0% of 7.04MiB at 166.67KiB/s ETA 00:43
[download]   0.0% of 7.04MiB at 500.00KiB/s ETA 00:14
[download]   0.1% of 7.04MiB at 999.97KiB/s ETA 00:07
[download]   0.2% of 7.04MiB at  2.09MiB/s ETA 00:03 
[download]   0.4% of 7.04MiB at  3.78MiB/s ETA 00:01 
[download]   0.9% of 7.04MiB at  5.59MiB/s ETA 00:01 
[download]   1.8% of 7.04MiB at  5.91MiB/s ETA 00:01 
[download]   3.5% of 7.04MiB at  6.73MiB/s ETA 00:01 
[download]   7.1% of 7.04MiB at  6.16MiB/s ETA 00:01 
[download]  14.2% of 7.04MiB at  7.35MiB/s ETA 00:00 
[download]  28.4% of 7.04MiB at  7.69MiB/s ETA 00:00 
[download]  56.8% of 7.04MiB at  5.11MiB/s ETA 00:00 
[download] 100.0% of 7.04MiB at  4.59MiB/s ETA 00:00 
[download] 100% of 7.04MiB in 00:01                  
[ffmpeg] Merging formats into "Sia - Chandelier (Official Video)-2vjPBrBU-TM.webm"
[debug] ffmpeg command line: ffmpeg -y -i 'Sia - Chandelier (Official Video)-2vjPBrBU-TM.f248.webm' -i 'Sia - Chandelier (Official Video)-2vjPBrBU-TM.f141.m4a' -c copy 'Sia - Chandelier (Official Video)-2vjPBrBU-TM.webm'
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 1086, in post_process
  File "youtube_dl\postprocessor\ffmpeg.pyo", line 492, in run
  File "youtube_dl\postprocessor\ffmpeg.pyo", line 63, in run_ffmpeg_multiple_files
FFmpegPostProcessorError

By the way, how can I get rid of -2vjPBrBU-TM in file name?

@mikhaelkh mikhaelkh changed the title youtube-dl download aac instead of ogg when `--prefer-free-formats` is specified youtube-dl download aac instead of ogg when --prefer-free-formats is specified Aug 10, 2014
@mikhaelkh
Copy link
Author

@mikhaelkh mikhaelkh commented Aug 10, 2014

The settings should be more clear, now --prefer-free-formats only applies to video while --audio-format applies only to audio.
--prefer-free-formats should apply to both video and audio, --audio-format should apply to audio, --video-format — to video.

@mikhaelkh mikhaelkh changed the title youtube-dl download aac instead of ogg when --prefer-free-formats is specified youtube-dl downloads aac instead of ogg when --prefer-free-formats is specified Aug 10, 2014
@clampak
Copy link

@clampak clampak commented Nov 10, 2014

While the settings are clearer now, youtube-dl's behavior of applying --prefer-free-formats to only the video portion breaks the post-processing by ffmpeg when using --prefer-free-formats -f bestvideo+bestaudio if there are free formats available for both video and audio.

Can this be applied to both video and audio?
If not using --prefer-free-formats, then perhaps something like bestfreevideo+bestfreeaudio?

Right now, it seems like bestvideo+bestaudio should disable --prefer-free-formats, or at least change the behavior to retrieve compatible streams if a free audio format is unavailable.

@mikhaelkh mikhaelkh closed this Oct 25, 2015
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.