Kdenlive   bug tracker Home page

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002324KdenliveEffectspublic2011-09-21 14:522011-11-30 06:09
Reporterpez4brian 
Assigned Tottill 
PrioritynormalSeverityminorReproducibilityN/A
StatusassignedResolutionopen 
PlatformOSOS Version
Product VersionRecent git 
Target VersionFixed in Version 
Summary0002324: PATCH: Support for new MLT filter "Dynamic Text"
DescriptionA new filter was recently added to MLT to support the overlay of dynamic text:
http://mltframework.org/gitweb/mlt.git?p=mltframework.org/mlt.git;a=commit;h=7f5034480306a8d55e164127f903a27640048373 [^]

This filter detects keywords in the provided text and replaces the keywords with information from the stream. The filter supports the following keywords:
 * #timecode# - timecode of the frame (based on framerate and position)
 * #frame# - frame number of the frame
 * #filedate# - modification date of the file
Keywords may also be any frame property (e.g. #meta.media.0.codec.frame_rate#)

The attached patch adds support in Kdenlive for the textbox, font and color parameters required by the new filter to appear properly in the effect stack.
Additional InformationThe filter does not yet support date/timecode on a frame-by-frame basis if that is in the source (eg. DV) because libav will need to provide frame specific context first. However, when that becomes available, it can easily be supported by this new effect.

What you can do with this effect (with respect to date) is you can use the #filedate# keyword to overlay the file creation/modification date on the video. This will work well with most file based camcorders that record on SD cards because each file will have a modification date that corresponds to the date it was recorded.
TagsNo tags attached.
Build/Install MethodManual build from SVN
Attached Filestxt file icon dynamictext_effect_1.patch.txt [^] (10,249 bytes) 2011-09-21 14:52 [Show Content]
png file icon dynamic_text_screenshot.png [^] (517,602 bytes) 2011-09-22 05:08
txt file icon dynamictext_patch_20111005.txt [^] (16,260 bytes) 2011-10-06 05:14 [Show Content]
png file icon dynamictext_screenshot_20111005.png [^] (50,631 bytes) 2011-10-06 05:14


txt file icon dyanmictext_patch_20111021.txt [^] (16,273 bytes) 2011-10-22 04:41 [Show Content]
txt file icon dyanmictext_patch_20111030.txt [^] (17,355 bytes) 2011-10-31 02:24 [Show Content]
png file icon dynamictext_screenshot_20111030.png [^] (291,328 bytes) 2011-10-31 02:24

- Relationships

-  Notes
(0007347)
pez4brian (developer)
2011-09-22 05:12

The attached screenshot shows the effect in action. Each of the 4 text blocks is created with a separate instance of the dynamic text effect. The affect is applied to the track, so if there were multiple clips in the track, the text would be automatically updated to match the properties of the clip.

This issue can be related to: 0001597, 0000643 and 0001588
(0007411)
pez4brian (developer)
2011-10-06 05:20

I have attached a new patch and screen shot dated 20111005. The new patch supersedes the previous patche. The new patch resolves the following comments:

* Please add an XML effect description (see the xml files in effects/
and effects/README). This will make the parameter names translatable.

Done in new patch

* It would also be possible then to add a comment about the meaning of
the keywords (see SOP/Sat effect for an example).

Added a combobox from which keywords can be chosen. The keywords are chosen based on a friendly, translatable string which is in the XML effect description.

* Additionally for the geometry parameter the keyframe functionality can be hidden.

I have left the keyframe functionality enabled so that the text can be animated (at least alpha and position). This allows the user to configure the text in such a way that it moves across the screen, or fades out.

* Please also use the already existing color widget (type "color").

Done. I had to add alpha capability to the existing widget.

The patch is against SVN r5945. Please let me know if you have any further comments.
(0007456)
pez4brian (developer)
2011-10-22 04:46

I have attached a new patch dated 20111021. The new patch supersedes the previous patch. The new patch includes the following modifications:

* Support the changed properties for mlt's pango_producer in git HEAD. The functionality is exactly the same.

* Add support for text outline.

The patch is against SVN r5975. Please let me know if you have any comments.
(0007474)
ttill (developer)
2011-10-30 00:44

Thanks for keeping the patch up to date!

For the font parameter GUI one line should be sufficient, I guess. It would then tie in better with the other parameters' GUIs.
Additionally the color string to QColor (and vice versa) conversation code should become a private member of ChooseColorWidget (I don't see it being used anywhere else).

Let me know what you think about these ideas.
(0007478)
pez4brian (developer)
2011-10-31 02:26

Great ideas. They both sound good to me. Please see the latest patch and screenshot files dated 20111030. Let me know what you think.
(0007600)
pez4brian (developer)
2011-11-20 23:18

Till,
Have you had any further thoughts on this? Please let me know if you require any other changes for this to be accepted into Kdenlive.
Thanks,
~Brian
(0007604)
ttill (developer)
2011-11-21 16:32

Sorry, I'm currently really busy. I will try to push it tomorrow.
(0007624)
ttill (developer)
2011-11-24 14:55
edited on: 2011-11-24 14:55

I committed a slightly modified version of your patch on Tuesday: http://quickgit.kde.org/?p=kdenlive.git&a=commit&h=0d8de4d8262a6f5d0bfb716c7e408ba26e200cb7 [^]
Thanks a lot for all your work!

Could it be possible to get a timecode/framecount relative to the clip the filter is used on?

What's the advantage of being able to set the size of the surrounding rect and then align the text inside?

(0007640)
pez4brian (developer)
2011-11-30 06:09

Till,

Thanks for applying the patch.

RE: "Could it be possible to get a timecode/framecount relative to the clip the filter is used on?"

I can interpret that question two ways:

1) If you mean "show '1' to indicate the first frame of a clip (even if the clip is in the middle of the timeline"... that would require some changes to the dynamic text filter and probably to the MLT framework. Currently, the frame only provides its position among all frames in the timeline. I'm sure it could be added. If this is something you are interested in, let me know and I will look into it.

2) If you mean "display the date and time code embedded in the original clip - such as that provided in DV"... my goal is to eventually get there. My understanding is that currently libav does not provide per-frame metadata. I hope to look into that in the future.

