[FFmpeg-devel] Request: consider use codec id "sowt" instead of "ipcm" for LPCM_S16LE in mp4 muxer
"zhilizhao(赵志立)"
quinkblack at foxmail.com
Wed May 24 05:17:51 EEST 2023
> On May 24, 2023, at 08:45, Joseph Chris <joseph at josephcz.xyz> wrote:
>
> Hello,
>
> I am writing this mail for request consider use codec id "sowt" instead of "ipcm" for AV_CODEC_ID_PCM_S16LE in mp4 muxer, and AV_CODEC_ID_PCM_S16BE accordingly. This only needs a minor change on code:
>
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index a9c8e104f0..2b984789f5 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -7816,6 +7816,9 @@ static const AVCodecTag codec_mp4_tags[] = {
> { AV_CODEC_ID_TTML, MOV_MP4_TTML_TAG },
> { AV_CODEC_ID_TTML, MOV_ISMV_TTML_TAG },
>
> + // To improve compatibility
> + { AV_CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') },
> + { AV_CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') },
> /* ISO/IEC 23003-5 integer formats */
> { AV_CODEC_ID_PCM_S16BE, MOV_MP4_IPCM_TAG },
> { AV_CODEC_ID_PCM_S16LE, MOV_MP4_IPCM_TAG },
>
Nope, they are tags of quicktime format, not ISO base media file format.
>
> Many players like VLC and potplayer, can recognize "sowt", but they can not recognize "ipcm" or "lpcm" (lpcm is defined on mp4ra). Even ffmpeg it self (current git master, d81558) can't recognize it. So this change can improve compatibility and interoperability of ffmpeg.
I can’t find d81558.
>
> This change is related to #9219 and #10185.
They have been fixed. I will update the status.
>
> This change fails fate-mov-mp4-pcm but passes all other tests. fate-mov-mp4-pcm checks the MD5 of output file, as the codec id changes also makes the MD5 change. So we have to rewrite the test while changing the code.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list