Hi, I have some files with different situations, For example one file has 2 audio tracks and no subtitle , the other file has 1 audio track 3 subtitle . So i want to have script that remove all tags from all part of video including this settings:
Remove title and chapters and ags from the file
Remove (ALL) Video track name and set language to undetermined
Remove (ALL) Audio track name and set language to undetermined
Remove (ALL) Subtitle track name and set language to undetermined
BUT HERE IS MAIN PROBLEM:
Mkvpropedit only edit file IF the settings are EXACTLY the one we enter for example when try all settings for multiple files in Jmkvpropedit i receive message like this:
----------
The file is being analyzed.
Error: No track corresponding to the edit specification 's3' was found. The file has not been modified.
----------
So in above example most of my files have been edited but the file which had only s1 and s2 track and the file remains untouched. So I ask if you can help me with this using a script ( IDK much about scripting but I have read some docs and i think it is possible with (for %a) codes or something like that xD.
And Thank You Very Very Very Much , I am on this for 2 days now.
+ Reply to Thread
Results 1 to 3 of 3
-
-
You could try this batch file. It uses ffmpeg.exe. I have nothing to test it with properly.
Output is in the New\ folder. Should be quite quick.
Code:@echo off SETLOCAL if not exist New\ md New for %%a in ("*.mp4", "*.mkv") do call :process "%%a" goto :end :process :: Find all streams and set mapping parameters. ffmpeg -i "%~1" -y nul 2>&1 | find "Stream #1" > nul if %ERRORLEVEL% lss 1 set map1= -map 1 ffmpeg -i "%~1" -y nul 2>&1 | find "Stream #2" > nul if %ERRORLEVEL% lss 1 set map2= -map 2 ffmpeg -i "%~1" -y nul 2>&1 | find "Stream #3" > nul if %ERRORLEVEL% lss 1 set map3= -map 3 ffmpeg -i "%~1" -map_chapters -1 -map_metadata -1 -metadata title="" -metadata comment="" -map 0 %map1%%map2%%map3% -c:v copy -c:a copy -c:s copy -y "New\%~1" goto :eof :end pause
(It's a slightly rubbish script and could be better written.But, if it works.....)
Last edited by pcspeak; 21st Feb 2022 at 08:58. Reason: left out a colon.
Similar Threads
-
Where is documentation for the x264 encoder
By exekutive in forum Video ConversionReplies: 11Last Post: 18th Jan 2022, 08:26 -
Found an awesome script to download widevine content (mpd) and decrypt it
By royjeon215 in forum Latest Video NewsReplies: 8Last Post: 11th Nov 2021, 15:26 -
Documentation for QSV enabled filters?
By BartZLederman in forum Video ConversionReplies: 3Last Post: 4th Aug 2021, 10:14 -
Help creating batch script for Header editor using mkvtoolnix.
By Jaco in forum Newbie / General discussionsReplies: 1Last Post: 23rd Apr 2021, 19:16 -
SvtHevcEncApp documentation?
By Selur in forum Newbie / General discussionsReplies: 19Last Post: 28th Sep 2019, 11:34