[FFmpeg-user] Prores enable all audio channels on output file
Rens Dijkshoorn
rens at offlinemedia.nl
Sun Dec 14 21:28:09 CET 2014
----- Original Message -----
> From: "Carl Eugen Hoyos" <cehoyos at ag.or.at>
> To: ffmpeg-user at ffmpeg.org
> Sent: Friday, 12 December, 2014 15:51:14
> Subject: Re: [FFmpeg-user] Prores enable all audio channels on output file
> Kevin Wells <kevwells <at> hotmail.co.uk> writes:
> > I am using this version below, and it is not
> > working, it is disabling all but the first audio
> > channel.
> This would be the expected behaviour but I fear this
> is not always what's happening, I believe there is a
> ticket open.
This patch is not recommended for release, just a quick solution
to enable timecode and all audio tracks.
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 9445417..576e278 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2130,6 +2130,10 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
(version == 1) ? avio_wb32(pb, 104) : avio_wb32(pb, 92); /* size */
ffio_wfourcc(pb, "tkhd");
avio_w8(pb, version);
+ if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO ||
+ track->enc->codec_type == AVMEDIA_TYPE_DATA) /* enable all audio & data tracks */
+ avio_wb24(pb, 0xf);
+ else
avio_wb24(pb, flags);
if (version == 1) {
avio_wb64(pb, track->time);
@@ -2150,7 +2154,7 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
avio_wb32(pb, 0); /* reserved */
avio_wb32(pb, 0); /* reserved */
avio_wb16(pb, 0); /* layer */
- avio_wb16(pb, group); /* alternate group) */
+ avio_wb16(pb, 0x0); /* set alternate group 0 as default ) */
/* Volume, only for audio */
if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
avio_wb16(pb, 0x0100);
Regards
Rens
More information about the ffmpeg-user
mailing list