Comments (2)
Here's a bash script for anyone using Linux. This script will save a file named {episode name}.{language}.srt in the same directory as your mkv.
#!/bin/bash
FOLDER=$1
FILES="$(find "$FOLDER" -name '*.mkv' -printf '%p\n')"
while IFS= read -r file;
do
printf "\nProcessing ${file}\n"
dotnet PgsToSrt.dll --input "$file" --tracklanguage eng
done <<< "$FILES"
Modify the language to your desired language and save this as a file in the same directory where PgsToSrt.dll is, chmod +x it to make it executable, and run it
./PgsToSrt.sh "/path/to/folder"
Example
NAS>./PgsToSrt.sh "/mnt/media/plex/tv/Eureka (2006)/Season 1"
Processing /mnt/media/plex/tv/Eureka (2006)/Season 1/Eureka - S01E09 - Primal.mkv
PgsToSrt 1.4.1.0
2021/12/11 17:27:04.290|INFO|Detected tesseract language data for language 'eng'.
2021/12/11 17:27:13.922|INFO|Starting OCR for 697 items...
...
2021/12/11 17:27:45.144|INFO|Finished OCR.
2021/12/11 17:27:45.155|INFO|Saved '/mnt/media/plex/tv/Eureka (2006)/Season 1/Eureka - S01E09 - Primal.eng.srt' with 697 items.
from pgstosrt.
It's not directly possible, but you can create a batch file:
for %%# in (C:\pathtomks\*.mks) do c:\somepath\pgstosrt.exe --input "%%#" --output "%%~dpn#.srt"--trackLanguage eng --otheroptions ...
from pgstosrt.
Related Issues (20)
- entrypoint.sh for the docker container cannot handle spaces
- Error using docker HOT 3
- Exception occurs on Ubuntu 20.04 HOT 5
- read_params_file: parameter not found: HOT 2
- Question HOT 2
- How to Use with MKS? HOT 1
- 1.4.2 release is missing .NET5 binaries HOT 1
- Linux Docker build fails due to .NET 6 HOT 1
- Can we pack this as a dotnet tool?
- Problem with Ubuntu 23.04 and libtesseract4 HOT 1
- Accept other leptonica's names HOT 1
- Fix OCR errors option ? HOT 5
- Model used for trained data HOT 2
- error NETSDK1129: The 'Publish' target is not supported without specifying a target framework.
- Vosub support?
- Get dotnet error during execution HOT 2
- Update to .NET 5.0
- Update to Tesseract 4 HOT 1
- Update upstream dependencies, consider re-doing your customizations on top of the original code instead. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgstosrt.