[FFmpeg-user] [POSSIBLE BUG] Why I can't set "-max_prediction_order" parameter to its default value "8"?

Барт Гопник bart.gopnik at gmail.com
Wed Jul 2 17:41:35 CEST 2014


I compress pcm_s16le 44100 Hz 2 channels audio. Default value of
"-compression_level" parameter for "flac" encoder is "5". This means
that default value of "-max_prediction_order" parameter for "flac"
encoder is "8". If I set "-lpc_type" parameter to value "fixed" and
set "-min_prediction_order" parameter to value "0" all is OK, but if I
explicitly set also "-max_prediction_order" parameter to its default
value "8", FFMPEG says that "invalid max prediction order: 8". Why? Is
it bug?

Here command lines and complete, uncut console outputs:

ffmpeg -loglevel debug -i input.wav -lpc_type fixed
-min_prediction_order 0 output.flac

ffmpeg version N-64033-g7f52960 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun 17 2014 23:21:41 with gcc 4.8.3 (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-libcaca --enable-libfreetyp
e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
-enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 89.100 / 52. 89.100
  libavcodec     55. 67.100 / 55. 67.100
  libavformat    55. 43.100 / 55. 43.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  8.100 /  4.  8.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level)
with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'input.wav'.
Reading option '-lpc_type' ... matched as AVOption 'lpc_type' with argument 'fix
ed'.
Reading option '-min_prediction_order' ... matched as AVOption 'min_prediction_o
rder' with argument '0'.
Reading option 'output.flac' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file input.wav.
Successfully parsed a group of options.
Opening an input file: input.wav.
[wav @ 0000000002b28960] Format wav probed with size=2048 and score=99
[wav @ 0000000002b28960] Before avformat_find_stream_info() pos: 44 bytes read:3
2768 seeks:0
[wav @ 0000000002b28960] parser not found for codec pcm_s16le, packets or times
may be invalid.
[wav @ 0000000002b28960] probing stream 0 pp:14
[wav @ 0000000002b28960] probing stream 0 pp:13
[wav @ 0000000002b28960] probing stream 0 pp:12
[wav @ 0000000002b28960] probing stream 0 pp:11
[wav @ 0000000002b28960] probing stream 0 pp:10
[wav @ 0000000002b28960] probing stream 0 pp:9
[wav @ 0000000002b28960] probing stream 0 pp:8
[wav @ 0000000002b28960] probing stream 0 pp:7
[wav @ 0000000002b28960] probing stream 0 pp:6
[wav @ 0000000002b28960] probing stream 0 pp:5
[wav @ 0000000002b28960] probing stream 0 pp:4
[wav @ 0000000002b28960] probing stream 0 pp:3
[wav @ 0000000002b28960] probing stream 0 pp:2
[wav @ 0000000002b28960] probing stream 0 pp:1
[wav @ 0000000002b28960] probed stream 0
[wav @ 0000000002b28960] parser not found for codec pcm_s16le, packets or times
may be invalid.
[wav @ 0000000002b28960] max_analyze_duration 5000000 reached at 5015510 microse
conds
[wav @ 0000000002b28960] After avformat_find_stream_info() pos: 897068 bytes rea
d:917504 seeks:0 frames:218
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from 'input.wav':
  Duration: 00:04:12.31, bitrate: 1411 kb/s
    Stream #0:0, 218, 1/44100: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 H
z, 2 channels, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: output file output.flac.
Successfully parsed a group of options.
Opening an output file: output.flac.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0000000002b30f20] Setting 'time_base' to value
'1/44100'
[graph 0 input from stream 0:0 @ 0000000002b30f20] Setting 'sample_rate' to valu
e '44100'
[graph 0 input from stream 0:0 @ 0000000002b30f20] Setting 'sample_fmt' to value
 's16'
[graph 0 input from stream 0:0 @ 0000000002b30f20] Setting 'channel_layout' to v
alue '0x3'
[graph 0 input from stream 0:0 @ 0000000002b30f20] tb:1/44100 samplefmt:s16 samp
lerate:44100 chlayout:0x3
[audio format for output stream 0:0 @ 0000000000377ce0] Setting 'sample_fmts' to
 value 's16|s32'
[AVFilterGraph @ 0000000002b43020] query_formats: 4 queried, 9 merged, 0 already
 done, 0 delayed
[flac @ 0000000002b30320]  compression: 5
[flac @ 0000000002b30320]  lpc type: Fixed pre-defined coefficients
[flac @ 0000000002b30320]  prediction order: 0, 8
[flac @ 0000000002b30320]  order method: estimate
[flac @ 0000000002b30320]  partition order: 0, 8
[flac @ 0000000002b30320]  block size: 4608
[flac @ 0000000002b30320]  lpc precision: 15
Output #0, flac, to 'output.flac':
  Metadata:
    encoder         : Lavf55.43.100
    Stream #0:0, 0, 1/90000: Audio: flac, 44100 Hz, stereo, s16, 128 kb/s
    Metadata:
      encoder         : Lavc55.67.100 flac
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> flac (native))
Press [q] to stop, [?] for help
[output stream 0:0 @ 0000000002b2dd20] EOF on sink link output stream 0:0:defaul
t.
No more output streams to write to, finishing.
size=   36483kB time=00:04:12.41 bitrate=1184.0kbits/s
video:0kB audio:36475kB subtitle:0kB other streams:0kB global headers:0kB muxing
 overhead: 0.022190%
