How to color some text with .vtt and ffmpeg hardcode burn












0















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.










share|improve this question


















  • 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
















0















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.










share|improve this question


















  • 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














0












0








0








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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














  • 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










1 Answer
1






active

oldest

votes


















1














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.






share|improve this answer
























  • Thanks again ! :-) ASS it is !

    – bob dylan
    Feb 14 at 11:04












Your Answer








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
});


}
});














draft saved

draft discarded


















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









1














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.






share|improve this answer
























  • Thanks again ! :-) ASS it is !

    – bob dylan
    Feb 14 at 11:04
















1














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.






share|improve this answer
























  • Thanks again ! :-) ASS it is !

    – bob dylan
    Feb 14 at 11:04














1












1








1







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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 14 at 5:18









GyanGyan

15.7k21847




15.7k21847













  • 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





Thanks again ! :-) ASS it is !

– bob dylan
Feb 14 at 11:04


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to make a Squid Proxy server?

第一次世界大戦

Touch on Surface Book