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

Download audio and video streams that cannot merge on Youtube #3610

Closed
mikhaelkh opened this issue Aug 28, 2014 · 3 comments
Closed

Download audio and video streams that cannot merge on Youtube #3610

mikhaelkh opened this issue Aug 28, 2014 · 3 comments

Comments

@mikhaelkh
Copy link

@mikhaelkh mikhaelkh commented Aug 28, 2014

[debug] System config: []
[debug] User config: ['--youtube-include-dash-manifest', '--format', 'bestvideo+bestaudio']
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=DinEKqtCDkg']
[debug] Encodings: locale cp1251, fs mbcs, out None, pref cp1251
[debug] youtube-dl version 2014.08.28.2
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] Proxy map: {}
[youtube] Setting language
[youtube] Confirming age
[youtube] DinEKqtCDkg: Downloading webpage
[youtube] DinEKqtCDkg: Downloading video info webpage
[youtube] DinEKqtCDkg: Extracting video information
[youtube] DinEKqtCDkg: Downloading DASH manifest
[debug] Invoking downloader on 'https://r1---sn-n8t51nxg8pjx-2xne.googlevideo.com/videoplayback?id=0e29c42aab420e48&itag=243&source=youtube&requiressl=yes&mv=m&ms=au&mm=31&cmbypass=yes&playback_host=r1---sn-n8t51nxg8pjx-2xne.googlevideo.com&ratebypass=yes&mime=video/webm&gir=yes&clen=1653832&lmt=1393808502806596&dur=255.560&sver=3&mt=1409261652&upn=sAbvbIqIYPs&key=dg_yt0&signature=5CCB352CB9F0791D4F51AE2FC8B85AA39642734D.6CFF34D8BF40F5DA0BD6074A192C845984A52C08&fexp=902408,927622,931983,932625,934024,934030,937821,938676,942464,945067,946013,948703,952804&ip=212.109.6.214&ipbits=0&expire=1409283378&sparams=ip,ipbits,expire,id,itag,source,requiressl,mv,ms,mm,cmbypass,playback_host,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: John Cale - Hallelujah (Lyrics) (best version)-DinEKqtCDkg.f243.webm

[download]   0.1% of 1.58MiB at 250.00KiB/s ETA 00:06
[download]   0.2% of 1.58MiB at 750.01KiB/s ETA 00:02
[download]   0.4% of 1.58MiB at  1.37MiB/s ETA 00:01 
[download]   0.9% of 1.58MiB at  2.44MiB/s ETA 00:00 
[download]   1.9% of 1.58MiB at  4.32MiB/s ETA 00:00 
[download]   3.9% of 1.58MiB at  7.69MiB/s ETA 00:00 
[download]   7.9% of 1.58MiB at  9.54MiB/s ETA 00:00 
[download]  15.8% of 1.58MiB at  9.96MiB/s ETA 00:00 
[download]  31.6% of 1.58MiB at 10.62MiB/s ETA 00:00 
[download]  63.3% of 1.58MiB at 10.86MiB/s ETA 00:00 
[download] 100.0% of 1.58MiB at 10.88MiB/s ETA 00:00 
[download] 100% of 1.58MiB in 00:00                  
[debug] Invoking downloader on 'https://r1---sn-n8t51nxg8pjx-2xne.googlevideo.com/videoplayback?id=0e29c42aab420e48&itag=141&source=youtube&requiressl=yes&mv=m&ms=au&mm=31&cmbypass=yes&playback_host=r1---sn-n8t51nxg8pjx-2xne.googlevideo.com&ratebypass=yes&mime=audio/mp4&gir=yes&clen=8152840&lmt=1389140862449580&dur=255.698&sver=3&mt=1409261652&upn=sAbvbIqIYPs&key=dg_yt0&signature=8C534190B087B8B740CCB6E6345CD43654119E9E.4250A2180C021B8A2E31859B5C62E5B369A83439&fexp=902408,927622,931983,932625,934024,934030,937821,938676,942464,945067,946013,948703,952804&ip=212.109.6.214&ipbits=0&expire=1409283378&sparams=ip,ipbits,expire,id,itag,source,requiressl,mv,ms,mm,cmbypass,playback_host,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: John Cale - Hallelujah (Lyrics) (best version)-DinEKqtCDkg.f141.m4a

