Opened 22 months ago

Closed 4 weeks ago

#5297 closed defect (fixed)

mpeg-4 als: "predictor order too large"

Reported by: ami_stuff Owned by: thilo.borgmann
Priority: important Component: avcodec
Version: git-master Keywords: als regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by ami_stuff)

http://www.datafilehost.com/d/e51ea572

C:\>mp4alsRM23.exe -o1023 -MP4 pred.wav
C:\>ffmpeg -i pred.mp4 out.wav
ffmpeg version N-78758-g5156578 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (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-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --
enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-lib
x265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-d
ecklink --enable-zlib
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 27.100 / 57. 27.100
  libavformat    57. 26.100 / 57. 26.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 37.100 /  6. 37.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pred.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isom
    creation_time   : 2016-03-06 18:17:21
  Duration: 00:00:30.01, start: 0.000000, bitrate: 916 kb/s
    Stream #0:0(und): Audio: mp4als (mp4a / 0x6134706D), 44100 Hz, 2 channels, s
16, 916 kb/s (default)
    Metadata:
      creation_time   : 2016-03-06 18:17:21
Output #0, wav, to 'out.wav':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isom
    ISFT            : Lavf57.26.100
    Stream #0:0(und): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo
, s16, 1411 kb/s (default)
    Metadata:
      creation_time   : 2016-03-06 18:17:21
      encoder         : Lavc57.27.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (mp4als (als) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[output stream 0:0 @ 038f2740] 100 buffers queued in output stream 0:0, somethin
g may be wrong.
[als @ 038f7020] Predictor order too large.
[als @ 038f7020] Reading frame data failed. Skipping RA unit.
size=    5171kB time=00:00:30.01 bitrate=1411.2kbits/s speed=9.02x
video:0kB audio:5170kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.001473%

Change History (19)

comment:1 Changed 22 months ago by ami_stuff

  • Description modified (diff)

comment:2 Changed 22 months ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords als regression added
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

Seems to be a regression since 18f94df8

comment:3 Changed 22 months ago by thilo.borgmann

  • Owner set to thilo.borgmann

comment:4 Changed 15 months ago by thilo.borgmann

I cannot download it from datafilehost anymore.
Please attach it to the ticket or send me a private mail with the sample.

comment:5 Changed 15 months ago by cehoyos

  • Cc thilo.borgmann added

comment:6 Changed 15 months ago by cehoyos

I'll try to fix the permissions later today, sorry!

comment:7 Changed 15 months ago by cehoyos

Should be fixed.

comment:8 Changed 15 months ago by thilo.borgmann

  • Cc thilo.borgmann removed

I'm already receiving mails for this ticket for being subscribed to the ML.

Found the sample, thanks!

Last edited 15 months ago by thilo.borgmann (previous) (diff)

comment:9 follow-up: Changed 8 months ago by rishsethia

i want to solve this issue !

comment:10 in reply to: ↑ 9 Changed 8 months ago by thilo.borgmann

You're welcome to post a corresponding patch to the ffmpeg-devel mailing list.

Last edited 8 months ago by thilo.borgmann (previous) (diff)

comment:11 Changed 8 months ago by rishsethia

The error is in the case where adaptive ordering is turned off !
But what I am wondering is :
Why can't the optimum predictor order (which is equal to max order in this case) be greater than the block length ?

comment:12 Changed 8 months ago by thilo.borgmann

This bug tracker is not meant to discuss codec details nor asking questions about these details.

It is meant for keeping track of the history of a bug report and possible solutions, workarounds and/or patches.

comment:13 Changed 8 months ago by rishsethia

But, I don't get any response via email !

comment:14 Changed 6 months ago by thilo.borgmann

For me, both RM22rev2 and RM23 of the reference software fail to decode this properly. Have you tested decoding with these?

comment:15 Changed 6 months ago by ami_stuff

the file decodes correctly (afaict - no error messages) with:

C:\>C:\mp4alsRM23win\mp4alsRM23.exe -h

mp4alsRM23 - MPEG-4 Audio Lossless Coding (ALS), Reference Model Codec
  Version 23 for Win32
  (c) 2003-2008 Tilman Liebchen, TU Berlin / LG Electronics
    E-mail: liebchen@nue.tu-berlin.de
  Portions by Yuriy A. Reznik, RealNetworks, Inc.
    E-mail: yreznik@real.com
  Portions by Koichi Sugiura, NTT Advanced Technology corporation
    E-mail: koichi.sugiura@ntt-at.co.jp
  Portions by Takehiro Moriya, Noboru Harada and Yutaka Kamamoto, NTT
    E-mail: {moriya.takehiro,harada.noboru,kamamoto.yutaka}@lab.ntt.co.jp

Usage: mp4alsRM23 [options] infile [outfile]

  In compression mode, infile must be a PCM file (wav, aif, or raw format)
  or a 32-bit floating point file (normalized, wav format type 3).
  Mono, stereo, and multichannel files with up to 65536 channels and up to
  32-bit resolution are supported at any sampling frequency.
  In decompression mode (-x), infile is the compressed file (.als or .mp4).
  If outfile is not specified, the name of the output file will be generated
  by replacing the extension of the input file (wav <-> als).
  If outfile is '-', the output will be written to stdout. If infile is '-',
  the input will be read from stdin, and outfile has to be specified.

General Options:
  -c  : Check accuracy by decoding the whole file after encoding.
  -d  : Delete input file after completion.
  -h  : Help (this message)
  -v  : Verbose mode (file info, processing time)
  -x  : Extract (all options except -v and -MP4 are ignored)
Encoding Options:
  -7  : Set parameters for optimum compression (except LTP, MCC, RLSLMS)
  -a  : Adaptive prediction order
  -b  : Use BGMC codes for prediction residual (default: use Rice codes)
  -e  : Exclude CRC calculation
  -f# : ACF/MLZ mode: # = 0-7, -f6/-f7 requires ACF gain value
  -g# : Block switching level: 0 = off (default), 5 = maximum
  -i  : Independent stereo coding (turn off joint stereo coding)
  -l  : Check for empty LSBs (e.g. 20-bit files)
  -m# : Rearrange channel configuration (example: -m1,2,4,5,3)
  -n# : Frame length: 0 = auto (default), max = 65536
  -o# : Prediction order (default = 10), max = 1023
  -p  : Use long-term prediction
  -r# : Random access (multiples of 0.1 sec), -1 = each frame, 0 = off (default)

  -s# : Multi-channel correlation (#=1-65536, jointly code every # channels)
        # must be a divisor of number of channels, otherwise -s is ignored
  -sp#: Enforce ALS Simple Profile Level # (currently only #=1 is defined)
  -t# : Two methods mode (Joint Stereo and Multi-channel correlation)
        # must be a divisor of number of channels
  -u# : Random access info location, 0 = frames (default), 1 = header, 2 = none
  -z# : RLSLMS mode (default = 0: no RLSLMS mode,  1-quick, 2-medium 3-best )
MP4 File Format Support:
  -MP4: Use MP4 file format for compressed file (default if extension is .mp4)
  -OAFI:Force to embed meta box with oafi record
  -npi: Do not indicate the conformant profiles in the MP4 file
Audio file support:
  -R  : Raw audio file (use -C, -W, -F and -M to specify format)
  -S# : Sample type: 0 = integer (default), 1 = float
  -C# : Number of Channels (default = 2)
  -W# : Word length in bits per sample (default = 16)
  -F# : Sampling frequency in Hz (default = 44100)
  -M  : 'MSByte first' byte order (otherwise 'LSByte first')
  -H# : Header size in bytes (default = 0)
  -T# : Trailer size in bytes (default = 0)
  -I  : Show info only, no (de)compression (add -x for compressed files)

Examples:
  mp4alsRM23 -v sound.wav
  mp4alsRM23 -n1024 -i -o20 sound.wav
  mp4alsRM23 - sound.als < sound.wav
  mp4alsRM23 -x sound.als
  mp4alsRM23 -x sound.als - > sound.wav
  mp4alsRM23 -I -x sound.als

comment:16 Changed 6 months ago by ami_stuff

C:\>C:\mp4alsRM23win\mp4alsRM23.exe -v -c -x C:\ff\pred.mp4 out.wav

Audio Properties
  Sample type   : int
  Resolution    : 16 bit
  Sample Rate   : 44100 Hz
  Channels      : 2 ch
  Samples/Chan. : 1323648
  Duration      : 30.0 sec

Codec Properties
  Frame Length  : 2048
  BS Level      : 0
  Pred. Order   : 1023
  Random Access : no (0 frames)
  BGMC Coding   : no
  Joint Stereo  : yes
  MCC enabled   : no
  LTP enabled   : no

Format Properties
  Orig. Format  : WAVE
  Byte Order    : LSB first
  Header Size   : 44 bytes
  Trailer Size  : 0 bytes

MP4 file: C:\ff\pred.mp4
PCM file: out.wav

Decoding... 100% done

CRC status: ok

Declared Profiles      : <none>
Conformant Profiles    : <none>

Processing took 8.73 sec (3.4 x real-time)

comment:17 Changed 6 months ago by thilo.borgmann

I got no error message from the reference decoders, too.
However, one just produced a 0-size file and the other just put some wav header bytes onto disk... please have a look at the actual files created.

comment:18 Changed 6 months ago by ami_stuff

Here is the output:

https://files.fm/u/2ktnnzef

comment:19 Changed 4 weeks ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.