Git Product home page Git Product logo

ipzard / mkvtoolnix-batch-tool Goto Github PK

View Code? Open in Web Editor NEW
186.0 186.0 11.0 96.89 MB

Batch video and subtitle processing program with the ability to add, remove, or extract subtitles from all video files in a directory and its sub-directories.

Home Page: https://ipzard.github.io/mkvtoolnix-batch-tool/

License: GNU General Public License v2.0

Python 16.08% JavaScript 75.71% HTML 0.85% SCSS 1.74% CSS 5.62%

mkvtoolnix-batch-tool's Introduction

header

Studied Web Technologies at Harvard University, skilled in JavaScript (e.g., React, Redux, Node, NextJS, Electron), TypeScript, Python, GraphQL, Webpack, Rollup, and more.

Programming Languages

python sass
html css

Libraries & Tools

react redux nodejs
electron webpack rollup
django flask

🕵️ GitHub Stats

stats languages

🗃️ My Repositories

  

  

  

mkvtoolnix-batch-tool's People

Contributors

dependabot[bot] avatar ipzard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mkvtoolnix-batch-tool's Issues

Support for idx/sub subtitles

Could you please support idx/sub subtitles as well. This is now the majority of the subtitles I would like to integrate into videos. Especially since there are two files per language.

Request details:

  • Update tool to support idx & sub subtitle file extensions.
  • Update readme to show these extensions in the supported subtitle file extension section.

portable app/no admin

usually open source apps dont need admin and im trying to run all my apps without admin so it would be nice to have a portable/no admin way to use this app.

Subtitle language not set.

Hi, i just discovered this fantastic tool. Just one thing i cant seem te get is the language in the subtitle file when it is merged.
In every file 01 appears and no language.

My file name is like this
This Show S05E01 Dutch.srt
This Show S05E01 Dutch.zip

Please tell me if I am doing something wrong.

Greets

Support one folder

Please support only one folder for serials. I have more files in one folder, for example S01E01.mkv ,S02E02.mkv atd... S01E01.srt, S01E02.srt atd.... now i Cannot add subtitles this folder. When I have 20 files i would create 20 folder. Thank you

Allow for overrides in language and default track settings via subtitle file naming convention

✨ Describe the feature
Currently all subtitle files of default language be flagged as the default. This can create unexpected behavior for the end-user. There are also issues when TextBlob and the underlining Google Translate API are unable to translate a particular file, in this case it would be convenient for end-users to have an option to manually set/force the language.

It was discussed in Issue 55 that appending .forced to mirror the behavior w/Plex and other tools may be helpful. Especially considering users with such tools may have already renamed their files.

This request includes the following:

  • Allowing subtitles to use .forced or .default to force them in as the default track. (e.g., "filename.forced.srt" or "filename.default.srt") in the event multiple subtitle files of the same (default) language exist.
    • Should also implement additional features mentioned in Issue 55.
  • Allowing language to be set with an ISO 639-1 code (e.g., "en", "nl", "fr", etc..) added to the end of the filename. This should override any potential detected languages, to allow for overrides in the event an incorrect translation was made.
  • Allowing multiple naming convention options to be set at once (e.g., "filename.en.forced.srt" or "filename.forced.en.srt").
  • Updating the readme to explain this new functionality.

Ensure automagically renamed subtitle file output file names are unique

🦟 Describe the bug
Ensure .srt file doesn't exist before deciding its file name when automagically converting to .srt in mkvtoolnix.py
Blocked by #40 since its solution will be used here.

Additional context
Currently, this is wrapped in a try/except block so it won't crash, but will result in the file not being converted if the file name is not unique. Although it will likely be unique, a guarantee will be better.

Auto convert unsupported subtitle files (e.g., .smi) when merging

✨ Describe the feature

Typically, .smi files cannot be combined with .mkv
(automatically convert to .srt and merge)

  • Should check if subtitle file is supported. If it's not, should attempt to convert with ffmpeg.
  • Should not leave new .srt file(s) in the user's directory(ies).. converted .srt files are deleted at the end of process.
  • Temporary/converted .srt file(s) should have unique names to avoid naming conflicts (e.g., {UUID}.srt).
  • Option to "Remove old video and subtitle files..." in settings should still work to remove the original (unsupported) subtitle files.

Automatically include font attachments

✨ Describe the feature

Merge files from a folder called "attachments", for example. Or rather, detect fonts (.ttf, .otf, .ttc) on the root folder and merges it to the video. As optional, remove the all attachments existent from the input video.

Additional context