RE: "What's the advantage of being able to set the size of the surrounding rect and then align the text inside?"

I use it to align the text in the frame. Keep in mind that since the text is dynamic, its length and even the number of characters could change from one frame to the next. So, to ensure that the text is always centered, I make the rectangle exactly the size of the frame. Then, I set the alignment to center the text horizontally. That way, no matter how long the text is, it will always be centered in the frame. The same logic can apply for vertical alignment.

Thanks again,

~Brian

- Issue History
Date Modified Username Field Change
2011-09-21 14:52 pez4brian New Issue
2011-09-21 14:52 pez4brian File Added: dynamictext_effect_1.patch.txt
2011-09-22 05:08 pez4brian File Added: dynamic_text_screenshot.png
2011-09-22 05:12 pez4brian Note Added: 0007347
2011-09-22 13:25 ttill Assigned To => ttill
2011-09-22 13:25 ttill Status new => assigned
2011-10-06 05:14 pez4brian File Added: dynamictext_patch_20111005.txt
2011-10-06 05:14 pez4brian File Added: dynamictext_screenshot_20111005.png
2011-10-06 05:20 pez4brian Note Added: 0007411
2011-10-22 04:41 pez4brian File Added: dyanmictext_patch_20111021.txt
2011-10-22 04:46 pez4brian Note Added: 0007456
2011-10-30 00:44 ttill Note Added: 0007474
2011-10-31 02:24 pez4brian File Added: dyanmictext_patch_20111030.txt
2011-10-31 02:24 pez4brian File Added: dynamictext_screenshot_20111030.png
2011-10-31 02:26 pez4brian Note Added: 0007478
2011-11-20 23:18 pez4brian Note Added: 0007600
2011-11-21 16:32 ttill Note Added: 0007604
2011-11-24 14:55 ttill Note Added: 0007624
2011-11-24 14:55 ttill Note Edited: 0007624 View Revisions
2011-11-30 06:09 pez4brian Note Added: 0007640


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker