VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Hello All,

    The default audio track is the English one, I want to change it to Japanese and removing the English track.

    Also i want to add the Arabic subtitle files i already have.

    Is there anyway to do this to all the videos at once since it's very very hard to do it manually for every file.

    Thanks and appreciated in advance
    Quote Quote  
  2. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Originally Posted by MohamedYousri View Post
    The default audio track is the English one, I want to change it to Japanese and removing the English track.
    If the order of the audio tracks on all you videos does NOT change:
    e.g.
    1. en
    2. ja
    3. es
    4. etc

    Then a batch file can be written one way.
    If the order DOES change then there is the need to find the --track-order.

    Also i want to add the Arabic subtitle files i already have.
    What format are the subtitles in? (.srt, .ass, .vtt, etc)
    Are they always the same format?

    Cheers.
    Quote Quote  
  3. Originally Posted by pcspeak View Post
    Originally Posted by MohamedYousri View Post
    The default audio track is the English one, I want to change it to Japanese and removing the English track.
    If the order of the audio tracks on all you videos does NOT change:
    e.g.
    1. en
    2. ja
    3. es
    4. etc

    Then a batch file can be written one way.
    If the order DOES change then there is the need to find the --track-order.

    Also i want to add the Arabic subtitle files i already have.
    What format are the subtitles in? (.srt, .ass, .vtt, etc)
    Are they always the same format?

    Cheers.
    ASS Subs

    first audio always English , 2nd Javanese
    Quote Quote  
  4. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Hi.
    Output goes in the sub-folder New\
    Your path to mkvmerge.exe may be different.
    Code:
    @echo off
    if not exist New\ md New
    for %%a in ("*.mkv") do "C:\Program Files\MKVToolNix\mkvmerge.exe" --output "New\%%a" --audio-tracks 2 --language 0:und --language 2:fr --track-name 2:Commentary "%%a" --sub-charset 0:ISO-8859-6 --language 0:ar "%%~na.ass" --track-order 0:0,0:2,1:0
    pause
    If the subtitles come out incorrect, try removing --sub-charset 0:ISO-8859-6 from the command.
    Your .ass subs may have a different sub-charset within the file.
    Cheers.
    Last edited by pcspeak; 25th Feb 2022 at 13:49. Reason: underscore instead of a hyphen in 'ISO-8859-6'
    Quote Quote  
  5. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    I made a couple of assumptions.

    1. You're working with MKV files.
    2. You knew to have matching video and subtitle file names.
    e.g.
    My Great Video.mkv
    My Great Video.ass

    So, I changed my batch file to do checking.
    Code:
    @echo off
    if not exist New\ md New
    for %%a in ("*.mkv") do if not exist "%%~na.ass" (
    	echo "%%a" - Matching "%%~na.ass" not found &pause
    	) else (
    	"C:\Program Files\MKVToolNix\mkvmerge.exe" --output "New\%%a" --audio-tracks 2 --language 0:und --language 2:fr --track-name 2:Commentary "%%a" --sub-charset 0:ISO-8859-15 --language 0:ar "%%~na.ass" --track-order 0:0,0:2,1:0
    	)
    echo Press any key to Exit. &pause>nul
    The part above about '--sub-charset 0:ISO-8859-6' still applies.

    Cheers
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!