Hello everyone,
I'm looking for help with batch automations to create MKV files.
To start with, I've figured out how to convert MP4 to MKV using the following code:
Next, I'd like to integrate external subtitles into these MKV files, with classified and named tracks. For this I use the batch method by creating a .json option file of the first file with MKVToolnix.FOR /R %%A IN (*.mp4) DO "***********\MKVToolNix\mkvmerge.exe" -o "%%~dpnA.mkv" "%%~dpnxA"
Unfortunately, either the video and subtitles are duplicated, or the subtitle tracks are not embedded, as the lines between "(" and ")" must be removed. This is a pity, as this method works perfectly well when you have different subtitles for the same episode, as they are automatically detected for each one.
Is there a technique for doing this correctly?
Then in the final phase, I'd like to change the name of these files so that I can sort them in my library.
For example, I have :
Special Ops Lioness 01x01 Sacrificial Soldiers.mkv
Special Ops Lioness 01x02 The Beating.mkv
Special Ops Lioness 01x03 Bruise Like a Fist.mkv
And I'd like to get something like :
Special.Ops.Lioness.S01E01.1080p.mkv
Special.Ops.Lioness.S01E02.1080p.mkv
Special.Ops.Lioness.S01E03.1080p.mkv
Once again, what would be a simple way of achieving this?
The best thing would be to have everything in a single batch!
+ Reply to Thread
Results 1 to 2 of 2
-
-
in the final phase, I'd like to change the name of these files so that I can sort them in my library.
Try this code. Manipulate as required
Code:set title=Special Ops Lioness 01x02 The Beating.mkv set pt1=%title:~0,19% set pt2=%title:~20,2% set pt3=%title:~23,2% set title1=%pt1%.S%pt2%E%pt3%.1080p.mkv set title1=%title1: =.% echo %title1%
Input : Special Ops Lioness 01x02 The Beating.mkv
Output : Special.Ops.Lioness.S01E02.1080p.mkv
Similar Threads
-
Batch remove subtitles from mkv files
By rumblylwc in forum SubtitleReplies: 19Last Post: 26th Feb 2024, 08:15 -
batch create concat list for ffmpeg by the drag and drop of any files?
By marcorocchini in forum Newbie / General discussionsReplies: 0Last Post: 11th Aug 2022, 10:05 -
Create .ts files from a .mkv file while still recording the .mkv
By RKJ in forum Newbie / General discussionsReplies: 1Last Post: 14th Jul 2020, 22:51 -
Batch file to create nfo files for multiple videos
By olpdog in forum ProgrammingReplies: 2Last Post: 16th Jul 2019, 13:47 -
Batch combining multiple audio files with same picture to create mp4 files
By MD_89 in forum AudioReplies: 25Last Post: 1st Dec 2018, 23:29