mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-11 18:09:36 +00:00
lavf/isom: support for demuxing and remuxing of MPEG-H 3D Audio in MP4
Implemented according to the specification at https://www.iso.org/standard/69561.html The 'mhm1' sample entry is registered with MP4RA, which is defined as MHAS encapsulated single stream MPEG-H 3D Audio. 'MHAS' stands for MPEG-H audio stream, which contains encoded audio data and corresponds metadata for decoding. This patch enables extracting the MHAS bitstream from MP4 and remuxing into MP4. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
30047b6a57
commit
632b8298b7
@ -371,6 +371,7 @@ const AVCodecTag ff_codec_movaudio_tags[] = {
|
|||||||
{ AV_CODEC_ID_FLAC, MKTAG('f', 'L', 'a', 'C') }, /* nonstandard */
|
{ AV_CODEC_ID_FLAC, MKTAG('f', 'L', 'a', 'C') }, /* nonstandard */
|
||||||
{ AV_CODEC_ID_TRUEHD, MKTAG('m', 'l', 'p', 'a') }, /* mp4ra.org */
|
{ AV_CODEC_ID_TRUEHD, MKTAG('m', 'l', 'p', 'a') }, /* mp4ra.org */
|
||||||
{ AV_CODEC_ID_OPUS, MKTAG('O', 'p', 'u', 's') }, /* mp4ra.org */
|
{ AV_CODEC_ID_OPUS, MKTAG('O', 'p', 'u', 's') }, /* mp4ra.org */
|
||||||
|
{ AV_CODEC_ID_MPEGH_3D_AUDIO, MKTAG('m', 'h', 'm', '1') }, /* MPEG-H 3D Audio bitstream */
|
||||||
{ AV_CODEC_ID_NONE, 0 },
|
{ AV_CODEC_ID_NONE, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2493,6 +2493,7 @@ static int mov_write_stbl_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext
|
|||||||
mov_write_stts_tag(pb, track);
|
mov_write_stts_tag(pb, track);
|
||||||
if ((track->par->codec_type == AVMEDIA_TYPE_VIDEO ||
|
if ((track->par->codec_type == AVMEDIA_TYPE_VIDEO ||
|
||||||
track->par->codec_id == AV_CODEC_ID_TRUEHD ||
|
track->par->codec_id == AV_CODEC_ID_TRUEHD ||
|
||||||
|
track->par->codec_id == AV_CODEC_ID_MPEGH_3D_AUDIO ||
|
||||||
track->par->codec_tag == MKTAG('r','t','p',' ')) &&
|
track->par->codec_tag == MKTAG('r','t','p',' ')) &&
|
||||||
track->has_keyframes && track->has_keyframes < track->entry)
|
track->has_keyframes && track->has_keyframes < track->entry)
|
||||||
mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE);
|
mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE);
|
||||||
@ -6875,6 +6876,7 @@ const AVCodecTag codec_mp4_tags[] = {
|
|||||||
{ AV_CODEC_ID_DVD_SUBTITLE, MKTAG('m', 'p', '4', 's') },
|
{ AV_CODEC_ID_DVD_SUBTITLE, MKTAG('m', 'p', '4', 's') },
|
||||||
{ AV_CODEC_ID_MOV_TEXT , MKTAG('t', 'x', '3', 'g') },
|
{ AV_CODEC_ID_MOV_TEXT , MKTAG('t', 'x', '3', 'g') },
|
||||||
{ AV_CODEC_ID_BIN_DATA , MKTAG('g', 'p', 'm', 'd') },
|
{ AV_CODEC_ID_BIN_DATA , MKTAG('g', 'p', 'm', 'd') },
|
||||||
|
{ AV_CODEC_ID_MPEGH_3D_AUDIO, MKTAG('m', 'h', 'm', '1') },
|
||||||
{ AV_CODEC_ID_NONE , 0 },
|
{ AV_CODEC_ID_NONE , 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user