Bug#753303: avconv: in "best" video stream selection, please break resolution ties by bitrate

Lionel Elie Mamane lionel at mamane.lu
Mon Jun 30 11:08:55 UTC 2014


Package: libav-tools
Version: 6:10.1-1
Severity: normal

Take for example the video at
http://player.ooyala.com/player/ipad/NoMndlbDpMPxEDCuGI2hYTcaQwVSQUBO.m3u8?js=1
(originally from http://www.aopa.org/Education/Safety-Videos.aspx?ipp=100)
It is served over applehttp through ooyala.

It has 5 variants of differing encoding, resolution and bitrate, *but*
among same resolution (and encoding), there are sometimes multiple
bitrate choices. For example:

  Program 0 
    Metadata:
      variant_bitrate : 1230000
    Stream #0.0: Video: h264 (High), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 23.98 fps, 90k tbn, 47.95 tbc
    Metadata:
      variant_bitrate : 1230000
    Stream #0.1: Audio: aac, 44100 Hz, stereo, fltp, 133 kb/s
    Metadata:
      variant_bitrate : 1230000
  (...)
  Program 3 
    Metadata:
      variant_bitrate : 1746000
    Stream #0.6: Video: h264 (High), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 23.98 fps, 90k tbn, 47.95 tbc
    Metadata:
      variant_bitrate : 1746000
    Stream #0.7: Audio: aac, 44100 Hz, stereo, fltp, 133 kb/s
    Metadata:
      variant_bitrate : 1746000
  Program 4 
    Metadata:
      variant_bitrate : 2798000
    Stream #0.8: Video: h264 (High), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 23.98 fps, 90k tbn, 47.95 tbc
    Metadata:
      variant_bitrate : 2798000
    Stream #0.9: Audio: aac, 44100 Hz, stereo, fltp, 133 kb/s
    Metadata:
      variant_bitrate : 2798000

"Program 4" is better than "Program 0", but avconv selects "Program
0", probably because it is the first among the ones that have highest
resolution (Program 1 and 2 have resolution 480x270 and 640x360,
respectively, and have ' h264 (Constrained Baseline)' video).

The avconf manpage says:

  By default avconv tries to pick the "best" stream of each type
  present in input files and add them to each output file. For video,
  this means the highest resolution, (...)

That's a good start, but to handle the above scenario well, please
change avconv to select the highest bitrate among the videos that have
the same (highest) resolution. About audio, I suppose it would be best
to (by default) favour the audio that comes with the selected "best"
Program.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (600, 'testing-updates'), (600, 'testing'), (300, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libav-tools depends on:
ii  dpkg                   1.17.10
ii  libavcodec55           6:10.1-1
ii  libavdevice54          6:10.1-1
ii  libavfilter4           6:10.1-1
ii  libavformat55          6:10.1-1
ii  libavresample1         6:10.1-1
ii  libavutil53            6:10.1-1
ii  libbz2-1.0             1.0.6-5
ii  libc6                  2.19-4
ii  libgnutls26            2.12.23-16
ii  libgsm1                1.0.13-4
ii  libmp3lame0            3.99.5+repack1-3
ii  libopenjpeg5           1.5.2-2
ii  libopus0               1.1-1
ii  librtmp1               2.4+20131018.git79459a2-2
ii  libschroedinger-1.0-0  1.0.11-2
ii  libsdl1.2debian        1.2.15-9
ii  libspeex1              1.2~rc1.1-1
ii  libswscale2            6:10.1-1
ii  libtheora0             1.1.1+dfsg.1-3.2
ii  libva1                 1.3.1-3
ii  libvdpau1              0.7-2
ii  libvorbis0a            1.3.2-1.4
ii  libvorbisenc2          1.3.2-1.4
ii  libvpx1                1.3.0-2
ii  libx11-6               2:1.6.2-2
ii  libx264-142            2:0.142.2389+git956c8d8-5
ii  libxvidcore4           2:1.3.3-1
ii  zlib1g                 1:1.2.8.dfsg-1

libav-tools recommends no packages.

Versions of packages libav-tools suggests:
pn  frei0r-plugins  <none>

-- no debconf information



More information about the pkg-multimedia-maintainers mailing list