Input file #0 (input.wav):
  Input stream #0:0 (audio): 10867 packets read (44507524 bytes); 10867 frames d
ecoded (11126881 samples);
  Total: 10867 packets (44507524 bytes) demuxed
Output file #0 (output.flac):
  Output stream #0:0 (audio): 2415 frames encoded (11126881 samples); 2416 packe
ts muxed (37350517 bytes);
  Total: 2416 packets (37350517 bytes) muxed
10867 frames successfully decoded, 0 decoding errors
[AVIOContext @ 000000000037fd80] Statistics: 2 seeks, 2416 writeouts
[AVIOContext @ 0000000002b31020] Statistics: 44507568 bytes read, 0 seeks

ffmpeg -loglevel debug -i input.wav -lpc_type fixed
-min_prediction_order 0 -max_prediction_order 8 output.flac

ffmpeg version N-64033-g7f52960 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun 17 2014 23:21:41 with gcc 4.8.3 (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-libcaca --enable-libfreetyp
e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
-enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 89.100 / 52. 89.100
  libavcodec     55. 67.100 / 55. 67.100
  libavformat    55. 43.100 / 55. 43.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  8.100 /  4.  8.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level)
with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'input.wav'.
Reading option '-lpc_type' ... matched as AVOption 'lpc_type' with argument 'fix
ed'.
Reading option '-min_prediction_order' ... matched as AVOption 'min_prediction_o
rder' with argument '0'.
Reading option '-max_prediction_order' ... matched as AVOption 'max_prediction_o
rder' with argument '8'.
Reading option 'output.flac' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file input.wav.
Successfully parsed a group of options.
Opening an input file: input.wav.
[wav @ 000000000036f680] Format wav probed with size=2048 and score=99
[wav @ 000000000036f680] Before avformat_find_stream_info() pos: 44 bytes read:3
2768 seeks:0
[wav @ 000000000036f680] parser not found for codec pcm_s16le, packets or times
may be invalid.
[wav @ 000000000036f680] probing stream 0 pp:14
[wav @ 000000000036f680] probing stream 0 pp:13
[wav @ 000000000036f680] probing stream 0 pp:12
[wav @ 000000000036f680] probing stream 0 pp:11
[wav @ 000000000036f680] probing stream 0 pp:10
[wav @ 000000000036f680] probing stream 0 pp:9
[wav @ 000000000036f680] probing stream 0 pp:8
[wav @ 000000000036f680] probing stream 0 pp:7
[wav @ 000000000036f680] probing stream 0 pp:6
[wav @ 000000000036f680] probing stream 0 pp:5
[wav @ 000000000036f680] probing stream 0 pp:4
[wav @ 000000000036f680] probing stream 0 pp:3
[wav @ 000000000036f680] probing stream 0 pp:2
[wav @ 000000000036f680] probing stream 0 pp:1
[wav @ 000000000036f680] probed stream 0
[wav @ 000000000036f680] parser not found for codec pcm_s16le, packets or times
may be invalid.
[wav @ 000000000036f680] max_analyze_duration 5000000 reached at 5015510 microse
conds
[wav @ 000000000036f680] After avformat_find_stream_info() pos: 897068 bytes rea
d:917504 seeks:0 frames:218
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from 'input.wav':
  Duration: 00:04:12.31, bitrate: 1411 kb/s
    Stream #0:0, 218, 1/44100: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 H
z, 2 channels, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: output file output.flac.
Successfully parsed a group of options.
Opening an output file: output.flac.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 00000000002fd840] Setting 'time_base' to value
'1/44100'
[graph 0 input from stream 0:0 @ 00000000002fd840] Setting 'sample_rate' to valu
e '44100'
[graph 0 input from stream 0:0 @ 00000000002fd840] Setting 'sample_fmt' to value
 's16'
[graph 0 input from stream 0:0 @ 00000000002fd840] Setting 'channel_layout' to v
alue '0x3'
[graph 0 input from stream 0:0 @ 00000000002fd840] tb:1/44100 samplefmt:s16 samp
lerate:44100 chlayout:0x3
[audio format for output stream 0:0 @ 00000000003995a0] Setting 'sample_fmts' to
 value 's16|s32'
[AVFilterGraph @ 00000000003adea0] query_formats: 4 queried, 9 merged, 0 already
 done, 0 delayed
[flac @ 0000000000390020] invalid max prediction order: 8
Output #0, flac, to 'output.flac':
    Stream #0:0, 0, 1/90000: Audio: flac, 0 channels, 128 kb/s
    Metadata:
      encoder         : Lavc55.67.100 flac
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> flac (native))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters
such as bit_rate, rate, width or height
[AVIOContext @ 00000000003a8a60] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0000000000390c40] Statistics: 917504 bytes read, 0 seeks


More information about the ffmpeg-user mailing list