[FFmpeg-user] Is there a better way to get/see stats when downloading videos via youtube-dl

shirish शिरीष shirishag75 at gmail.com
Sun Oct 23 21:24:32 EEST 2016


Hi all,

First of all thank you for developing and maintaining ffmpeg for so
many years. esp. with the numerous encoders and decoders that you
provide so we could view, record, encode and decode videos.

Please CC me as I'm not subscribed to the list.

Now I have been thinking of below for quite some-time.

While I'm using youtube-dl, it seems internally it uses ffmpeg -


[HotStar] xxxxxxxxxxx: Downloading JSON metadata
[HotStar] xxxxxxxxxxx: Downloading TABLET JSON metadata
[HotStar] xxxxxxxxxxx: Downloading m3u8 information
[download] Destination: xxxxxxxx!-xxxxxxxxxxx.mp4
ffmpeg version 3.1.4-1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.2.0 (Debian 6.2.0-6) 20161010
  configuration: --prefix=/usr --extra-version=1 --toolchain=hardened
--libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared
--disable-libtesseract --disable-stripping
--disable-decoder=libschroedinger --enable-avresample
--enable-avisynth --enable-gnutls --enable-ladspa --enable-libass
--enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio
--enable-libebur128 --enable-libflite --enable-libfontconfig
--enable-libfreetype --enable-libfribidi --enable-libgme
--enable-libgsm --enable-libmodplug --enable-libmp3lame
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-librubberband --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-libzmq --enable-libzvbi --enable-openal
--enable-opengl --enable-x11grab --enable-libdc1394
--enable-libiec61883 --enable-frei0r --enable-chromaprint
--enable-libopencv --enable-libx264
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[h264 @ 0x207f8a0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x207f8a0] SPS unavailable in decode_picture_timing
[h264 @ 0x207f8a0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x207f8a0] SPS unavailable in decode_picture_timing
[hls,applehttp @ 0x1bbed60] No longer receiving playlist 0
[hls,applehttp @ 0x1bbed60] Now receiving playlist 0, segment 1
Input #0, hls,applehttp, from
'https://staragvod3-vh.akamaihd.net/i/videos/lifeok/sain/1858/xxxxxxxxxxx_,16,180,400,800,1300,2000,_STAR.mp4.csmil/index_5_av.m3u8?null=0&id=AgB1w2uVaF++Fz25DFgkx8PkKfTYNEvgHtaM0inzxM15ZcVodMGV5yZjUyicFzwkcdYTv%2f+0ZQ9rsA%3d%3d':
  Duration: 00:41:46.76, start: 0.100667, bitrate: 0 kb/s
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
stereo, fltp, 65 kb/s
[mp4 @ 0x20c4980] Using AVStream.codec to pass codec parameters to
muxers is deprecated, use AVStream.codecpar instead.
 Last message repeated 1 times
Output #0, mp4, to 'file:xxxxxxxx-xxxxxxxxxxx.mp4.part':
  Metadata:
    encoder         : Lavf57.41.100
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, 65 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x206f420] DTS 9090 < 545490 out of order
[hls,applehttp @ 0x1bbed60] DTS 9090 < 545490 out of order

and then multiple instances of statements like these -

[mp4 @ 0x20c4980] Non-monotonous DTS in output stream 0:0; previous:
536430, current: 30; changing to 536431. This may result in incorrect
timestamps in the output file.
[mp4 @ 0x20c4980] Non-monotonous DTS in output stream 0:1; previous:
287744, current: 0; changing to 287745. This may result in incorrect
timestamps in the output file.
[mp4 @ 0x20c4980] Non-monotonous DTS in output stream 0:1; previous:
287745, current: 1024; changing to 287746. This may result in
incorrect timestamps in the output file.

With the status at -

frame=62819 fps= 11 q=-1.0 Lsize=  633804kB time=00:41:46.75
bitrate=2071.3kbits/s speed=0.428x
video:614305kB audio:18835kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.104869%
[ffmpeg] Downloaded 649015556 bytes
[download] 100% of 618.95MiB


Now it is only at the very end that you come to know what is the time
of the whole stream (apart from the beginning if you have looked at)
and the bitrate is in kbits sa well as speed which doesn't tell what
the speed is about. Can all of this be done in some better way ?

I'm looking for better representation of the status in terms of size
(from kB to mB), bitrate from (kbits from Kbytes) and speed which
makes some sense. Is there a way to achieve that ?

Also this seems to be interesting - is there a bug-report about this ?

[mp4 @ 0x20c4980] Using AVStream.codec to pass codec parameters to
muxers is deprecated, use AVStream.codecpar instead.

Is this youtube-dl doing or ffmpeg doing ?

Here are both the outputs of youtube-dl and ffmpeg to get an idea of
the system -

[$] ffmpeg -v "verbose"

ffmpeg version 3.1.4-1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.2.0 (Debian 6.2.0-6) 20161010
  configuration: --prefix=/usr --extra-version=1 --toolchain=hardened
--libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared
--disable-libtesseract --disable-stripping
--disable-decoder=libschroedinger --enable-avresample
--enable-avisynth --enable-gnutls --enable-ladspa --enable-libass
--enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio
--enable-libebur128 --enable-libflite --enable-libfontconfig
--enable-libfreetype --enable-libfribidi --enable-libgme
--enable-libgsm --enable-libmodplug --enable-libmp3lame
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-librubberband --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-libzmq --enable-libzvbi --enable-openal
--enable-opengl --enable-x11grab --enable-libdc1394
--enable-libiec61883 --enable-frei0r --enable-chromaprint
--enable-libopencv --enable-libx264
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile
options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'


─[$] youtube-dl --verbose

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.10.21.1
[debug] Python version 2.7.12+ -
Linux-4.7.0-1-amd64-x86_64-with-debian-stretch-sid
[debug] exe versions: ffmpeg 3.1.4-1, ffprobe 3.1.4-1, rtmpdump 2.4
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.


If there are any tickets to follow, please let me know.

Hope the above helps.

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
EB80 462B 08E1 A0DE A73A  2C2F 9F3D C7A4 E1C4 D2D8


More information about the ffmpeg-user mailing list