[FFmpeg-devel] [PATCH] ALAC support in the MOV muxer
Baptiste Coudurier
baptiste.coudurier
Thu Apr 24 14:41:30 CEST 2008
Hi,
Jai Menon wrote:
> Hi,
>
> This is an experimental way of adding alac support to the mov muxer. As of
> now, it isn't meant for svn, but comments on doing this the "right" way are
> welcome. Also the ISO media code for alac is set to an arbitrary value 65.
> This is wrong but I couldn't find the value on mp4ra.org. Also, I don't have
> access to Itunes(or a win32 machine) and still reading the quicktime spec in
> detail. So as of now, ffmpeg can mux/demux alac into an mp4 container. Any
> info on this is appreciated but please note that even if it works, this may
> be a completely wrong way of doing this. Maybe Baptiste would have something
> to say.
Yes, for now mux into .mov and check that quicktime can read it.
We will see about .mp4 later. Does itunes/ipod/iphone need .mp4 ?
>> [...]
>
> --- isom.c (revision 12931)
> +++ isom.c (working copy)
> @@ -31,6 +31,7 @@
> { CODEC_ID_MPEG4 , 32 },
> { CODEC_ID_H264 , 33 },
> { CODEC_ID_AAC , 64 },
> + { CODEC_ID_ALAC , 65 },
You gotta be kidding ;)
Im strongly against adding non standard object types unless very
strictly needed.
> { CODEC_ID_MPEG2VIDEO, 97 }, /* MPEG2 Main */
> { CODEC_ID_MPEG2VIDEO, 96 }, /* MPEG2 Simple */
> { CODEC_ID_MPEG2VIDEO, 98 }, /* MPEG2 SNR */
> Index: movenc.c
> ===================================================================
> --- movenc.c (revision 12931)
> +++ movenc.c (working copy)
> @@ -305,7 +305,7 @@
> 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_ALAC) {
> /* useless atom needed by mplayer, ipod, not needed by quicktime */
> put_be32(pb, 12); /* size */
> put_tag(pb, "mp4a");
Is this atom really needed ? Even on latest ipod/iphone ?
> @@ -1508,6 +1508,11 @@
> }else if(st->codec->codec_type == CODEC_TYPE_AUDIO){
> track->timescale = st->codec->sample_rate;
> av_set_pts_info(st, 64, 1, st->codec->sample_rate);
> +
> + ///ALAC: set frame_size from extradata
Useless comment. Code is doing explicitly what you describe:
> + if(st->codec->codec_id == CODEC_ID_ALAC)
> + st->codec->frame_size = AV_RB32((st->codec->extradata+12));
[...]
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG SAS http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel
mailing list