Giter VIP home page Giter VIP logo

mkvaudiosubtitlechanger's Introduction

Introduction

This program helps to change audio and subtitle tracks of mkv files without rewriting the file. Only track properties will be updated.

Requirements

  • Java 11 or higher
  • mkvtoolnix installation

Execution

Minimal usage: java -jar mkvaudiosubtitlechanger.jar --library "X:/Files" --attribute-config eng:ger eng:OFF

Safe usage (best for testing before applying to whole library): java -jar mkvaudiosubtitlechanger.jar --library "X:/Files" --attribute-config eng:ger eng:OFF --safe-mode

Attribute-config must be entered in pairs: audio:subtitle; Example: jpn:eng. More about this topic here.

Available parameters

 -l,--library-path <arg>           Path to library
 -a,--attribute-config <arg>       Attribute config to decide which tracks to choose when
 -p,--config-path <arg>            Path to config file
 -m,--mkvtoolnix <arg>             Path to mkv tool nix installation
 -s,--safe-mode                    Test run (no files will be changes)
 -c,--coherent <arg>               Try to match all files in dir of depth with the same config
 -cf,--force-coherent              Force coherent and don't update anything if config fits not whole config (default: false)
 -n,--only-new-files               Sets filter-date to last successful execution (Overwrites input of filter-date)
 -d,--filter-date <arg>            Only consider files created newer than entered date (format: "dd.MM.yyyy-HH:mm:ss")
 -t,--threads <arg>                Thread count (default: 2)
 -i,--include-pattern <arg>        Include files matching pattern (default: ".*")
 -e,--excluded-directories <arg>   Directories to be excluded, combines with config file
 -fk,--forced-keywords <arg>       Additional keywords to identify forced tracks
 -ck,--commentary-keywords <arg>   Additional keywords to identify commentary tracks
 -ps,--preferred-subtitles <arg>   Additional keywords to prefer specific subtitle tracks
 -v,--version                      Display version
 -h,--help                         "For help this is" - Yoda

If you need more information about how each parameter works, check out this wiki page.

All parameters can also be defined in a config file.

Build requirements

  • JDK 11 or higher
  • Maven 3
  • Git

Build from source

git clone https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
cd MKVAudioSubtitleChanger
mvn package

mkvaudiosubtitlechanger's People

Contributors

dependabot[bot] avatar ratzzfatzz avatar

Stargazers

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

Watchers

 avatar  avatar

mkvaudiosubtitlechanger's Issues

Exclude files

  • Exclude files by entering directories
  • Exclude files by pattern
  • Include files by pattern

Create a wiki page

Create a wiki page explaining each parameter in more detail. Link to wiki within -help.

Series & Season coherent updating

If a 12 episode series has 6 episodes matching your first configuration and 6 episodes matching your second configuration, the overall experience of binging that show diminishes.

With the coherent flag set it will try to update the series / season with the same configuration if available.
Parameters:

  • Whole show coherent
  • Only season coherent
  • Apply best match config if coherence is not possible
  • Don't update files if coherence is not possible
  • Proper directory structure is needed (and needs to be entered)

OFF is not working

Environment
Java Version: 11
MKV Audio Subtitle Changer version: v3.0

Describe the bug
OFF for subtitles is not working

Expected behavior
OFF to be treated as remove all defaults for subtitle tracks

Remove forced tag from audio tracks

Some files have forced audio tracks. This is currently not touched resulting in some video players picking forced track over default track.
Remove forced tag from audio track allowing more players to pick to correct audio track.

Default audio track is not set when not default subtitle track is set

Environment
Java Version: 11
MKV Audio Subtitle Changer version: v3.0

Describe the bug

  • Audio (hin [default], eng)
  • Subtitle (OFF [default], hin, eng)

Changing the file with eng:OFF -> nothing happens
Changing the file with eng:eng -> audio still hin, but eng subs
Changing the file with eng:OFF -> audio eng, subs off

Expected behavior
Result of third execution should happen the first time

Logs

2024-02-17 00:10:11,941 | INFO  | pool-2-thread-1 | "C:\Program Files\MKVToolNix/mkvpropedit" "C:\Users\<ANON>\Desktop\MKVAudioSubtitleChanger-3.0\MKVAudioSubtitleChanger-3.0\library\<VIDEO_FILE>.mkv" --edit track:3 --set flag-default=1  
 2024-02-17 00:10:11,983 | INFO  | pool-2-thread-1 | Updated C:\Users\<ANON>\Desktop\MKVAudioSubtitleChanger-3.0\MKVAudioSubtitleChanger-3.0\library\<VIDEO_FILE>.mkv 
 2024-02-17 00:10:12,017 | INFO  | main | ResultStatistic: filesTotal=1, excluded=0, shouldChange=1 (failedChanging=0, successfullyChanged=1), noSuitableConfigFound=0, alreadyFits=0, failed=0, runtime=0s 
 2024-02-17 00:10:22,380 | INFO  | pool-2-thread-1 | "C:\Program Files\MKVToolNix/mkvpropedit" "C:\Users\<ANON>\Desktop\MKVAudioSubtitleChanger-3.0\MKVAudioSubtitleChanger-3.0\library\<VIDEO_FILE>.mkv" --edit track:3 --set flag-default=1 --edit track:5 --set flag-default=1  
 2024-02-17 00:10:22,427 | INFO  | pool-2-thread-1 | Updated C:\Users\<ANON>\Desktop\MKVAudioSubtitleChanger-3.0\MKVAudioSubtitleChanger-3.0\library\<VIDEO_FILE>.mkv 
 2024-02-17 00:10:22,459 | INFO  | main | ResultStatistic: filesTotal=1, excluded=0, shouldChange=1 (failedChanging=0, successfullyChanged=1), noSuitableConfigFound=0, alreadyFits=0, failed=0, runtime=0s 
 2024-02-17 00:11:52,894 | INFO  | pool-2-thread-1 | "C:\Program Files\MKVToolNix/mkvpropedit" "C:\Users\<ANON>\Desktop\MKVAudioSubtitleChanger-3.0\MKVAudioSubtitleChanger-3.0\library\<VIDEO_FILE>.mkv" --edit track:2 --set flag-default=0 --edit track:3 --set flag-default=0 --edit track:3 --set flag-default=1 --edit track:5 --set flag-default=0  
 2024-02-17 00:11:52,937 | INFO  | pool-2-thread-1 | Updated C:\Users\<ANON>\Desktop\MKVAudioSubtitleChanger-3.0\MKVAudioSubtitleChanger-3.0\library\<VIDEO_FILE>.mkv 
 2024-02-17 00:11:52,969 | INFO  | main | ResultStatistic: filesTotal=1, excluded=0, shouldChange=1 (failedChanging=0, successfullyChanged=1), noSuitableConfigFound=0, alreadyFits=0, failed=0, runtime=0s

~Reported by u/lurkingtimer

Docker Deployment

Monitor file system for changes and update if change is noticed. This should work with coherent feature.

  • Monitor multiple directories with different configurations
  • Docker image build & publication
  • Time Based execution

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.