From: "Jan Ekström" <jeebjp@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avformat/movenc: allow writing out channel count in MP4 and 3GP
Date: Thu, 9 Feb 2023 21:24:46 +0200
Message-ID: <CAEu79SboSZByY0xiVMwrJ3E3=xUpKbwguqk-DZ2OQTQJfAAN_Q@mail.gmail.com> (raw)
In-Reply-To: <d6a830d6-bb8-97b8-1731-1cc4c27252ae@martin.st>
On Thu, Feb 9, 2023 at 12:08 PM Martin Storsjö <martin@martin.st> wrote:
>
> This looks reasonable to me. I didn't follow the references in the commit
> message, but it sounds plausible and probably correct to me.
>
For the record, due to dumb ISO/IEC rule changes regarding how
specifications need to be authorized to be free after 2015, it's
relatively hard to verify the 14496-12 part.
The last version of 14496-12 that was freely available (2015) defined
channelcount in AudioSampleEntry as follows:
template unsigned int(16) channelcount = 2;
Meanwhile the latest 2022 edition defines the related structure(s) as follows:
class AudioSampleEntry(codingname) extends SampleEntry (codingname) {
const unsigned int(32)[2] reserved = 0;
unsigned int(16) channelcount;
template unsigned int(16) samplesize = 16;
unsigned int(16) pre_defined = 0;
const unsigned int(16) reserved = 0 ;
template unsigned int(32) samplerate = { default samplerate of media} << 16;
// optional boxes follow
Box (); // further boxes as needed
ChannelLayout();
DownMixInstructions() [];
DRCCoefficientsBasic() [];
DRCInstructionsBasic() [];
DRCCoefficientsUniDRC() [];
DRCInstructionsUniDRC() [];
// we permit only one DRC Extension box:
UniDrcConfigExtension();
// optional boxes follow
SamplingRateBox();
ChannelLayout();
}
aligned(8) class SamplingRateBox extends FullBox('srat') {
unsigned int(32) sampling_rate;
}
class AudioSampleEntryV1(codingname) extends SampleEntry (codingname) {
unsigned int(16) entry_version; // shall be 1,
// and shall be in an stsd with version ==1
const unsigned int(16)[3] reserved = 0;
template unsigned int(16) channelcount; // shall be correct
template unsigned int(16) samplesize = 16;
unsigned int(16) pre_defined = 0;
const unsigned int(16) reserved = 0 ;
template unsigned int(32) samplerate = 1<<16;
// optional boxes follow
SamplingRateBox();
Box (); // further boxes as needed
ChannelLayout();
DownMixInstructions() [];
DRCCoefficientsBasic() [];
DRCInstructionsBasic() [];
DRCCoefficientsUniDRC() [];
DRCInstructionsUniDRC() [];
// we permit only one DRC Extension box:
UniDrcConfigExtension();
// optional boxes follow
ChannelLayout();
}
_______________________________________________
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".
next prev parent reply other threads:[~2023-02-09 19:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 20:59 Jan Ekström
2023-02-09 10:08 ` Martin Storsjö
2023-02-09 19:24 ` Jan Ekström [this message]
2023-02-14 19:27 ` Jan Ekström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEu79SboSZByY0xiVMwrJ3E3=xUpKbwguqk-DZ2OQTQJfAAN_Q@mail.gmail.com' \
--to=jeebjp@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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