Opened 9 years ago

Closed 9 years ago

#4246 closed defect (fixed)

Lossless encoding with VP9 doesn't work

Reported by: SocDemScum Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: libvpx
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg outputs:

ffmpeg version N-68994-g4df01d5 Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan  9 2015 22:13:35 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
 --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab
le-zlib
  libavutil      54. 16.100 / 54. 16.100
  libavcodec     56. 20.100 / 56. 20.100
  libavformat    56. 18.100 / 56. 18.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  7.100 /  5.  7.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2014-11-29 01:06:17
  Duration: 00:03:38.85, start: 0.000000, bitrate: 1959 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x534
[SAR 1:1 DAR 640:267], 1765 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (defa
ult)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, flt
p, 191 kb/s (default)
    Metadata:
      creation_time   : 2014-11-29 01:06:20
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
File 'Stand.mkv' already exists. Overwrite ? [y/N] y
[libvpx-vp9 @ 0000000004ac00a0] v1.3.0
[libvpx-vp9 @ 0000000004ac00a0] Failed to set VP9E_SET_LOSSLESS codec control: I
nvalid parameter
[libvpx-vp9 @ 0000000004ac00a0]   Additional information: rc_max_quantizer out o
f range [..0]
[flac @ 000000000449c3a0] encoding as 24 bits-per-sample
Output #0, matroska, to 'Stand.mkv':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf56.18.100
    Stream #0:0(und): Video: vp9 (libvpx-vp9) (VP90 / 0x30395056), yuv420p, 1280
x534 [SAR 1:1 DAR 640:267], q=-1--1, 200 kb/s, 23.98 fps, 1k tbn, 23.98 tbc (def
ault)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc56.20.100 libvpx-vp9
    Stream #0:1(und): Audio: flac ([172][241][0][0] / 0xF1AC), 44100 Hz, stereo,
 s32 (24 bit), 128 kb/s (default)
    Metadata:
      creation_time   : 2014-11-29 01:06:20
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
      encoder         : Lavc56.20.100 flac
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))
  Stream #0:1 -> #0:1 (aac (native) -> flac (native))

when trying to losslessly encode using libvpx-vp9. It says that the rc_max_quantizer is out of range.

Command used:

ffmpeg -ss 135.927458197 -t 6.798458327 -i input.mp4 -vcodec libvpx-vp9 -deadline best -profile:v 0 -lossless 1 -g 162 -keyint_min 1 -sc_threshold 50 -frame-parallel 1 -threads 1 -acodec flac -compression_level 8 -threads 1 Stand.mkv

Change History (2)

comment:1 by Nicolas F., 9 years ago

Try adding

-qmin 0 -qmax 0

comment:2 by Michael Niedermayer, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.