How to color some text with .vtt and ffmpeg hardcode burn
I have a .vtt subtitle that i wish to burn into a video, but i would like to display some of it another color.
For example :
This is IMPORTANT !
I would like the word IMPORTANT to be in red.
My ffmpeg code :
fmpeg -i input.mp4 -vf "subtitles=sub.vtt" output.mp4
Using .vtt syntax, the only change I can have is italic with <i>.<c>, <c.red>, <ruby>, etc.. aren't doing anything...
This is <i>IMPORTANT</i> !
Inside ffmpeg -vf, i can use force_style to change subtitle color, but i can only change the whole line, not part of it.
Thanks.
ffmpeg subtitles
add a comment |
I have a .vtt subtitle that i wish to burn into a video, but i would like to display some of it another color.
For example :
This is IMPORTANT !
I would like the word IMPORTANT to be in red.
My ffmpeg code :
fmpeg -i input.mp4 -vf "subtitles=sub.vtt" output.mp4
Using .vtt syntax, the only change I can have is italic with <i>.<c>, <c.red>, <ruby>, etc.. aren't doing anything...
This is <i>IMPORTANT</i> !
Inside ffmpeg -vf, i can use force_style to change subtitle color, but i can only change the whole line, not part of it.
Thanks.
ffmpeg subtitles
2
Convert subs to ASS format and use an editor like Aegisub to add mark-up. The subtitling engine ffmpeg uses to generate bitmap for hardcoding works only with ASS format. All other formats are converted to it.
– Gyan
Feb 12 at 12:58
Thanks for the answer !!! I've switched to .ass and i can now change the font size with{fs30}..{fs0}, and the color with{c&Hff00ff&}...{c}. Amazing!
– bob dylan
Feb 12 at 14:21
Please answer your own question using the button below.
– slhck
Feb 13 at 9:56
I was waiting for @Gyan
– bob dylan
Feb 13 at 22:39
add a comment |
I have a .vtt subtitle that i wish to burn into a video, but i would like to display some of it another color.
For example :
This is IMPORTANT !
I would like the word IMPORTANT to be in red.
My ffmpeg code :
fmpeg -i input.mp4 -vf "subtitles=sub.vtt" output.mp4
Using .vtt syntax, the only change I can have is italic with <i>.<c>, <c.red>, <ruby>, etc.. aren't doing anything...
This is <i>IMPORTANT</i> !
Inside ffmpeg -vf, i can use force_style to change subtitle color, but i can only change the whole line, not part of it.
Thanks.
ffmpeg subtitles
I have a .vtt subtitle that i wish to burn into a video, but i would like to display some of it another color.
For example :
This is IMPORTANT !
I would like the word IMPORTANT to be in red.
My ffmpeg code :
fmpeg -i input.mp4 -vf "subtitles=sub.vtt" output.mp4
Using .vtt syntax, the only change I can have is italic with <i>.<c>, <c.red>, <ruby>, etc.. aren't doing anything...
This is <i>IMPORTANT</i> !
Inside ffmpeg -vf, i can use force_style to change subtitle color, but i can only change the whole line, not part of it.
Thanks.
ffmpeg subtitles
ffmpeg subtitles
asked Feb 12 at 11:19
bob dylanbob dylan
1032
1032
2
Convert subs to ASS format and use an editor like Aegisub to add mark-up. The subtitling engine ffmpeg uses to generate bitmap for hardcoding works only with ASS format. All other formats are converted to it.
– Gyan
Feb 12 at 12:58
Thanks for the answer !!! I've switched to .ass and i can now change the font size with{fs30}..{fs0}, and the color with{c&Hff00ff&}...{c}. Amazing!
– bob dylan
Feb 12 at 14:21
Please answer your own question using the button below.
– slhck
Feb 13 at 9:56
I was waiting for @Gyan
– bob dylan
Feb 13 at 22:39
add a comment |
2
Convert subs to ASS format and use an editor like Aegisub to add mark-up. The subtitling engine ffmpeg uses to generate bitmap for hardcoding works only with ASS format. All other formats are converted to it.
– Gyan
Feb 12 at 12:58
Thanks for the answer !!! I've switched to .ass and i can now change the font size with{fs30}..{fs0}, and the color with{c&Hff00ff&}...{c}. Amazing!
– bob dylan
Feb 12 at 14:21
Please answer your own question using the button below.
– slhck
Feb 13 at 9:56
I was waiting for @Gyan
– bob dylan
Feb 13 at 22:39
2
2
Convert subs to ASS format and use an editor like Aegisub to add mark-up. The subtitling engine ffmpeg uses to generate bitmap for hardcoding works only with ASS format. All other formats are converted to it.
– Gyan
Feb 12 at 12:58
Convert subs to ASS format and use an editor like Aegisub to add mark-up. The subtitling engine ffmpeg uses to generate bitmap for hardcoding works only with ASS format. All other formats are converted to it.
– Gyan
Feb 12 at 12:58
Thanks for the answer !!! I've switched to .ass and i can now change the font size with
{fs30}..{fs0}, and the color with {c&Hff00ff&}...{c}. Amazing!– bob dylan
Feb 12 at 14:21
Thanks for the answer !!! I've switched to .ass and i can now change the font size with
{fs30}..{fs0}, and the color with {c&Hff00ff&}...{c}. Amazing!– bob dylan
Feb 12 at 14:21
Please answer your own question using the button below.
– slhck
Feb 13 at 9:56
Please answer your own question using the button below.
– slhck
Feb 13 at 9:56
I was waiting for @Gyan
– bob dylan
Feb 13 at 22:39
I was waiting for @Gyan
– bob dylan
Feb 13 at 22:39
add a comment |
1 Answer
1
active
oldest
votes
FFmpeg delegates to libass the job of rasterizing text subtitles, and that library, as its name suggests, only works with ASS subtitles. When subtitles in another format are provided, ffmpeg will convert them to ASS. FFmpeg supports parsing only a limited amount of markup in VTT - <i> <b>, <u>.
So, convert subs to ASS format and use an editor like Aegisub to add mark-up.
Thanks again ! :-) ASS it is !
– bob dylan
Feb 14 at 11:04
add a comment |
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1404804%2fhow-to-color-some-text-with-vtt-and-ffmpeg-hardcode-burn%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
FFmpeg delegates to libass the job of rasterizing text subtitles, and that library, as its name suggests, only works with ASS subtitles. When subtitles in another format are provided, ffmpeg will convert them to ASS. FFmpeg supports parsing only a limited amount of markup in VTT - <i> <b>, <u>.
So, convert subs to ASS format and use an editor like Aegisub to add mark-up.
Thanks again ! :-) ASS it is !
– bob dylan
Feb 14 at 11:04
add a comment |
FFmpeg delegates to libass the job of rasterizing text subtitles, and that library, as its name suggests, only works with ASS subtitles. When subtitles in another format are provided, ffmpeg will convert them to ASS. FFmpeg supports parsing only a limited amount of markup in VTT - <i> <b>, <u>.
So, convert subs to ASS format and use an editor like Aegisub to add mark-up.
Thanks again ! :-) ASS it is !
– bob dylan
Feb 14 at 11:04
add a comment |
FFmpeg delegates to libass the job of rasterizing text subtitles, and that library, as its name suggests, only works with ASS subtitles. When subtitles in another format are provided, ffmpeg will convert them to ASS. FFmpeg supports parsing only a limited amount of markup in VTT - <i> <b>, <u>.
So, convert subs to ASS format and use an editor like Aegisub to add mark-up.
FFmpeg delegates to libass the job of rasterizing text subtitles, and that library, as its name suggests, only works with ASS subtitles. When subtitles in another format are provided, ffmpeg will convert them to ASS. FFmpeg supports parsing only a limited amount of markup in VTT - <i> <b>, <u>.
So, convert subs to ASS format and use an editor like Aegisub to add mark-up.
answered Feb 14 at 5:18
GyanGyan
15.7k21847
15.7k21847
Thanks again ! :-) ASS it is !
– bob dylan
Feb 14 at 11:04
add a comment |
Thanks again ! :-) ASS it is !
– bob dylan
Feb 14 at 11:04
Thanks again ! :-) ASS it is !
– bob dylan
Feb 14 at 11:04
Thanks again ! :-) ASS it is !
– bob dylan
Feb 14 at 11:04
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1404804%2fhow-to-color-some-text-with-vtt-and-ffmpeg-hardcode-burn%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown

2
Convert subs to ASS format and use an editor like Aegisub to add mark-up. The subtitling engine ffmpeg uses to generate bitmap for hardcoding works only with ASS format. All other formats are converted to it.
– Gyan
Feb 12 at 12:58
Thanks for the answer !!! I've switched to .ass and i can now change the font size with
{fs30}..{fs0}, and the color with{c&Hff00ff&}...{c}. Amazing!– bob dylan
Feb 12 at 14:21
Please answer your own question using the button below.
– slhck
Feb 13 at 9:56
I was waiting for @Gyan
– bob dylan
Feb 13 at 22:39