Jul-04-2022, 12:45 PM
Can you check, please, if this option works in your player (I mean if you change color) ...
![[Image: vlc-options.png]](https://i.postimg.cc/SKS1cqgW/vlc-options.png)
Merge video with subtitles
|
Jul-04-2022, 12:45 PM
Can you check, please, if this option works in your player (I mean if you change color) ...
![]() (Jul-04-2022, 12:45 PM)Pavel_47 Wrote: Can you check, please, if this option works in your player (I mean if you change color) ...No(will not do color change) it will be white(track 2) as in last image or with color an black background(Track 3). How to get correct color and transparent background as my first image in last last post has we been trough before in Thread.
Jul-04-2022, 01:31 PM
Well, taking into account the following shortcomings:
Then embed using python-ffmpeg. As I know, this is the only way to process subtitles in batch mode, although at the moment I don't know how to properly construct the command in order to embed the subtitles, not burn them.
Jul-04-2022, 08:07 PM
There are serval was both MKVToolNix(mkvmerge) and Subtitle Edit has command line tools.
Or find a FFmpeg(the mother of all this tools) command that do all in go. mkvmerge is fast under 20-sec,first did this: SubtitleEdit /convert "Geo Reportage [101139-013-A].fr.vtt" "ass" C:\Program Files\Subtitle Edit λ mkvmerge -o geo_1.mp4 "Geo Reportage [101139-013-A].mp4" "Geo Reportage [101139-013-A].fr.ass" mkvmerge v68.0.0 ('The Curtain') 64-bit 'Geo Reportage [101139-013-A].mp4': Using the demultiplexer for the format 'QuickTime/MP4'. 'Geo Reportage [101139-013-A].fr.ass': Using the demultiplexer for the format 'SSA/ASS subtitles'. 'Geo Reportage [101139-013-A].mp4' track 0: Using the output module for the format 'AVC/H.264'. 'Geo Reportage [101139-013-A].mp4' track 1: Using the output module for the format 'AAC'. 'Geo Reportage [101139-013-A].fr.ass' track 0: Using the output module for the format 'SSA/ASS text subtitles'. The file 'geo_1.mp4' has been opened for writing. 'Geo Reportage [101139-013-A].mp4' track 0: Extracted the aspect ratio information from the MPEG-4 layer 10 (AVC) video data and set the display dimensions to 1280/720. Progress: 100% The cue entries (the index) are being written... Multiplexing took 16 seconds.All command line tool can be called from Python bye using subprocess module. Here in 5k player which in my main player on Windows,no border on any size. ![]()
Jul-06-2022, 01:26 PM
(Jul-06-2022, 01:26 PM)Pavel_47 Wrote: If I understand correctly, you mean that with Subtitle Edit you can change the color of the subtitles, right?Yes,of course that some of the point of this program. This took me a minute to figure out.i have only used Subtitle Edit to save as .ass before.Just select all text(Ctrl+a) and can start with right click( Remove all formatting ) then is clean text.Then the same right click and choice Color ,eg here i choose yellow and save the .vtt as test.ass G:\1_youtube\arte_env\Scripts λ mkvmerge -o geo_new3.mp4 "Geo Reportage [101139-013-A].mp4" "test.ass" mkvmerge v68.0.0 ('The Curtain') 64-bit 'Geo Reportage [101139-013-A].mp4': Using the demultiplexer for the format 'QuickTime/MP4'. 'test.ass': Using the demultiplexer for the format 'SSA/ASS subtitles'. 'Geo Reportage [101139-013-A].mp4' track 0: Using the output module for the format 'AVC/H.264'. 'Geo Reportage [101139-013-A].mp4' track 1: Using the output module for the format 'AAC'. 'test.ass' track 0: Using the output module for the format 'SSA/ASS text subtitles'. The file 'geo_new3.mp4' has been opened for writing. 'Geo Reportage [101139-013-A].mp4' track 0: Extracted the aspect ratio information from the MPEG-4 layer 10 (AVC) video data and set the display dimensions to 1280/720. Progress: 100% The cue entries (the index) are being written... Multiplexing took 19 seconds.Now is all text yellow. ![]()
Jul-06-2022, 02:27 PM
(Jul-06-2022, 01:54 PM)snippsat Wrote: Yes,of course that some of the point of this program. Yes, works ! And mkvtools do the job correctly - when I play the file in VLC, the subtitles are indeed yellow. Surprisingly, when I embed the same file in mmpeg, the color information isn't taken into consideration and subtitles remain white. I tried mkvtools from Python, as you suggested. Without doubts, I made a mistake because there is output file. import subprocess input_dir = 'mydir/' video_file = 'video.mp4' subtl_file = 'subtitles.ass' out_file = input_dir+'output_ccc.mp4' subprocess.run(['mkvmerge', '-o out_file', input_dir+video_file, input_dir+subtl_file]) |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
how to correctly set duration of video clips to merge? | oxidian | 1 | 933 |
Aug-03-2024, 05:35 PM Last Post: oxidian |
|
How to 'soft-embedd' subtitles with python-ffmpeg | Pavel_47 | 2 | 4,114 |
Jul-04-2022, 12:33 PM Last Post: Pavel_47 |