mlt
mlt copied to clipboard
rotate option of pango producer seems not working
This tracker is for defects only! For feature requests, you can submit a pull request with the changes.
If you’re reporting a defect, make it as detailed as possible, and include both your operating system and MLT versions (e.g. macOS 10.16; MLT v7.4.0
).
OSX 13.6.9 MLT v7.24.0
following shell will produce non-rotated text rendering in the video.
melt color:red out=250 -track -producer pango rotate=-90 text="Hello.你好" out=250 -transition composite -consumer avformat:pango.mp4
https://github.com/user-attachments/assets/1c14dd78-28a5-4924-8dc1-e5a621e5a0de
Please take a look at some examples of pango text.
pango-view --text "Hello" --rotate -90 -o pango.png
pango-view --text "你好" --rotate -90 --gravity=east -o pango.png
gravity sets to auto will have same visualization.
I notice two things:
- gravity property in pango markup text have no effects.
pango-view --markup --text "<span gravity='east'>你好</span>" --rotate -90 -o pango.png
- currently, gravity is set to auto in mlt, seems no place to adjust it. https://github.com/mltframework/mlt/blob/460fde21febe16c1b4162360f352e1e3df853894/src/modules/gdk/producer_pango.c#L897
What I want to implement is the Microsoft Office's vertical text in the bounding box. Visualization like below.
But with the pango markup shell, it seems there is no way to adjust gravity only for Chinese characters (the gravity property in the span tag makes no effects).
pango-view --markup --text "<span>Hello,</span><span gravity='east'>你好</span>" --rotate -90 -o pango.png
With melt shell, it seems there is no way to implement vertical text from pango producer since the rotate parameter makes no effects in the first described video.