On 20/03/15 09:19, tim nicholson wrote: > On 19/03/15 15:48, Christoph Gerstbauer wrote: >> >>> Shame, don't understand the qmax issue. but if you look at:- >>> >>> tests/lavf_regression.sh line 90 >>> >>> you will see an IMX30 example which uses -qmax 12 and my other other >>> parameters. However not sure what difference closed/open gop makes on I >>> frame only, but being purist I can see how you might want to set closed >>> gop! S356m makes no reference to it that I can see. >>> >>> Looks like we might need a patch for what you want. >>> >>> >> >> In fact, the most important metadata flag is the >> >> display y offset = 32 (high priority for patching, if possible) >> > > Having a quick scan through mxfenc.c it looks like that UL is missing, > as are some others. I have tracked them down in RP210 but am struggling > with the local_tag values at the moment. > > It should be relatively straightformward to add in the relevant tag though. >
Attached is a quick hack that worked for me. Do you want to give it a spin? -- Tim. Key Fingerprint 38CF DB09 3ED0 F607 8B67 6CED 0C0B FC44 8B0B FC83
>From 5944bf55fb2c5adc45959f1ac34c884189704ede Mon Sep 17 00:00:00 2001 From: Tim Nicholson <[email protected]> Date: Fri, 20 Mar 2015 15:18:24 +0000 Subject: [PATCH] libavformat/mxfenc.c: Add 'Presentation Y offset' metadata Previously unset, and some software mishandles files if it is absent --- libavformat/mxfenc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 898951c..0fd8846 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -399,6 +399,7 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = { { 0x3202, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x01,0x00,0x00,0x00}}, /* Stored Height */ { 0x3209, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0C,0x00,0x00,0x00}}, /* Display Width */ { 0x3208, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0B,0x00,0x00,0x00}}, /* Display Height */ + { 0x320B, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0E,0x00,0x00,0x00}}, /* Presentation Y offset */ { 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */ { 0x3201, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x06,0x01,0x00,0x00,0x00,0x00}}, /* Picture Essence Coding */ { 0x3212, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x03,0x01,0x06,0x00,0x00,0x00}}, /* Field Dominance (Opt) */ @@ -971,7 +972,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke int stored_height = (st->codec->height+15)/16*16; int display_height; int f1, f2; - unsigned desc_size = size+8+8+8+8+8+8+5+16+sc->interlaced*4+12+20; + unsigned desc_size = size+8+8+8+8+8+8+8+5+16+sc->interlaced*4+12+20; if (sc->interlaced && sc->field_dominance) desc_size += 5; @@ -996,6 +997,11 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke mxf_write_local_tag(pb, 4, 0x3208); avio_wb32(pb, display_height>>sc->interlaced); + // presentation Y offset + mxf_write_local_tag(pb, 4, 0x320B); + avio_wb32(pb, (st->codec->height - display_height)/2); + + // component depth mxf_write_local_tag(pb, 4, 0x3301); avio_wb32(pb, sc->component_depth); -- 1.9.1
_______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user
