ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.44k stars 10.04k forks source link

No audio in downloaded egghead videos #20366

Closed abdullahgira closed 5 years ago

abdullahgira commented 5 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.03.09. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

Before submitting an issue make sure you have:

What is the purpose of your issue?

Verbose output

$ youtube-dl -v https://egghead.io/lessons/react-redux-the-single-immutable-state-tree                           
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://egghead.io/lessons/react-redux-the-single-immutable-state-tree']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.03.09
[debug] Python version 2.7.15rc1 (CPython) - Linux-4.15.0-46-generic-x86_64-with-elementary-5.0-juno
[debug] exe versions: ffmpeg 3.4.4, ffprobe 3.4.4, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[egghead:lesson] react-redux-the-single-immutable-state-tree: Downloading JSON metadata
[egghead:lesson] 696: Downloading m3u8 information
[egghead:lesson] 696: Downloading MPD manifest
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://d2c5owlt6rorc3.cloudfront.net/javascript-redux-the-single-immutable-state-tree-c6a3d339f0/javascript-redux-the-single-immutable-state-tree-c6a3d339f0.mpd'
[dashsegments] Total fragments: 34
[download] Destination: Redux - The Single Immutable State Tree-696.fdash-46709e1a-21d6-4135-8c69-267183bcf978.mp4
[download]  11.8% of ~1.83MiB at 203.20KiB/s ETA 00:17^C

Description of the bug

The video is downloaded with no audio, this problem can be verified by running mediainfo command on the downloaded video...

$ mediainfo Redux\ -\ The\ Single\ Immutable\ State\ Tree-696.fdash-46709e1a-21d6-4135-8c69-267183bcf978.mp4.part
General
Complete name                            : Redux - The Single Immutable State Tree-696.fdash-46709e1a-21d6-4135-8c69-267183bcf978.mp4.part
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/mp42/mp41)
File size                                : 220 KiB
Duration                                 : 12 s 0 ms
Overall bit rate                         : 150 kb/s
FileExtension_Invalid                    : mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 5 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 12 s 0 ms
Bit rate                                 : 148 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.006
Stream size                              : 217 KiB (98%)

Clearly there is no audio section, also the verbose flag shows that it should be asking for the best video and best audio, requesting only the audio works fine...

$ youtube-dl --extract-audio --audio-format mp3 https://egghead.io/lessons/react-redux-the-single-immutable-state-tree
$ mediainfo Redux\ -\ The\ Single\ Immutable\ State\ Tree.m4a.part
General
Complete name                            : Redux - The Single Immutable State Tree.m4a.part
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/mp42/mp41)
File size                                : 249 KiB
Duration                                 : 16 s 0 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 128 kb/s
FileExtension_Invalid                    : mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v

Audio
ID                                       : 1
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 16 s 0 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 245 KiB (98%) 
dstftw commented 5 years ago

Redux\ -\ The\ Single\ Immutable\ State\ Tree-696.fdash-46709e1a-21d6-4135-8c69-267183bcf978.mp4.part is video only format. Let it finish downloading and check the final file.

abdullahgira commented 5 years ago

Sorry for the wrong bug description, after downloading the video it started downloading the audio and merged them, the issue was in passing the -f "(mp4)[height<=720]" flag...

$ youtube-dl -v -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f "(mp4)[height<=720]" https://egghead.io/courses/getting-started-with-redux
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-o', u'%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s', u'-f', u'(mp4)[height<=720]', u'https://egghead.io/courses/getting-started-with-redux']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.03.09
[debug] Python version 2.7.15rc1 (CPython) - Linux-4.15.0-46-generic-x86_64-with-elementary-5.0-juno
[debug] exe versions: ffmpeg 3.4.4, ffprobe 3.4.4, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[egghead:course] getting-started-with-redux: Downloading course lessons JSON
[egghead:course] getting-started-with-redux: Downloading course JSON
[download] Downloading playlist: Getting Started with Redux
[egghead:course] playlist Getting Started with Redux: Collected 30 video ids (downloading 30 of them)
[download] Downloading video 1 of 30
[egghead:lesson] react-redux-the-single-immutable-state-tree: Downloading JSON metadata
[egghead:lesson] 696: Downloading m3u8 information
[egghead:lesson] 696: Downloading MPD manifest
[debug] Invoking downloader on u'https://d2c5owlt6rorc3.cloudfront.net/javascript-redux-the-single-immutable-state-tree-c6a3d339f0/javascript-redux-the-single-immutable-state-tree-c6a3d339f0.mpd'
[dashsegments] Total fragments: 34
[download] Destination: Getting Started with Redux/01 - Redux - The Single Immutable State Tree.mp4
[download] 100% of 7.37MiB in 00:26
[download] Downloading video 2 of 30
[egghead:lesson] react-redux-describing-state-changes-with-actions: Downloading JSON metadata
[egghead:lesson] 697: Downloading m3u8 information
[egghead:lesson] 697: Downloading MPD manifest
[debug] Invoking downloader on u'https://d2c5owlt6rorc3.cloudfront.net/javascript-redux-describing-state-changes-with-actions-f6d05cbf0f/javascript-redux-describing-state-changes-with-actions-f6d05cbf0f.mpd'
[dashsegments] Total fragments: 45
[download] Destination: Getting Started with Redux/02 - Redux - Describing State Changes with Actions.mp4
[download] 100% of 7.19MiB in 00:29
[download] Downloading video 3 of 30
...

Running mediainfo now on any downloaded video shows no Audio

$ mediainfo Getting\ Started\ with\ Redux/01\ -\ Redux\ -\ The\ Single\ Immutable\ State\ Tree.mp4 
General
Complete name                            : Getting Started with Redux/01 - Redux - The Single Immutable State Tree.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/mp42/mp41)
File size                                : 7.37 MiB
Duration                                 : 2 min 11 s
Overall bit rate                         : 470 kb/s

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 5 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 2 min 11 s
Bit rate                                 : 468 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.020
Stream size                              : 7.33 MiB (100%)

But if downloaded with no -f flag it downloads with audio successfully.