[FFmpeg-devel] [PATCH]Set Matroska private data when muxing Prores
Michael Niedermayer
michaelni at gmx.at
Sat Apr 5 14:20:04 CEST 2014
On Mon, Mar 31, 2014 at 01:43:01AM +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> I don't think ticket #3434 is valid but the specification requires Prores in
> mkv to set private data to the "fourcc as found in MP4".
> http://matroska.org/technical/specs/codecid/index.html
>
> Please comment, Carl Eugen
> matroskadec.c | 2 ++
> matroskaenc.c | 3 +++
> 2 files changed, 5 insertions(+)
> d2eb99732ce8db11d35101ec884513c9ac55e4ee patchmkvprores.diff
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index 4390b6b..6976da8 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -1914,6 +1914,8 @@ static int matroska_read_header(AVFormatContext *s)
> st->codec->block_align = track->audio.sub_packet_size;
> extradata_offset = 78;
> }
> + } else if (codec_id == AV_CODEC_ID_PRORES && track->codec_priv.size == 4) {
> + fourcc = AV_RL32(track->codec_priv.data);
> }
> track->codec_priv.size -= extradata_offset;
>
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 7d83665..9d6962b 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -544,6 +544,9 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo
> } else
> avio_write(dyn_cp, codec->extradata + 12,
> codec->extradata_size - 12);
> + } else if (codec->codec_id == AV_CODEC_ID_PRORES &&
> + ff_codec_get_id(ff_codec_movvideo_tags, codec->codec_tag) == AV_CODEC_ID_PRORES) {
> + avio_write(dyn_cp, (uint8_t *)&codec->codec_tag, 4);
this will fail on big endian
also, have you compared against some mkv generated by some other
software ? (to make sure what we store matches in length and content)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140405/f1fb334c/attachment.asc>
More information about the ffmpeg-devel
mailing list