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 format 22 reporting incorrect audio bitrates #10565

Closed
flatpack opened this issue Sep 5, 2016 · 1 comment
Closed

youtube format 22 reporting incorrect audio bitrates #10565

flatpack opened this issue Sep 5, 2016 · 1 comment

Comments

@flatpack
Copy link

@flatpack flatpack commented Sep 5, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

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

  • I've verified and I assure that I'm running youtube-dl 2016.09.04.1

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question

- [ ] Other

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl -v -F _zA1OtsvvC4
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'-F', u'_zA1OtsvvC4']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.09.04.1
[debug] Python version 2.7.12 - Linux-4.4.0-36-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.6-1ubuntu2, ffprobe 2.8.6-1ubuntu2, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] _zA1OtsvvC4: Downloading webpage
[youtube] _zA1OtsvvC4: Downloading video info webpage
[youtube] _zA1OtsvvC4: Extracting video information
[youtube] {22} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {43} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {18} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {36} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {17} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {136} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {247} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {135} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {244} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {134} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {243} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {133} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {242} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {160} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {278} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {140} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {171} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {249} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {250} signature length 46.40, html5 player en_US-vflqMMQzs
[youtube] {251} signature length 46.40, html5 player en_US-vflqMMQzs
[info] Available formats for _zA1OtsvvC4:
format code  extension  resolution note
249          webm       audio only DASH audio   51k , opus @ 50k, 1.63MiB
250          webm       audio only DASH audio   68k , opus @ 70k, 2.10MiB
171          webm       audio only DASH audio  128k , vorbis@128k, 4.03MiB
140          m4a        audio only DASH audio  129k , m4a_dash container, mp4a.40.2@128k, 4.28MiB
251          webm       audio only DASH audio  165k , opus @160k, 5.17MiB
278          webm       256x144    144p   42k , webm container, vp9, 15fps, video only, 818.32KiB
242          webm       426x240    240p  106k , vp9, 30fps, video only, 1.66MiB
160          mp4        256x144    144p  122k , avc1.4d400c, 15fps, video only, 2.21MiB
243          webm       640x360    360p  169k , vp9, 30fps, video only, 2.64MiB
134          mp4        640x360    360p  227k , avc1.4d401e, 30fps, video only, 3.73MiB
244          webm       854x480    480p  256k , vp9, 30fps, video only, 3.75MiB
133          mp4        426x240    240p  277k , avc1.4d4015, 30fps, video only, 5.59MiB
247          webm       1280x720   720p  456k , vp9, 30fps, video only, 6.58MiB
135          mp4        854x480    480p  480k , avc1.4d401f, 30fps, video only, 6.13MiB
136          mp4        1280x720   720p  759k , avc1.4d401f, 30fps, video only, 10.09MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2@ 24k
36           3gp        320x180    small , mp4v.20.3,  mp4a.40.2
43           webm       640x360    medium , vp8.0,  vorbis@128k
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2@ 96k
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2@192k (best)

# Note that the audio bitrate for format 22 is reported as 192k
# I am looking for the best video and audio experience, so format 22 looks like the best choice.
# To check, I request that format, and postprocess it to extract the audio (to analyse later):
$ youtube-dl -x -f 22 _zA1OtsvvC4
[youtube] _zA1OtsvvC4: Downloading webpage
[youtube] _zA1OtsvvC4: Downloading video info webpage
[youtube] _zA1OtsvvC4: Extracting video information
[download] Destination: Billy Joel - My Life (lyrics on screen)-_zA1OtsvvC4.mp4
[download] 100% of 14.27MiB in 00:00
[ffmpeg] Destination: Billy Joel - My Life (lyrics on screen)-_zA1OtsvvC4.m4a
Deleting original file Billy Joel - My Life (lyrics on screen)-_zA1OtsvvC4.mp4 (pass -k to keep)

# Now I check the audio bitrate:
$ ffprobe Billy\ Joel\ -\ My\ Life\ \(lyrics\ on\ screen\)-_zA1OtsvvC4.m4a
ffprobe version 2.8.6-1ubuntu2 Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311
  configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Billy Joel - My Life (lyrics on screen)-_zA1OtsvvC4.m4a':
  Metadata:
    major_brand     : M4A 
    minor_version   : 512
    compatible_brands: isomiso2
    encoder         : Lavf56.40.101
  Duration: 00:04:39.62, start: 0.000000, bitrate: 126 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

# Note the following lines, suggesting the audio bitrate in the stream (and hence the audio file) is 128k (approx):
  Duration: 00:04:39.62, start: 0.000000, bitrate: 126 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)

# They do not agree with the output from youtube-dl -F above, which reports it as 192k:
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2@192k (best)

# This is a relatively recent development; previously the audio in the format 22 mp4 stream was generally 192k, matching what youtube-dl -F said.

---

Would it be possible to ensure that the audio bitrate for youtube format 22 is correctly reported? 
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 5, 2016

Not possible. There is no bitrate metadata available for non-DASH formats. 192k is a hardcode that has been true previously.

@dstftw dstftw closed this Sep 5, 2016
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.