-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new subtitle panel #1552
Add new subtitle panel #1552
Conversation
Subtitles are stored in a hidden subtitle_feed filter that is attached to the master (output) track. Subtitles can be manipulated through the new filters panel.
Includes drag and drop to move subtitles
Logic error in filter detection would not allow any subtitle tracks to be deleted.
Also merge the append and overwrite actions to better match markers.
The extracted SRT subtitles can be imported into subtitle tracks in Shotcut.
namespace Subtitles { | ||
|
||
struct SubtitleItem { | ||
int64_t start; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int64_t is an undefined type here and needs #include <cstdint>
Some thoughts:
|
That is a really good idea. I will work on that.
I think that wouldn't be too hard. All we would need is a feature to convert the subtitles to text graphics like in the video. This would be instead of using the subtitle overlay filter on the output track. The feature would add a new track and make a color producer with text filter for every subtitle item. Then, the user could use the existing copy filter feature to apply an SPR filter to all the text graphics. I'll look into this. |
Maybe, but I was thinking there could be a button in the filter, Repeat Keyframes, that would copy the first keyframes within the duration of the first item, and paste them at the starting time of every subsequent item. This is something you would need to run again manually every time you change the filter or subtitle. It would be important that the last keyframes is a hold type to prevent interpolation between cycles, and the code probably needs to ensure it. |
Thanks. I understand your suggestion better. I guess there are two possible methods:
I am not sure which method I like the best. I suppose we could implement them both. |
I implemented "Generate Text From Subtitles". But more work is needed because we do not have keyframes for font size, and we do not have zoom option for text geometry. If you add a SPR filter to animate the zoom, it zooms from the center of the frame, not the center of the text. |
OK yeah, bouncy text won’t be great if you turn off fixed font size because then the text size depends in number of characters. But other things like slide or fade in and out will work. |
Start in the Subtitles Panel by adding a subtitle "Track":
For each set of subtitles, I called them "tracks". But maybe that is confusing. In MLT I called them a "Feed". I am open to suggestions about this.
Name the track and specify the language:
Add subtitles with the buttons or the keyboard shortcuts:
The keyboard shortcuts need help. I chose a series of keys that are close to each other on the keyboard.
When subtitles are present, they will appear in the new subtitle bar in the Timeline:
To add subtitle overlay burn-in, add a "Subtitle Burn In" filter to the output. This filter is only available for the output - not clips or tracks.
Multiple burn-in filters can be added simultaneously - and they can each be burning in a different track.
But only one subtitle track can be active at once for editing: