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

Nicolas George george at nsup.org
Wed Jul 8 12:57:19 CEST 2015

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

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.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150708/4fae5dfa/attachment.sig>

More information about the ffmpeg-devel mailing list