VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. A mkv with embedded subtitle plays very well with VLC and the sub is sharp and clear. I am trying to burn the subtitle onto the video using ffmpeg. The command I use is like this:

    Code:
    ffmpeg -i input.mkv -vf "subtitles=input.mkv" -c:a copy -map :0 -map 0:1 output.mkv
    But playing the output find a lot of small grey or white squares around some characters of the subtitles, like this
    Image
    [Attachment 59742 - Click to enlarge]


    I did try to add background color to the subtitle in -vf like this
    Code:
    BackColour=&H80000000
    but has no effect at all. Would somebody please let me know if there is a way to avoid the squares?
    Quote Quote  
  2. If your subtitle is srt, ass or ssa then try clever Ffmpeg-GUI to burn in it.
    Quote Quote  
  3. Banned
    Join Date
    Jan 2021
    Location
    PAL
    Search Comp PM
    Try burning in the subtitles via Handbrake
    Last edited by pm-s; 9th Jul 2021 at 06:42.
    Quote Quote  
  4. Thank you for the replies. I've tried clever ffmpeg-gui, but couldn't found any function related to subtitle burn in. I've also tried handbrake which produces good results (no small squares), however it lacks options to choose fonts, font size, border colours which ffmpeg has (though I still not able to fully understand them). I have two questions about handbrake hope others can help:

    1. Am I right that handbrake is in fact a ffmpeg gui? If so is there any where I can see the ffmpeg command generated by handbrake?
    2. In ffmpeg, I can use like -c:v copy to avoid re-encoding if the process I want does not involve video, but in handbrake there is no such option. Though I can set the output parameters to be exactly the same as the source, I am not sure if handbrake would re-encode it or not. Any idea?
    Quote Quote  
  5. Banned
    Join Date
    Jan 2021
    Location
    PAL
    Search Comp PM
    Originally Posted by senderj View Post
    Thank you for the replies. I've tried clever ffmpeg-gui, but couldn't found any function related to subtitle burn in. I've also tried handbrake which produces good results (no small squares), however it lacks options to choose fonts, font size, border colours which ffmpeg has (though I still not able to fully understand them). I have two questions about handbrake hope others can help:

    1. Am I right that handbrake is in fact a ffmpeg gui? If so is there any where I can see the ffmpeg command generated by handbrake?
    2. In ffmpeg, I can use like -c:v copy to avoid re-encoding if the process I want does not involve video, but in handbrake there is no such option. Though I can set the output parameters to be exactly the same as the source, I am not sure if handbrake would re-encode it or not. Any idea?
    1. As far as I know, handbrake is based on ffmpeg. It also has one small command line which you can read more about in its documentation https://handbrake.fr/docs/en/1.2.0/cli/command-line-reference.html
    Last edited by pm-s; 9th Jul 2021 at 06:41.
    Quote Quote  
  6. The blocks are likely source decoding errors. Your command line works fine here.
    Image Attached Files
    Quote Quote  
  7. Originally Posted by senderj View Post
    I've tried clever ffmpeg-gui, but couldn't found any function related to subtitle burn in.
    See this:
    Image Attached Thumbnails Click image for larger version

Name:	attachment.jpg
Views:	26
Size:	121.5 KB
ID:	59781  

    Quote Quote  
  8. Banned
    Join Date
    Jan 2021
    Location
    PAL
    Search Comp PM
    Originally Posted by ProWo View Post
    Originally Posted by senderj View Post
    I've tried clever ffmpeg-gui, but couldn't found any function related to subtitle burn in.
    See this:
    I know it's unrelated, but did they really have to make logo in the top so wide?
    Quote Quote  
  9. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by senderj View Post
    A mkv with embedded subtitle plays very well with VLC and the sub is sharp and clear. I am trying to burn the subtitle onto the video using ffmpeg. The command I use is like this:

    Code:
    ffmpeg -i input.mkv -vf "subtitles=input.mkv" -c:a copy -map :0 -map 0:1 output.mkv
    But playing the output find a lot of small grey or white squares around some characters of the subtitles, like this
    Image
    [Attachment 59742 - Click to enlarge]


    I did try to add background color to the subtitle in -vf like this
    Code:
    BackColour=&H80000000
    but has no effect at all. Would somebody please let me know if there is a way to avoid the squares?
    see this here - https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!