[FFmpeg-devel] [PATCH] Clip-Wrapped MXF support (attempt #4)

Tomas Härdin tomas.hardin
Fri Feb 11 15:16:27 CET 2011


Maksym Veremeyenko skrev 2011-02-11 14:30:
> Tomas H?rdin ???????(??):
> [...]
>> I have an AVC-Inntra 50 sample where EditUnitByteCount = 140288 but
>> the essence element is 105250816 bytes large. The result is an extra
>> 34816 B packet of garbage.
>
> Please have a look if your sample has two index tables.

Nope, just a single table. See mxfdump below.

> Sample of AVC-Intra i have generated with index tables. For example 76
> frames sample:
>
> IndexEditRate 24000/24000
> IndexStartPosition 0
> IndexDuration 1
> EditUnitByteCount 472576
> IndexSID 1
> BodySID 2
>
> IndexEditRate 24000/24000
> IndexStartPosition 1
> IndexDuration 75
> EditUnitByteCount 472064
> IndexSID 1
> BodySID 2
>
> 28 frames sample:
>
> IndexEditRate 24000/24000
> IndexStartPosition 0
> IndexDuration 1
> EditUnitByteCount 472576
> IndexSID 1
> BodySID 2
>
> IndexEditRate 24000/24000
> IndexStartPosition 1
> IndexDuration 27
> EditUnitByteCount 472064
> IndexSID 1
> BodySID 2

That's an.. interesting way of solving such problems. Why is your 
encoder not outputing packets of constant size?

> Thats could be an answer for data overreads... if you sure about
> garbage, please give me sample (i have only dvcpro cameras, but no
> avc-intra to check this for most samples...)

I'd need a place to upload them to. There's four of them, ranging from 
100 megs to 400 megs each. Since they have the index in the footer I 
can't cut them down to size for upload to the MPlayer ftp.

Maybe later I can encode much shorter samples. The ones I have were made 
using Media Composer 5, which isn't exactly a pleasure to use.

I've quoted and commented some of the output of mxfdump on the file I 
mentioned in my previous post.

>...
>
> Partition at 0x00040020 is for BodySID 0x0001
> ClosedCompleteBodyPartition
>   MajorVersion = 1
>   MinorVersion = 2
>   KAGSize = 131072

Yes, 128 KiB

>   ThisPartition = 262176
>   PreviousPartition = 0
>   FooterPartition = 105644064
>   HeaderByteCount = 0
>   IndexByteCount = 0
>   IndexSID = 0
>   BodyOffset = 0
>   BodySID = 1
>   OperationalPattern = MXF Specialized OP Atom
>   EssenceContainers
>     EssenceContainer = MXF Generic Container
> No header metadata in this partition
> No index table in this partition
>
> Partition at 0x064c0020 is for BodySID 0x0000
> CompleteFooter
>   MajorVersion = 1
>   MinorVersion = 2
>   KAGSize = 256
>   ThisPartition = 105644064
>   PreviousPartition = 262176
>   FooterPartition = 105644064
>   HeaderByteCount = 0
>   IndexByteCount = 313
>   IndexSID = 2
>   BodyOffset = 0
>   BodySID = 0
>   OperationalPattern = MXF Specialized OP Atom
>   EssenceContainers
>     EssenceContainer = MXF Generic Container
> No header metadata in this partition
>
> Index Table Segment (first edit unit = 0, duration = 750) :
>   Indexing BodySID 0x0001 from IndexSID 0x0002
>
>  Bytestream Order:
>   EditUnit   0 for stream 0 is at 0x00000000, Flags=00  *Exact*
>   EditUnit   1 for stream 0 is at 0x00022400, Flags=00  *Exact*
>   EditUnit   2 for stream 0 is at 0x00044800, Flags=00  *Exact*
>   EditUnit   3 for stream 0 is at 0x00066c00, Flags=00  *Exact*
>
> ...
>
>   EditUnit  34 for stream 0 is at 0x0048c800, Flags=00  *Exact*

Delta offset is clearly 140288. 105216000 B for 750 frames, which is not 
divisible by the KAG. After alignment the size comes to 105250816, or 
34816 bytes of fill.

> Read RIP
>   BodySID 0x0000 is at 0x00000000 and is not loaded
>   BodySID 0x0001 is at 0x00040020 and is not loaded
>   BodySID 0x0000 is at 0x064c0020 and is not loaded
>
> Scanned RIP
>   BodySID 0x0000 is at 0x00000000 type ClosedCompleteHeader
>   BodySID 0x0001 is at 0x00040020 type ClosedCompleteBodyPartition
>   BodySID 0x0000 is at 0x064c0020 type CompleteFooter

I hope that sheds some light

/Tomas



More information about the ffmpeg-devel mailing list