#7947 closed enhancement (fixed)
Feature request: expose more frame properties as variables in drawtext filter
Reported by: | electron.rotoscope | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avfilter |
Version: | git-master | Keywords: | drawtext |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
Some properties available to ffprobe -show_frames are not available to the drawtext filter, but would be useful
I know patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker, but I don't have the skills to do that properly. Proposed changes in comments
Change History (7)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
documentation (with a typo fix and clarification on the expansion keyword "metadata") written as a poor attempt by me to be helpful
doc/filters.texi @@ -8960,7 +8960,21 @item x @item y the x and y offset coordinates where the text is drawn. These parameters allow the @var{x} and @var{y} expressions to refer - each other, so you can for example specify @code{y=x/dar}. + to each other, so you can for example specify @code{y=x/dar}. + + @item pict_type + a 1 character description of the current packet's input picture type. + + @item pkt_pos + the current packet's position in the input datastream (in bytes from + the head of the source file) + + @item pkt_duration + the current packet's input duration + + @item pkt_size + the current packet's input size (in bytes) @end table @@ -9027,7 + 9027,10 @item metadata Frame metadata. Takes one or two arguments. The first argument is mandatory and specifies the metadata key. The second argument is optional and specifies a default value, used when the metadata key is not found or empty. + + The metadata accessible to this function must show up using + @code{ffprobe -show_packets} formatted as TAG:[metadata_key]=[metadata_value].
follow-up: 4 comment:3 by , 6 years ago
The author should send this to the ffmpeg-devel list using git format-patch.
+ The metadata accessible to this function must show up using + @code{ffprobe -show_packets} formatted as TAG:[metadata_key]=[metadata_value].
Why? A user can always insert metadata inside the filtergraph using other filters.
comment:4 by , 6 years ago
Replying to Gyan:
The author should send this to the ffmpeg-devel list using git format-patch.
I'm trying to learn git and mailing list etiquette now well enough to be able to do this myself. I was hoping someone on here would be willing to help out.
+ The metadata accessible to this function must show up using + @code{ffprobe -show_packets} formatted as TAG:[metadata_key]=[metadata_value].Why? A user can always insert metadata inside the filtergraph using other filters.
I wasn't aware of that. My main goal was to let the people after me know that you can't pull, say, "duration_time" since in this context while that is information about data, it's not what ffmpeg generally means by metadata. Would this work better?
The use of the term metadata in ffmpeg refers to extra data, often user-provided or generated live during decode by other filters.
If you're trying to read data from a stream or file, run @code{ffprobe -show_frames}. If it doesn't show up formatted as TAG:[metadata_key]=[metadata_value] then it won't be visible to this option.
comment:5 by , 6 years ago
Version: | unspecified → git-master |
---|
comment:6 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
git checkout diff written by the amazing kepstin