> On 18 Sep 2019, at 15:27, Derek Buitenhuis <[email protected]> wrote:
> 
> On 18/09/2019 10:30, Hello Vectronic wrote:
>> I need to implement support for reading and writing ICC profiles which can 
>> be stored in MOV/MP4 sample descriptor colour information.
> 
> Does anything exist that can even consume or produce these sorts of files?
> 
> I looked a while back, and found literally nothing that could support these.
> 
> - Derek

It is possible to write and read this with VideoToolbox: 
https://developer.apple.com/documentation/videotoolbox/kvtcompressionpropertykey_iccprofile?language=objc

Here is a snippet of Swift code showing usage:


VTCompressionSessionCreate(
            allocator: nil,
            width: Int32(width),
            height: Int32(height),
            codecType: codec,
            encoderSpecification: encoderSpecification,
            imageBufferAttributes: sourceImageBufferAttributes,
            compressedDataAllocator: nil,
            outputCallback: outputCallback,
            refcon: Unmanaged.passUnretained(self).toOpaque(),
            compressionSessionOut: compressionSesionOut)

VTSessionSetProperties(vtCompressionSession, 
        propertyDictionary: [
            kVTCompressionPropertyKey_ICCProfile: colorSpace.copyICCData() as 
CFTypeRef,
            kVTCompressionPropertyKey_MaxKeyFrameInterval: NSNumber(value: 50)
            ] as CFDictionary)


And here is an example file: http://vectronic.io/icc-profile/icc-profile.mov

And here is the relevant standard: 
https://standards.iso.org/ittf/PubliclyAvailableStandards/c068960_ISO_IEC_14496-12_2015.zip




_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to