Could be useful when working on anime series, because most of time you'll encounter to a lot of fonts to merge manually for each video.

Enhancement Request - Remember Output Folder settings

This is a great app, thank you very much!

It seems that one has to specify the Output folder each time this app is started? It would be great if there could be an option to remember the selected Output folder, and the path be displayed in the Output folder box. That way the Output folder would already b specified when the app starts.

Thanks in advance for your consideration.

Allow to distinguish multiple subtitle of the same langage

First, thanks for the tool, it is really great to see nicely polished tools like this! 🚀
Also, this is more a feature request that a bug report.

I would like to be able to use several subtitle tracks for a language. This would solve multiple common scenario where this can happen:

  • The video contains various version on a language: e.g. both force and full subtitle.
  • The video contains multiple variants of one language: e.g. this is quite a unique case to my knowledge, but French is almost always redubbed in France and in Quebec (Canada) resulting in two unique audio tracks. These are often called_VFF_/VFI/TrueFrench (French from France) and VFQ (French from Quebec).

Both cases are a bit tricky because forced vs full is an extra info not included in subtitle files and regional variation of languages share the same ISO 639_1 code...

Since the language is now determined by the content only via an external module (#5), both subtitle tracks are called from the language. A solution would be to have a drop list to let user specify names and codes for duplicate language. This requires the scan ordering to be consistent between entries, specially in case of TV series (#7).

Another solution could be to use the extra part of the name which is currently ignored to include those extra informations. This may require the user to name their file correctly, but this is currently already the case in some measure and should be easy to automate.

I like the second approach better as it is more robust and generic and could allow you to include other kind of extra info latter on to solve issues or add features.

Example:

  • S01E01_Title_1.mkv
  • S01E01_Title_1.fre.srt
  • S01E01_Title_1.fre.vfq.srt
  • S01E01_Title_1.eng.srt
  • S01E02_Title_2.mkv
  • S01E02_Title_2.fre.forced.srt
  • S01E02_Title_2.fre.srt
  • S01E02_Title_2.eng.srt

I just quickly looked at the core python code, and it looks like an easy achievable task!
I'll probably try to write a poc in the coming days / weeks. If so, I'll gladly let you know by opening a pull request.

Cheers 😄

Feature Request: Support the same for audio tracks

So basically instead of merging in subtitles, do the same for audio files.

Bonus points if it could extract the audio from another video and merge it into the target somehow, but I guess that's a bit out-of-scope 😅

I'm not sure if this feature makes total sense, because it might be necessary to sync the audio (async audio is more of a problem than async subs)...

App doesn't launch on Windows Vista

Hello Daniel

First of all....Thanks for your soft. ...it is what I dream to manage my TV shows mkv & subtitles
Unfortunately I have an old laptop on vista.... I installed your program.... but when I launch it => nothing happens
Is it normal?
What is the minimum version of Windows for your soft?

Thanks

Persian Language Support

Hi,
this is a huge time saver tool absolutely useful.
It would be much better if it supports Persian language (per/fa) as well.
And if possible, please add more dark themes.
Thank you.

Program loads but producs the message "python39.dll missing"

🦟 Describe the bug
A clear and concise description of what the bug is.
HP DV6 Running Win7 Ultimate x64 All updates

On startup the program flags Error loading Python DLL 'C:\program files (x86)\Vido\MKVToolnix Batch Tool\app-2.3.1\resources\python39.dll.
LoadLibrary: The specified module could not be found

Looking at this directory with explorer, python39dll is present (26/5/2021 4359kb)

Steps to Reproduce
Zip file downloaded
Run .msi
Change default directory to video\
Run program

Click OK on error message
Program window appears
Leave default options
Select source and target directories
Click merge
Icon whirls for a coupe of seconds
Procsses 0 out of 0
Error: There was an error that prevented the batch from being processed
Pressing OK returns the program to the panel with the directories selected

Problem still occurs if program is installed in default directories

Expected behavior
Program to load no error.

Screenshots
Screenshots of the various messages and of the two directories
image
image
image
image
image

Additional context
x64 Win 7 Ultimate all updates HP DV6 12GB Ram 40GB free on the relevant drive

can you add language option on the video?

✨ Describe the feature
Thanks for this wonderful tool. but can you add language option on subtitle and audio files? when I merge with "MKVTOOLNIX" I can see the language tag when I check the media info. but after emerging with this tool language option not available for any subtitle and audio. can you add this feature please ?

Allow setting an intermediate destination for new files

When working with HDDs, sequential access is paramount for performance. Therefore, reading from an input file and writing an output file to that same directory is counter productive for performance. Ideally, instead, users should be able to select an intermediate folder where temporary files are written to before being moved to their final destination.

E.G.

  1. Read input file from remote HDD //nas/files/tv/show/s01/e01.mkv
  2. Write new file to either another remote or local HDD: /home/user/Desktop/e01_new.mkv
  3. Replace old file with new file: `mv /home/user/Desktop/e01_new.mkv //nas/files/tv/show/s01/e01.mkv

This method guarantees that all HDDs are either read or written to sequentially - hugely increasing their performance. Also, when working with remote targets, it can help alleviate network bottlenecks which are usually an issue when working with files over wifi as the intermediate file can be written locally before being moved back to the remote target.

file extension merge error

If the file name contains "." it is merged into one file.

example:

input :
The One. S01E01.mp4
The One. S01E01.srt
The One. S01E02.mp4
The One. S01E02.srt

output :
The One. S01E01.mkv (Include The One. S01E01.srt,The One. S01E02.srt)
The One. S01E02.mp4

Source directory folder gets deleted after process

The more I use this app, the more I like it :)

Let's say I have a folder named Video Files, and my videos and srt files are in that. Once the app has completed processing all the files, the source folder Video Files gets deleted if the Remove old video and subtitle files from source directory when finished option is selected.

I don't know if this is a bug, or whether that is intended. IMHO the source folder shouldn't get deleted, as it could be a working folder.

Add "reporting bugs" section to readme

Some users may just find this tool from an internet search or forum link. Update the readme to include a "reporting bugs" (or similar) section so users who are unfamiliar with GitHub know how to report any issues they might encounter.

occasional mistag as vietnamese or german instead of english

🦟 Describe the bug
A clear and concise description of what the bug is.

Steps to Reproduce
Steps to reproduce the behavior:
have an English mkv file and an English srt file and despite the tool set to default english it will stage some as german or Vietnamese

Expected behavior
expect them to be tagged as english

Screenshots
before
NYPD Blue S05E11 You're Under a Rasta [WEBDL-1080p HEVC AAC-2.0][EN].mkv
NYPD Blue S05E11 You're Under a Rasta [WEBDL-1080p HEVC AAC-2.0][EN].srt

after
NYPD Blue S05E11 You're Under a Rasta [WEBDL-1080p HEVC AAC-2.0][EN].mkv
image

Additional context
Add any other context about the problem here.

Merging .srt

🦟 Describe the bug
Your program work very good, fast and precis but i have a question

When opening the merged mkv in VLC i cant see any Language, only 1,2,3,4 etc

My mkv and srt have exact the same name like below, and the language that mkv merge use to determine country Norway ( no ) is in the srt file:

MyMovie.mkv
MyMovie.no.srt

So my question, do the srt file need to be renamed to MyMovie.Norwegian.srt for it to work
if yes maybe it need to follow ISO 639-1 Code https://www.loc.gov/standards/iso639-2/php/code_list.php

Tnx in advance

Look into production and development builds for MacOS & Linux

Currently python is using/referrencing the mkvmerge.exe file for CLI commands on line 29 and 30 of the mkvtoolnix.py file (link below).. Check if there are Linux & MacOS CLI packages for mkvmerge, if so.. add them to ./resources/mkvtoolnix and use the right one based on the OS.

Packaging scripts should omit any CLI packages not relevant for the OS they're packaging for.

https://github.com/iPzard/mkvtoolnix-batch-tool/blob/master/resources/modules/mkvtoolnix.py

Enable multiple subtitles to be merged into a single file

Currently, only one subtitle file is allowed in the subdirectory when making a batch, and language is determined by the user's selection in a dropdown on the settings page. However, the tool should be able to merge multiple subtitles into a single video.

  1. Tool should automatically determine language w/o user interaction by reviewing text in the subtitle file(s) added.
  2. If a language cannot be determined, use "Und" so it's not set to any particular language.
  3. Update the settings to show "Default language track" instead of "Subtitle language", the preferred language will be the default track in the event of multiple subtitles being added. Title attribute with information should be included so the user gets more information about this feature on hover.

The following SO link has more information about determining language using a text string.
https://stackoverflow.com/questions/39142778/python-how-to-determine-the-language

no valid directories found error

no valid directories found error, even directory is correct. attached pictures. i have latest win 10 pro with updates installed.

Functions to add to cleaning of subtitles

✨ Describe the feature
Hello! Could it be possible to add the following optional functions to the cleaning of the subtitle?

  • Strip text between parentheses ( )
  • Strip text between curly brackets { }
  • Strip text between angle brackets < >
  • Strip text between square brackets [ ]
  • Strip text between asterisks * ... *
  • Strip any cue containing a music note (♪)
  • Strip speaker labels
  • Fix two line subtitles with an empty line in the middle
  • Fix all-uppercase subtitles

Thank you!

subtitle codes are being stripped out of srt files

i'm seeing an issue where srt files that are being merged into an mkv are losing their subtitle code.

files in the image below work as expected when using mkvtoolnix:
image

but using the batch tool, they all turn into unknown.

i just grabbed your most recent update, wondering if that might have something to do with it.

Error running on Linux

I tried to run the program following the instructions provided via this README but on Linux I get the following error: TypeError: window.require is not a function raised by ./src/utils/requests.js:4.

Since I am not qualified in electron nor in react, I assumed I am doing something wrong and search for a solution online.
This kind of error seems to be trending and give a lot of possible solution 😅. I spent to many hours trying as much solutions as I could without success.

The only one that give a different error is replacing window.require('electron') by a direct require('electron') which errors fs.existsSync is not a function from node_modules/electron/index.js:7 which looks even weirder 😯 ...

I also tried to produce a Windows build, but I figured out after too much time again that pyinstaller does not support cross compilation 🤦.

I am not sure if I am doing something wrong or if the config is missing something to work for Linux environments.
So I would be very grateful if you have any idea on how I can run your application on Linux!

Incorporate SocketIO to share progress of files being processed while the user waits

Currently, there's a loading screen, however with very large batches (e.g., 20 videos/subtitles) it can take a few minutes. It would be a nice enhancement to replace the text "Your files are being processed" with "Processing x of y files" where x is the current file's index and y is the length of the list. Using socket IO to emit an update to x each time a file is processed.

Add subtitle Name and Language

The tools work really well, is it possible to add the possibility to choose the language of the subtitles and the name of the subtitle?

When you open the mkv the subtitle is called 01/02/03 and no language is specified it is a bit difficult to choose the right one.

Drag and drop folder to set source directory

It would be convenient if it was possible to drag and drop a folder into the program window to set a new 'source directory'.

Thank you VERY much for this program, I am not a coder and don't understand how to use the various scripts I found while trying to google a solution to this. This program is so useful.

Error with ! in the title

🦟 Describe the bug
Hello! First of all, thank you so much for this tool.
I had a subtitle/video with an exclamation point in the title ("2x18 I Drank the Mold!.mkv"). The merge worked but what it came to delete the original video and sub and rename the new video (removing "(1)) the program said it encountered an error and stopped.
I have removed that video from the folder and all the others worked perfectly.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Add some files to merge, at least one of them having a "!" in the name.
  2. Set the options to "Remove existing subtitles from video before merging new ones", "Remove old video and subtitle files from source directory when finished" and "Remove known advertisement from subtitles before merging".
  3. Start the merge.
  4. See error when the program tries to delete old video and subtitle files and rename the new one.

Expected behavior
It should show no error and go on with the merging of the other files.

German Umlaute äöü outputs cryptic texts. Works with manual import to MKVtoolnix

🦟 Describe the bug
German Umlaute äöü outputs cryptic texts.
Works with manual import to MKVtoolnix.

Steps to Reproduce
The tool works without an error message, but when opening the output file, the subtitle text does not show the correct symbols for the German Umlaute äöü letter.
Works with manual import to MKVtoolnix of the very same files.

Keep/Reuse SRT SDH and FORCED attributes

I want to be able to merge multiple srt files which contain the type of subtitle they are after being merged. The ultimate goal is to output video files (mostly tv series) with the endpoint being used on my Plex Server.

Filename examples
video.mkv
video.eng.srt (standard subtitles)
video.eng.sdh.srt (hearing impared)
video.eng.forced.srt (forced)

Currently, when using your app with the file names above, it merges all 3 srt files into the mkv, but it names them 01, 02, and 03 and does not set either the forced flag or the Hearing Impaired flag.

If this can't be accomplished and/or is not within the scope of this project, perhaps you could create a default naming scheme for the merged srt files -

01 - standard
02 - SDH
03 - forced

I don't know, there might already be a standard srt naming scheme already that I'm not aware of that could be more beneficial for others.

Thank you for considering adding this feaure.

Extract all subtitles from mkv files

✨ Describe the feature
Hello and thanks again for this wonderful tool.

Would it be possible to add a function that extracts the subtitles from all mkv files in a folder and puts them in the same folder with the correct names (same as the video)?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.