Hello,
2 years ago, I found on this forum I think a code to create a batch script (.bat) on a text editor like notepad to extract the subtitles from an MKV file.
It didn't matter which folder the video was in, I just copy and pasted the batch file into the same folder as the video (nothing else), clicked on the batch file and it gave me the srt file no matter the file name of the video is.
The problem is that I changed my PC and I can't find the batch file anymore. I tried to do some search on the forum but now I only find posts leading to software or something like that.
If anyone has any idea about this, please let me know.
Regards![]()
+ Reply to Thread
Results 1 to 6 of 6
-
Last edited by pouki; 10th Sep 2022 at 10:08.
-
There are several programs that extract the subtitle channel from the video container. The most famous would be ffmpeg. The script that you lost most definitely had to call an external program to do the heavy lifting.
Suggest that you post a link to your video container and I am positive that some kind soul will guide you through the process.
In the meanwhile, use your friend Google to determine how to use ffmpeg to determine whether the video container has a subtitle component. Then use your friend again as to how to capture the subtitle from the container.
Once these two steps are known (basically using ffmpeg flags), then it will be quite the no brainer to create a script to implement the process.
I am positive that you are up to the challenge. -
Hi jack.666 and thanks for your answer. The video container is an 1080p mkv.
I know a bit about how ffmpeg works, I use it to assemble video and sound after "decrypting".
I also know how to extract subtitles from the video if I paste the video in the users/my nickname folder (where all the tools are: mp4decrypt, ffmpeg, youtube-dlc etc).
For example with this line: "ffmpeg -i video.mkv -map 0:0 video.srt" I have the subtitle without any problem.
But with the script, no matter which folder the video was in, when I pasted the script into a folder and opened it, it made the subtitles of the video(s) in the folder available. -
Put a copy of ffmpeg.exe in C:\windows\system32. Then your batch file should look like:
Code:for %%F in (*.mkv) do (ffmpeg -i "%%~dpnxF" -map 0:s:0 "%%~dpnF.SRT" )
folder contents before running batch file:
[Attachment 66683 - Click to enlarge]
folder content after running batch file:
[Attachment 66684 - Click to enlarge] -
You can also use gMKVExtractGUI. It has a simple interface that lets you pick anything inside an MKV container.
Similar Threads
-
How can i extract subs that seemingly do not exist?
By Unknown01 in forum Newbie / General discussionsReplies: 22Last Post: 4th May 2021, 17:14 -
Batch file to extract/convert all tx3g files in an .mp4 file
By olpdog in forum SubtitleReplies: 1Last Post: 23rd Aug 2020, 18:40 -
How to batch extract audio from avi files?
By Nico Darko in forum AudioReplies: 6Last Post: 28th Apr 2020, 03:34 -
Batch extract audio
By Aludin in forum Newbie / General discussionsReplies: 6Last Post: 3rd Jul 2019, 10:31 -
Extract hardcoded subs from .avi ?
By maxman32 in forum SubtitleReplies: 5Last Post: 20th Jul 2018, 19:11