Opened 14 months ago

Closed 11 months ago

Last modified 8 months ago

#9219 closed enhancement (fixed)

IPCM Not detected and decoded accordingly by FFMpeg

Reported by: FranceBB Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: mov
Cc: FranceBB Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:

IPCM audio files muxed in MP4 are not correctly detected as pcm_s24be and decoded accordingly.

How to reproduce:

ffmpeg.exe -i %1 -acodec pcm_s24le -ar 48000 -ac 2 -y out1.wav

Expected behavior: decode IPCM and encode a PCM signed 24-bit little-endian file muxed in .wav

Actual behavior: Error - Decoder (codec none) not found for input stream #0:1

Full log:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Z:\IPCM_Sample.MP4':
  Metadata:
    major_brand     : XAVC
    minor_version   : 17440767
    compatible_brands: XAVCmp42iso2
    creation_time   : 2021-05-04T04:54:00.000000Z
  Duration: 00:00:10.08, start: 0.000000, bitrate: 80002 kb/s
    Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p10le(pc), 1920x1080 [SAR 1:1 DAR 16:9], 46772 kb/s, 50 fps, 50 tbr, 50k tbn, 100 tbc (default)
    Metadata:
      creation_time   : 2021-05-04T04:54:00.000000Z
      handler_name    : Video Media Handler
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
    Stream #0:1(und): Audio: none (ipcm / 0x6D637069), 48000 Hz, stereo (default)
    Metadata:
      creation_time   : 2021-05-04T04:54:00.000000Z
      handler_name    : Sound Media Handler
      vendor_id       : [0][0][0][0]
    Stream #0:2(und): Data: none (rtmd / 0x646D7472), 4505 kb/s (default)
    Metadata:
      creation_time   : 2021-05-04T04:54:00.000000Z
      handler_name    : Timed Metadata Media Handler
      timecode        : 01:24:55:10
Stream mapping:
  Stream #0:1 -> #0:0 (? (?) -> pcm_s24le (native))
Decoder (codec none) not found for input stream #0:1

ffmpeg version N-100846-g488e65037b
built on 27/01/2021 01:53 AM UTC+01:00

same behavior occurs on:
ffmpeg version 2021-05-05-git-7c451b609c
built on 05/05/2021 12:29 PM UTC+01:00

Actual workaround: manually setting the decoder to pcm_s24be PCM signed 24-bit big-endian makes it possible to decode the file correctly.

This:

ffmpeg.exe -c:a pcm_s24be -i %1 -acodec pcm_s24le -ar 48000 -ac 2 -y out1.wav

works just fine:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Z:\IPCM_Sample.MP4':
  Metadata:
    major_brand     : XAVC
    minor_version   : 17440767
    compatible_brands: XAVCmp42iso2
    creation_time   : 2021-05-04T04:54:00.000000Z
  Duration: 00:00:10.08, start: 0.000000, bitrate: 80002 kb/s
    Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p10le(pc), 1920x1080 [SAR 1:1 DAR 16:9], 46772 kb/s, 50 fps, 50 tbr, 50k tbn, 100 tbc (default)
    Metadata:
      creation_time   : 2021-05-04T04:54:00.000000Z
      handler_name    : Video Media Handler
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
    Stream #0:1(und): Audio: pcm_s24be (ipcm / 0x6D637069), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2021-05-04T04:54:00.000000Z
      handler_name    : Sound Media Handler
      vendor_id       : [0][0][0][0]
    Stream #0:2(und): Data: none (rtmd / 0x646D7472), 4505 kb/s (default)
    Metadata:
      creation_time   : 2021-05-04T04:54:00.000000Z
      handler_name    : Timed Metadata Media Handler
      timecode        : 01:24:55:10
Stream mapping:
  Stream #0:1 -> #0:0 (pcm_s24be (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'out1.wav':
  Metadata:
    major_brand     : XAVC
    minor_version   : 17440767
    compatible_brands: XAVCmp42iso2
    ISFT            : Lavf58.65.101
    Stream #0:0(und): Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2021-05-04T04:54:00.000000Z
      handler_name    : Sound Media Handler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc58.119.100 pcm_s24le
size=    2835kB time=00:00:10.06 bitrate=2306.5kbits/s speed= 196x
video:0kB audio:2835kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.003514%

Attachments (1)

IPCM_001.mp4 (2.2 MB ) - added by qyot27 12 months ago.
ipcm sample in mp4

Change History (12)

comment:1 by Carl Eugen Hoyos, 14 months ago

Component: ffmpegavformat
Keywords: mov added; pcm_s24be ipcm IPCM Sony IPCM removed
Priority: normalwish
Reproduced by developer: set
Type: defectenhancement

comment:2 by Elon Musk, 12 months ago

Status: newopen

Where is such file?

comment:3 by qyot27, 12 months ago

That sample (from the duplicate ticket #9220 that got closed) needs to be uploaded to a reliable filehost. The lack of the sample is hanging up the FATE test for the added tag.

comment:4 by FranceBB, 12 months ago

Ok, I uploaded it again and it's gonna be valid for 7 more days on WeTransfer.
Please feel free to reupload it to another server to make it last longer.

Here:
https://we.tl/t-rDda6NXWBd

by qyot27, 12 months ago

Attachment: IPCM_001.mp4 added

ipcm sample in mp4

comment:5 by qyot27, 12 months ago

I've added a sample to this ticket that can reproduce this with minimal size, and can confirm the patch I sent to ffmpeg-devel yesterday fixes the detection and allows it to be decoded:
http://ffmpeg.org/pipermail/ffmpeg-devel/2021-July/282288.html

comment:6 by FranceBB, 11 months ago

Hi there,
it's been 4 weeks already since the patch has been submitted.
Has it been merged to the master?
If so, I'm gonna close the ticket and set it as fixed.

in reply to:  6 comment:7 by Balling, 11 months ago

Replying to FranceBB:

Hi there,
it's been 4 weeks already since the patch has been submitted.
Has it been merged to the master?
If so, I'm gonna close the ticket and set it as fixed.

No, it was not. Why LE and BE are the same? And fate was not fixed. See https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210715001641.2598-1-qyot27@gmail.com/

comment:8 by FranceBB, 11 months ago

IPCM is almost always Big Endian, however I don't know for certain that there aren't any little endian IPCM files out there, so it kinda makes sense what Stephen has done taking care of both of them, doesn't it?
Anyway, I'll let qyot2 know on Doom9 and I'll be back.

comment:9 by Elon Musk, 11 months ago

Resolution: fixed
Status: openclosed

Balling is not developer, he just prefer trolling here.

See 1c42fd93236e7869ef4d9fe3650dd3e951387321.

in reply to:  9 comment:10 by Balling, 11 months ago

Replying to richardpl:

Balling is not developer, he just prefer trolling here.

See 1c42fd93236e7869ef4d9fe3650dd3e951387321.

Hey, it is hard for me to do FATE hashes. That does not mean I am not a dev. 7 patches accepted, right? Much more is still there https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=&submitter=1238&state=3&q=&archive=&delegate=

Note: See TracTickets for help on using tickets.