Python Forum
Merge video with subtitles - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Merge video with subtitles (/thread-37568.html)

Pages: 1 2 3


Merge video with subtitles - Pavel_47 - Jun-26-2022

Hello,
I'm looking for a solution allowing to merge video file (.mp4) with subtitles file (.vtt).
Any suggestions ?
Thanks


RE: Merge video with subtitles - snippsat - Jun-26-2022

FFmpeg can do this,but can be long command as mp4 don't support .vtt out of the box,so have to convert to mov_text and choose right languages also.
MKVToolNix is really easy.
Using files that i downloaded before in your arte project.
Drag-drop .mp4 and .vtt file into mkvtoolnix,change filename output to .mp4 then click on start multiplexing done.
[Image: KAemLQ.png]


RE: Merge video with subtitles - Pavel_47 - Jun-26-2022

Thanks
I've tried this tool.
There are several problems with it:
  1. Subtitles are not viewed with all players, e.g. when I play the resulting video with Ubuntu's default "Videos" player, the subtitles are not seen
  2. Embedded subtitles in VLC player does not look like subtitles in original video (please see 2 screenshots below: 1st - online video, 2nd - video file with embedded subtitles). Online video subtitles are much better.

[Image: frost-screenshot-arte.png]

[Image: frost-embedded-subtitles.png]


RE: Merge video with subtitles - snippsat - Jun-26-2022

Should get color text and the background will be black not transparent(that think i is not possible).
Look ok and the same embed or not in newest VLC 3.0.17 on Windows.
[Image: SWib1P.png]
[Image: EUVRTa.png]


RE: Merge video with subtitles - Pavel_47 - Jun-26-2022

Before, I was using an editor (forgot which one) that allowed to embed subtitles like in the original online stream (without background)
Moreover, this editor has integrated the subtitles in such a way that they are visible in all players, not only in VLC.


RE: Merge video with subtitles - Pavel_47 - Jun-28-2022

I remembered which tool I used to embed subtitles - GiliSoft Video Subtitle.
It do the job perfectly: (1) user can adjust the position, font and color of subtitles, (2) there is NO any background color beside subtitles, (3) the embedded subtitles are visible in any player, not just in VLC.
But this tool have some shortcomings: (1) It runs only on Windows (at least I didn't find Linux version), (2) There is no option for batch mode, i.e. setup multiple videos and then run.


RE: Merge video with subtitles - Axel_Erfurt - Jun-28-2022

You can adjust the subtitle colors in vlc settings.


RE: Merge video with subtitles - snippsat - Jun-28-2022

Here is a way with free tool Subtitle Edit 3.6.6.
Load .vtt file and now change to .ass(Advanced SubStation Alpha File), then save this .ass file.
Open MKVToolNix and the same,but now drag in the new .ass file generated with Subtitle Edit.
Now get transparent background with the right colors.
[Image: ODuzYg.png]
[Image: YELPoI.png]


RE: Merge video with subtitles - Pavel_47 - Jun-28-2022

(Jun-28-2022, 01:46 PM)Awi Wrote: Follow these steps:
1. Upload your MP4 file. Select the MP4 which you want to burn your subtitle file.
2. Upload the VTT file. Or click on "autogenerate subtitles" with Happy Scribe.
3. Customization. Customize your captions, and change the color, font, and position of your subtitles.
4. Download the MP4.
The interface of this "Happy Scribe" is quite tricky.
Once on the page, I didn't find how to upload .mp4, and .vtt


RE: Merge video with subtitles - Pavel_47 - Jun-28-2022

(Jun-28-2022, 02:12 PM)Axel_Erfurt Wrote: You can adjust the subtitle colors in vlc settings.
I don't like VLC and use other players in both Windows and Ubuntu, where such options don't exist.