[FFmpeg-devel] [PATCH] als in mov
Baptiste Coudurier
baptiste.coudurier
Sun Nov 22 05:33:17 CET 2009
On 11/21/09 8:18 PM, Justin Ruggles wrote:
> Justin Ruggles wrote:
>
>> Justin Ruggles wrote:
>>
>>> Baptiste Coudurier wrote:
>>>
>>>> On 11/21/09 7:19 PM, Justin Ruggles wrote:
>>>>> Hi,
>>>>>
>>>>> This patch fixes muxing of MPEG-4 ALS in MOV.
>>>>>
>>>> Can this be verified with any other decoder than lavc ?
>>>> Does reference decoder works ?
>>> The reference decoder does not support mov.
So what's the use ?
If there is no usage, I'm not sure muxing in .mov is worth.
>>>> Besides an object type to put in esds is needed, and which fourcc is used ?
>>> 'mp4a', same as aac. and the object type is also the same as aac and is
>>> already in ff_mp4_obj_type[].
>>
>> oops... it's not in ff_mp4_obj_type[]. i was looking in the wrong tree.
>
> and... patch attached. now it's time for bed i think.
>
> -Justin
>
>
>
> mp4als_mov_4.patch
>
>
> Index: libavformat/isom.c
> ===================================================================
> --- libavformat/isom.c (revision 20571)
> +++ libavformat/isom.c (working copy)
> @@ -32,6 +32,7 @@
> { CODEC_ID_MPEG4 , 0x20 },
> { CODEC_ID_H264 , 0x21 },
> { CODEC_ID_AAC , 0x40 },
> + { CODEC_ID_MP4ALS , 0x40 },
> { CODEC_ID_MPEG2VIDEO, 0x61 }, /* MPEG2 Main */
> { CODEC_ID_MPEG2VIDEO, 0x60 }, /* MPEG2 Simple */
> { CODEC_ID_MPEG2VIDEO, 0x62 }, /* MPEG2 SNR */
This hunk is ok anytime, and it will fix mp4 muxing, which is not
working either atm.
> [...]
>
> Index: libavformat/movenc.c
> ===================================================================
> --- libavformat/movenc.c (revision 20571)
> +++ libavformat/movenc.c (working copy)
> @@ -371,7 +371,8 @@
> put_tag(pb, "frma");
> put_le32(pb, track->tag);
>
> - if (track->enc->codec_id == CODEC_ID_AAC) {
> + if (track->enc->codec_id == CODEC_ID_AAC ||
> + track->enc->codec_id == CODEC_ID_MP4ALS) {
I think codec_tag == AV_RL32("mp4a") is better here. This fourcc means
esds atom is required.
> /* useless atom needed by mplayer, ipod, not needed by quicktime */
> put_be32(pb, 12); /* size */
> put_tag(pb, "mp4a");
> @@ -452,6 +453,7 @@
> track->enc->codec_id == CODEC_ID_AMR_NB ||
> track->enc->codec_id == CODEC_ID_PCM_S24LE ||
> track->enc->codec_id == CODEC_ID_PCM_S32LE ||
> + track->enc->codec_id == CODEC_ID_MP4ALS ||
> track->enc->codec_id == CODEC_ID_ALAC))
> mov_write_wave_tag(pb, track);
Same here.
--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list