[FFmpeg-devel] [PATCH 4/4] concatdec: add support for injecting packet metadata

Marton Balint cus at passwd.hu
Wed Jul 8 16:09:39 CEST 2015



On Wed, 8 Jul 2015, Nicolas George wrote:

> Le nonidi 19 messidor, an CCXXIII, Marton Balint a écrit :
>> Actually I have one more patch I have not yet sent to the list, which adds
>> support to select frames by metadata to the select filters.
>>
>> With that, you can cut frame accurately from XDCAM HD files if you overshoot
>> outpoint a bit and store the useful timecodes in the packet metadata:
>>
>> ffconcat version 1.0
>> file 'XDCAMHD.mxf'
>> in 01:04.00
>> out  01:05.12
>> metadata select.from=0
>> metadata select.until=0.96
>> duration 1
>> file 'XDCAMHD.mxf'
>> in 01:06.00
>> out  01:07.12
>> duration 1
>> metadata select.from=1
>> metadata select.until=1.96
>>
>> ./ffmpeg -copyts -vsync 0 -i test.concat
>> -vf "select='between(t,meta(0),meta(1)):meta_keys=select.from|select.until'"
>> -af
>> "aselect='between(t,meta(0),meta(1)):meta_keys=select.from|select.until'"
>
> Interesting. I suppose at some point some kind of "edltrim" filter would be
> nice, avoiding the need for a formula in the filters, but as is it does the
> work.
>
> One issue I had not thought of in my previous mail: per-packet metadata is
> unusual (so much so it uses side data instead of a field), so maybe the name
> of the directive should reflect that, so that just "metadata" would be
> available for per-stream or per-file metadata. I have no really good name
> for it, though: "all_packets_metadata" is all that comes to mind.
>

I'd still use the metadata directive. If someone needs per-stream, or 
per-packet metadata, he can implement selector directives for that. Like 
metadata_stream or metadata_interval which will change the scope of the 
following metadata directives.

How about that?

Thanks,
Marton


More information about the ffmpeg-devel mailing list