[download]   0.0% of 7.78MiB at 250.00KiB/s ETA 00:31
[download]   0.0% of 7.78MiB at 600.01KiB/s ETA 00:13
[download]   0.1% of 7.78MiB at  1.14MiB/s ETA 00:06 
[download]   0.2% of 7.78MiB at  2.44MiB/s ETA 00:03 
[download]   0.4% of 7.78MiB at  4.32MiB/s ETA 00:01 
[download]   0.8% of 7.78MiB at  6.84MiB/s ETA 00:01 
[download]   1.6% of 7.78MiB at  9.54MiB/s ETA 00:00 
[download]   3.2% of 7.78MiB at  9.96MiB/s ETA 00:00 
[download]   6.4% of 7.78MiB at 10.62MiB/s ETA 00:00 
[download]  12.8% of 7.78MiB at 10.86MiB/s ETA 00:00 
[download]  25.7% of 7.78MiB at 10.36MiB/s ETA 00:00 
[download]  51.4% of 7.78MiB at 10.61MiB/s ETA 00:00 
[download] 100.0% of 7.78MiB at 10.65MiB/s ETA 00:00 
[download] 100% of 7.78MiB in 00:00                  
[ffmpeg] Merging formats into "John Cale - Hallelujah (Lyrics) (best version)-DinEKqtCDkg.webm"
[debug] ffmpeg command line: ffmpeg -y -i 'John Cale - Hallelujah (Lyrics) (best version)-DinEKqtCDkg.f243.webm' -i 'John Cale - Hallelujah (Lyrics) (best version)-DinEKqtCDkg.f141.m4a' -c copy 'John Cale - Hallelujah (Lyrics) (best version)-DinEKqtCDkg.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 1097, 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
[debug] System config: []
[debug] User config: ['--youtube-include-dash-manifest', '--format', 'bestvideo+bestaudio']
[debug] Command-line args: ['-F', '--verbose', 'https://www.youtube.com/watch?v=DinEKqtCDkg']
[debug] Encodings: locale cp1251, fs mbcs, out None, pref cp1251
[debug] youtube-dl version 2014.08.28.2
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] Proxy map: {}
[youtube] Setting language
[youtube] Confirming age
[youtube] DinEKqtCDkg: Downloading webpage
[youtube] DinEKqtCDkg: Downloading video info webpage
[youtube] DinEKqtCDkg: Extracting video information
[youtube] DinEKqtCDkg: Downloading DASH manifest
[info] Available formats for DinEKqtCDkg:
format code extension resolution  note 
139         m4a       audio only  DASH audio   48k , audio@ 48k (22050Hz), 1.45MiB (worst)
171         webm      audio only  DASH audio  108k , audio@128k (44100Hz), 3.05MiB
140         m4a       audio only  DASH audio  128k , audio@128k (44100Hz), 3.87MiB
172         webm      audio only  DASH audio  140k , audio@256k (44100Hz), 3.90MiB
141         m4a       audio only  DASH audio  255k , audio@256k (44100Hz), 7.78MiB
160         mp4       192x144     DASH video  122k , video only, 1.98MiB
242         webm      320x240     DASH video   72k , video only, 1.20MiB
133         mp4       320x240     DASH video  274k , video only, 4.98MiB
243         webm      320x360     DASH video   96k , video only, 1.58MiB
17          3gp       176x144     
36          3gp       320x240     
5           flv       400x240     
43          webm      640x360     
18          mp4       640x360     (best)
@Reino17
Copy link

@Reino17 Reino17 commented Aug 29, 2014

I don't know youtube-dl's inner workings, but I can see you're downloading webm-video (vp8) and m4a-audio (aac). Aac-audio isn't allowed in a webm-container. Only vorbis-audio (and perhaps opus by now). That's why ffmpeg shows you the error.
So either mp4/flv-video (h.264) + m4a-audio (aac), or webm-video (vp8) + webm-audio (vorbis).

@mikhaelkh
Copy link
Author

@mikhaelkh mikhaelkh commented Aug 29, 2014

@corone17 as you can see, I didn't force youtube-dl to download such incompatible streams.

@weedy
Copy link

@weedy weedy commented Sep 27, 2014

yt-dl needs to be patched to pair up webm audio and video or skip them when using --format bestvideo+bestaudio

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.