Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] Request: consider use codec id "sowt" instead of "ipcm" for LPCM_S16LE in mp4 muxer
@ 2023-05-24  0:45 Joseph Chris
  2023-05-24  2:17 ` "zhilizhao(赵志立)"
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Chris @ 2023-05-24  0:45 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

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          },


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.

This change is related to #9219 and #10185.

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@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FFmpeg-devel] Request: consider use codec id "sowt" instead of "ipcm" for LPCM_S16LE in mp4 muxer
  2023-05-24  0:45 [FFmpeg-devel] Request: consider use codec id "sowt" instead of "ipcm" for LPCM_S16LE in mp4 muxer Joseph Chris
@ 2023-05-24  2:17 ` "zhilizhao(赵志立)"
  0 siblings, 0 replies; 2+ messages in thread
From: "zhilizhao(赵志立)" @ 2023-05-24  2:17 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> On May 24, 2023, at 08:45, Joseph Chris <joseph@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@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-24  2:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24  0:45 [FFmpeg-devel] Request: consider use codec id "sowt" instead of "ipcm" for LPCM_S16LE in mp4 muxer Joseph Chris
2023-05-24  2:17 ` "zhilizhao(赵志立)"

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git