Opened 9 months ago

#10864 new defect

amr_nb not muxable into 3gpp, mov, mp4

Reported by: Andrew-R Owned by:
Priority: normal Component: undetermined
Version: 4.4.4 Keywords: 3gpp amr_nb
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

Download test file (made with openCamera on Android 11)
Try to remux  audio via audio copy method:

bash-5.1$ ffmpeg -i  /dev/shm/VID_20240215_064913.mp4 -c:a copy -c:v copy /dev/shm/ccc.3gp
ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11.2.0 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --docdir=/usr/doc/ffmpeg-4.4.4/html --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-gpl --enable-version3 --enable-avresample --arch=i586 --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libass --enable-libbluray --enable-libcdio --enable-frei0r --enable-libgsm --enable-openal --enable-libopus --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libmp3lame --enable-opencl --enable-opengl --enable-libopenjpeg --disable-libpulse --enable-libsmbclient --enable-libsvtav1 --enable-libxml2 --enable-librsvg --enable-libdrm --enable-libaom --enable-libdav1d --enable-libsoxr --enable-libzimg --enable-vapoursynth
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[amrnb @ 0x9b544c0] Multiple frames in a packet.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dev/shm/VID_20240215_064913.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2024-02-15T03:54:16.000000Z
    com.android.version: 11
  Duration: 00:05:02.04, start: 0.000000, bitrate: 585 kb/s
  Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x480, 562 kb/s, SAR 1:1 DAR 4:3, 19.93 fps, 60 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2024-02-15T03:54:16.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
  Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
    Metadata:
      creation_time   : 2024-02-15T03:54:16.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
File '/dev/shm/ccc.3gp' already exists. Overwrite? [y/N] y
[3gp @ 0x9b58840] track 1: codec frame size is not set
Output #0, 3gp, to '/dev/shm/ccc.3gp':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    com.android.version: 11
    encoder         : Lavf58.76.100
  Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 562 kb/s, 19.93 fps, 60 tbr, 90k tbn, 90k tbc (default)
    Metadata:
      creation_time   : 2024-02-15T03:54:16.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
  Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
    Metadata:
      creation_time   : 2024-02-15T03:54:16.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=-1.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=  [3gp @ 0x9b58840] fatal error, input is not a single packet, implement a AVParser for it
av_interleaved_write_frame(): Operation not permitted
[3gp @ 0x9b58840] fatal error, input is not a single packet, implement a AVParser for it
Error writing trailer of /dev/shm/ccc.3gp: Operation not permitted
frame=    1 fps=0.0 q=-1.0 Lsize=       0kB time=00:00:01.08 bitrate=   1.2kbits/s speed=2.26e+03x
video:27kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!


file (22 mb) https://cloud.mail.ru/public/u71z/QzTFpKwe7

for mp4 error a bit different:

bash-5.1$ ffmpeg -i  /dev/shm/VID_20240215_064913.mp4 -c:a copy -c:v copy /dev/shm/ccc.mp4
ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11.2.0 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --docdir=/usr/doc/ffmpeg-4.4.4/html --mandir=/usr/man --disable-debug --enable-shared --disable-static --enable-gpl --enable-version3 --enable-avresample --arch=i586 --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-libass --enable-libbluray --enable-libcdio --enable-frei0r --enable-libgsm --enable-openal --enable-libopus --enable-librtmp --enable-libsnappy --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libmp3lame --enable-opencl --enable-opengl --enable-libopenjpeg --disable-libpulse --enable-libsmbclient --enable-libsvtav1 --enable-libxml2 --enable-librsvg --enable-libdrm --enable-libaom --enable-libdav1d --enable-libsoxr --enable-libzimg --enable-vapoursynth
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[amrnb @ 0x9a3e4c0] Multiple frames in a packet.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dev/shm/VID_20240215_064913.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2024-02-15T03:54:16.000000Z
    com.android.version: 11
  Duration: 00:05:02.04, start: 0.000000, bitrate: 585 kb/s
  Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x480, 562 kb/s, SAR 1:1 DAR 4:3, 19.93 fps, 60 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2024-02-15T03:54:16.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
  Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
    Metadata:
      creation_time   : 2024-02-15T03:54:16.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
File '/dev/shm/ccc.mp4' already exists. Overwrite? [y/N] y
[mp4 @ 0x9a42840] Could not find tag for codec amr_nb in stream #1, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
    Last message repeated 1 times

error also exist on aarch64/termux where ffmpeg version is 6.1.1

Change History (0)

Note: See TracTickets for help on using tickets.