summaryrefslogtreecommitdiff
path: root/libavformat/img2.h
Commit message (Collapse)AuthorAgeFilesLines
* avformat/img2dec: add option to provide metadata fields related to input pathAlexandre Heitor Schmidt2020-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libavformat/img2.h: New field export_path_metadata to VideoDemuxData to only allow the use of the extra metadata upon explicit user request, for security reasons. libavformat/img2dec.c: Modify image2 demuxer to make available two special metadata entries called lavf.image2dec.source_path and lavf.image2dec.source_basename, which represents, respectively, the complete path to the source image for the current frame and the basename i.e. the file name related to the current frame. These can then be used by filters like drawtext and others. The metadata fields will only be available when explicitly enabled with image2 option -export_path_metadata 1. doc/demuxers.texi: Documented the new metadata fields available for image2 and how to use them. doc/filters.texi: Added an example on how to use the new metadata fields with drawtext filter, in order to plot the input file path to each output frame. Usage example: ffmpeg -f image2 -export_path_metadata 1 -pattern_type glob -framerate 18 -i '/path/to/input/files/*.jpg' -filter_complex drawtext="fontsize=40:fontcolor=white: fontfile=FreeSans.ttf:borderw=2:bordercolor=black: text='%{metadata\:lavf.image2dec.source_basename\:NA}':x=5:y=50" output.avi Fixes #2874. Signed-off-by: Alexandre Heitor Schmidt <alexandre.schmidt@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/img2dec: do not interpret the filename by default if a IO context ↵Michael Niedermayer2016-01-201-1/+2
| | | | | | | | | | | | has been opened With this, user applications which use custom IO and have set a IO context will not have their already opened IO context ignored and glob/seq being interpreted Comments and tests from maintainers of user apps are welcome! Liked-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: implement query_codec for the image2 muxer.tab2015-09-071-0/+7
| | | | | | | Allows avformat_query_codec to be used to check for valid image2 encoders. Reuses the existing ff_guess_image2_codec ID table. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/img2dec: add option to disable pattern matchingMarton Balint2015-05-121-1/+2
| | | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/img2: Change enum to int, which is accessed via AVOption as intMichael Niedermayer2015-03-301-1/+7
| | | | | | This fixes depending on implementation defined behavior Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer2015-02-141-1/+1
| | | | | | | | | | | | | | | | | | | * commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e': avformat: Don't anonymously typedef structs Conflicts: libavformat/adtsenc.c libavformat/aiffenc.c libavformat/avidec.c libavformat/gif.c libavformat/iff.c libavformat/img2dec.c libavformat/jvdec.c libavformat/matroskadec.c libavformat/udp.c libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/img2: Make AVOptions available to img* demuxers defined in other filesMichael Niedermayer2014-09-111-1/+3
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/img2dec: make image2dec capable to be used from seperate demuxersMichael Niedermayer2014-03-281-0/+61
Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>