batch merging .srt files with mp4 episodes
#1
I am hoping this is the right place, and an appropriate topic for the forum. I haven't read all the rules, I admit, but pulling my hair out trying to figure this on my own.

Can someone tell me of a software (free or otherwise) that will burn-in .srt files with movies files, all at once? I have a series with 24 episodes, for example, and all the .srt files are also provided. But combining one at a time with Handbrake for example, is hard as many of you know I'm sure.

I think the paid version of Movavi Converter will do that, but hoping to find a free one. I convert my mkv's or avi's with Any Video Converter so I don't need a converter. But in the future, if it's easier to convert, and burn-in the .srt's with one program, I would go for that.

Any feedback welcome, as I've searched "how to's" video and text all morning now and really need some help. Seems everywhere I looked it was one subtitle to one show/movie at a time. Thank you in advance for any help Wink
Reply
#2
You can perhaps write a batch script like this (Windows shell) or this (Bash).

*Modify scripts suitably.
Reply
#3
(May 11, 2020, 03:26 am)SectorVector Wrote: You can perhaps write a batch script like this (Windows shell) or this (Bash).

*Modify scripts suitably.
Hi and thank you for this info but after checking out the threads, I need a tutorial on how to use the script.  I've been checking online and found a couple on "batch merging" but not specific to videos with .srt.  I'll look again today, and may find something on "how to".  I've accomplished a lot without knowing a lot, but just following directions Wink
Reply
#4
Open notepad.exe
File->New

copy/paste

for %%f in (*.mkv) do (
echo %%~nf
mkvmerge -o "%%~nf_New.mkv" "%%~nf_New.mkv" --language 0:eng "%%~nf.srt"

)

save as C:\Windows\merge-srt..bat

Find in explorer, right click, Send to: Desktop

You may need to click on the icon and set the working directory to where you process the files.
Reply
#5
Download and install mkvtoolnix from here


Now try the batch file (as above) on just one video file and srt file.

Keep your source files (video and srt) safely/separately. Let's not disturb them until the merging is done.

Create a new working folder (call it merged or something) and copy just one video and one srt file from your source.
Ensure video and srt file names match. (Eg., MyShow S01E01.mp4 and My Show S01E01.srt)
Run the batch script as above, with any necessary modifications.

You should now have a new file MyShow S01E01_New.mp4
Play it and check if it worked.
If yes, copy all the files from your source to the working folder and run the batch file.
If not, post here.

Remove the source once you are satisfied the merging is successful.

Search the Net for 'DOS for loop syntax' and 'mkvmerge syntax' if you are interested.
Reply
#6
Can't thank you both enough for your help. I did look into Windows Powershell yesterday so I have some understanding of that now. I will go over your info this a.m. and see if I can put it all together and try out one show with .srt.

Thank you again, and I'll go see what I can do Smile One thing is that some of my files are mp4 now as I used the "Any Video Converter" on them. I do have my MKV saved on one series, and the .srt's so I can work with that bunch.
Reply
#7
Looks like you can handle it.

You could convert all the files to mkv or mp4, for uniformity.
mp4 can also be soft-subbed.

See here for conversion.
Reply
#8
I had to set up the ability to add script with Windows Powershell.  I chose unrestricted because I live alone and no one uses my computer.  So now I know how to add script but I have to figure out how it works with the software.  I haven't downloaded the mkvtool yet.  Could this script work with handbrake?  If not, I'll just download MKV.  Still don't know if it will work with mp4, or maybe avi's. Oh, forgot to mention Anyconverter and yes, would like them all to be the same to save confusion, since I am easily confused Wink

One more thing, is that I have to convert from mkv because they aren't recognized on my Roku TV ;(

(May 15, 2020, 01:46 am)waregim Wrote: Open notepad.exe
File->New

copy/paste

for %%f in (*.mkv) do (
        echo %%~nf
        mkvmerge -o "%%~nf_New.mkv" "%%~nf_New.mkv" --language 0:eng "%%~nf.srt"

)

save as C:\Windows\merge-srt..bat

Find in explorer, right click, Send to: Desktop

You may need to click on the icon and set the working directory to where you process the files.
I'm stuck. I'm getting errors about the script, I'll post a snip below.  I tried adding the "( or )" but not sure about spaces etc.  I also tried the files merge in MKV Tool but no go.  I think I have to edit the script but doing it wrong evidently. Again, thanks for any help, feel I'm almost there Wink    
Reply
#9
The script you are using is for Windows Command shell.
It has different syntax than Powershell. Hence the error.

Type 'start cmd' and try your scripts in that.
Or start the cmd shell from Windows menu.

Suggest you write your script in a batch file and run it, rather than typing it on the command shell.
Reply
#10
To clarify:

Windows Power Shell is a totally different language than the Batch language that is default on every PC. Powershell needs to be installed, and requires special .NET libraries.

Batch files end in .BAT. As mentioned you need to run Cmd.exe. you will come up with a black screen and a C:> prompt. This means you are at the black heart of the M$ beast. And have the most contol over it. It is known as Console Mode.
With FAR you do not need to run CMD.exe, even in the normal Graphics mode. Just create a link to the desktop for it.

If you are going to be doing scripting in Console Mode, I highly recommend installing Far Manager. It runs in both Console and Graphics mode, and will make managing files and scripts infinitely easier.

Power Shell has a much more complex language than Batch, but I would personally recommend using the time to learn Python instead. But for now, Batch will suffice.

Do NOT use a wordprocessor for Batch files (or any script file). Use notepad.exe, or other *text* editors.

Also: Set Windows (as well as FAR) to ALWAYS show file extensions. What comes after the last dot. This is critical for P2P because lately sporgers have been using the .lnk extension for video files, which can run their boogers.

Only certain file extensions can be run as 'commands'. The rest like videos, are data, or library routines.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  problems with files not downloading krakbaknsak 2 2,018 Sep 16, 2024, 05:58 am
Last Post: onlysenate
  Confusion on replacing DLL files dachicklett 7 29,891 Jul 20, 2024, 08:22 am
Last Post: wiseumar15
  Downloading from Amazon in MP4 on Windows NexusWraith 0 1,585 May 23, 2024, 15:14 pm
Last Post: NexusWraith
  Reducing mp4 file sizes Mach234 2 1,872 Mar 05, 2024, 10:18 am
Last Post: Mach234
  Internet security wont allow me to open files nordic_druid 1 5,361 Apr 19, 2023, 19:50 pm
Last Post: RobertX



Users browsing this thread: 3 Guest(s)