Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#2380 closed defect (fixed)

files with "malformated aac bitstream" can not be remuxed

Reported by: julian Owned by:
Priority: important Component: avformat
Version: git-master Keywords: av_interleaved_write_frame aac mov flv regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

download the file https://dl.dropbox.com/u/7221986/3.mkv (sorry its large)

run:
ffmpeg -i 3.mkv -stats -map 0:0 -map 0:1 -vcodec copy -acodec copy 3.mp4

remuxing to mp4 fails with

malformated aac bitstream, use -absf aac_adtstoasc
av_interleaved_write_frame(): Operation not permitted

despite the message, adding "-absf aac_adtstoasc" to the command line does not help.

verified with ffmpeg-1.2 as well as older releases.

i'd like remuxing to succeed even with a damaged aac track especially since the file *plays* fine.

bug seems to be similar to #1758 in spirit

Attachments (2)

ticket2380.aac (1.4 MB) - added by cehoyos 4 years ago.
ticket2380.mkv (1.4 MB) - added by cehoyos 4 years ago.

Change History (10)

Changed 4 years ago by cehoyos

Changed 4 years ago by cehoyos

comment:1 Changed 4 years ago by cehoyos

  • Component changed from FFmpeg to avformat
  • Keywords mov flv regression added
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from 1.2 to git-master

For future tickets: Please always provide the failing command line together with complete, uncut console output.

Regression since c22f2527, also reproducible with -f flv, the mkv sample works fine with -t 15 (fails with -t 16), the aac sample works with -t 25).

$ ffmpeg -i ticket2380.mkv -vn -acodec copy out.mov
ffmpeg version N-51111-gdb8403d Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 20 2013 08:42:26 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 19.101 / 52. 19.101
  libavcodec     55.  1.100 / 55.  1.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 47.104 /  3. 47.104
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, matroska,webm, from 'ticket2380.mkv':
  Metadata:
    creation_time   : 2013-03-20 08:12:44
  Duration: 00:01:00.01, start: 0.000000, bitrate: 190 kb/s
    Stream #0:0(jpn): Audio: aac, 96000 Hz, stereo, fltp (default)
Output #0, mov, to 'out.mov':
  Metadata:
    encoder         : Lavf55.0.100
    Stream #0:0(jpn): Audio: aac (mp4a / 0x6134706D), 96000 Hz, stereo (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mov @ 0x31496a0] malformated aac bitstream, use -absf aac_adtstoasc
av_interleaved_write_frame(): Operation not permitted
$ ffmpeg -i ticket2380.aac -absf aac_adtstoasc -vn -acodec copy out.mov
ffmpeg version N-51111-gdb8403d Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 20 2013 08:42:26 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 19.101 / 52. 19.101
  libavcodec     55.  1.100 / 55.  1.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 47.104 /  3. 47.104
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[aac @ 0x278df40] max_analyze_duration 5000000 reached at 5013333 microseconds
[aac @ 0x278df40] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'ticket2380.aac':
  Duration: 00:01:06.27, bitrate: 173 kb/s
    Stream #0:0: Audio: aac, 48000 Hz, stereo, fltp, 173 kb/s
Output #0, mov, to 'out.mov':
  Metadata:
    encoder         : Lavf55.0.100
    Stream #0:0: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, 173 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mov @ 0x279eea0] malformated aac bitstream, use -absf aac_adtstoasc
av_interleaved_write_frame(): Operation not permitted
Version 0, edited 4 years ago by cehoyos (next)

comment:2 Changed 4 years ago by cehoyos

  • Keywords av_interleaved_write_frame added

comment:3 Changed 4 years ago by cehoyos

  • Keywords aac added
  • Resolution set to fixed
  • Status changed from open to closed

Should be fixed, thank you for the sample and the pointer to ticket #1758!

comment:4 Changed 4 years ago by julian

thanks very much. can you tell me which commit fixed the problem? i want to backport the fix.

comment:5 Changed 4 years ago by julian

already found it, thanks again

comment:6 Changed 4 years ago by cehoyos

Fixed in 1741fec, backported to 0.9, 0.10, 0.11, 1.0, 1.1 and 1.2.

comment:7 Changed 3 years ago by cehoyos

An additional commit - b448c0a - was necessary to produce mov files that can be played with QT and WMP, the commit was also backported.

comment:8 Changed 3 years ago by julian

thanks for informing me ;)

Note: See TracTickets for help on using tickets.