I am having trouble with removing tags from MKV files. I can't figure out how to remove a comment/description tag with mkvpropedit, and Windows 10 says file access denied, that I need permission to edit the file, even though I am an administrator.
I found this other thread really helpful and I was able to remove the field called "Title" in Windows 10, aka "Movie name" in MediaInfo, using mkvpropedit
I just changed the line of the batch script to put a blank string for the title/name
But the "Comments" field in Windows 10, aka "Description" in MediaInfo, has been difficult for me to figure out how to remove.Code:"C:\Program Files\MKVToolNix\mkvpropedit" "%%m" -e info -s title=""
I used the MKVToolNix mkvinfo-gui.exe to show all the elements, and I found the tag I'd like to remove in certain location with the name: DESCRIPTION
the elements listed were
- EBML head
- Segment
- Seek head
- Segment information
- EbmlVoid
- Segment tracks
- Tags
- Tag
- Targets
- (note: nothing is listed under targets, no track UID or anything)
- Simple
- Name: DESCRIPTION
- String: <this is the string I want to get rid of, or the whole tag>
but I don't know how to edit or remove that tag. The mkvpropedit commands are not clear to me on how to do this. This particular tag/field does not show up in the MKVToolNix GUI header editor section either
- Cluster
- ...
- Cluster
- Cues
any help would be appreciated. Thanks.
+ Reply to Thread
Results 1 to 11 of 11
-
-
Code:
mkvpropedit "file.mkv" -t global:
Code:mkvextract tags "file.mkv" -r "tags.xml"
Code:mkvpropedit "file.mkv" -t global:"tags.xml"
-
Code:
mkvpropedit "file.mkv" --tags all:
https://mkvtoolnix.download/doc/mkvpropedit.html -
-
True. Otherwise it is possible to delete all tags and then let mkvpropedit create new statistic tags.
Code:mkvpropedit "file.mkv" --tags all: --add-track-statistics-tags
-
Mosu was incredibly vague as to how to handle the statistics tags early on, I wrote the code for MediaInfo's handling of them and last time I checked it will reject statistics tags made by MKVPropEdit.
-
Time to fix your software, then.
I don't really see any difference between tags written by mkvmerge vs those written by mkvpropedit, though. (Except _STATISTICS_WRITING_APP, naturally.) -
Thanks, the tags command seemed to remove the tag that I wanted, although it did remove all the other tags
I don't know that I necessarily care about the other tags, the method from the first answer seems like a lot of work to have to export everything just to delete one tag, and keep the other tags. For the track statistics, with using the option to add them back in one of the replies, sorry for the newbie question, but what is the purpose of the track statistics tags, or rather why would I want to add/keep the track statistics?
it seems like you are correct that MediaInfo doesn't show up the track statistics written by the MKVToolNix mkvpropedit --add-track-statistics-tags option, and those only appear using the MKVToolNix mkvinfo when option to show all elements is checked. It added tags at the end of the file, such as DURATION, NUMBER_OF_FRAMES, and NUMBER_OF_BYTES for each track, with _STATISTICS_WRITING_APP as mkvpropedit
thanks for letting me know how to remove the tags, that helped a lot. sorry for the long post. but I had another question about the mkvpropedit commands for the edit selectors how do I go thru and delete the title/name of every track? --edit track:all does not seem to work
so these are the commands I'm using so far:
Code:"C:\Program Files\MKVToolNix\mkvpropedit" "%%m" -e info -s title="" "C:\Program Files\MKVToolNix\mkvpropedit" "%%m" --tags all: "C:\Program Files\MKVToolNix\mkvpropedit" "%%m" --edit track:1 --set name=""
thanks -
I fear there's no command for that. A cheap solution would be to batch a command for e.g. 1 to 10 and just let it run mkvpropedit 10 times. Or from 10 downwards an exiting depending on the error level (or more sophisticated a script to actually count the number of tracks beforehand).
-
The 'first one' was actually
Code:mkvpropedit "file.mkv" -t global:
If you're using CMD (batch), you can just create a loop that tests ERRORLEVEL after calling MKVPropEdit to make sure you get all the tracks.
Code:Set Count=0 :Loop Set /a Count+=1 type NUL MKVPropEdit "%~f1" -e track:%Count% -d name if "%ERRORLEVEL%"=="0" goto :Loop
The purpose of the Track Statistics Tags is to let MediaInfo know the duration of any particular track, how many bytes the tracks are made out of and how many frames. Without them MediaInfo has to either guess what those values are or simply leave fields dependant on that information blank. You'll find that if you have two variable bitrate tracks in an MKV (eg. video and lossless audio) mediainfo will simply leave the bits per second fields for each of the tracks blank. Also, without a valid duration tag MediaInfo simply sets the duration of each of the tracks equal to the duration of the file itself, regardless of the actual duration of the track. Not having tags also makes it difficult for MediaInfo to determine if a file is variable frame rate or not since it has to guess whether it is or not through scanning the first few frames of a file.Last edited by ndjamena; 11th Mar 2017 at 12:04.
-
ok cool thanks. you're right, the global specifier from the first part of your answer removes the comment/description tag I wanted without completely removing the DURATION tag (TSTs = Time Stamp Tags?)
although I did notice that MKVToolNix mkvpropedit moved the tags to the end, added some language attributes to each remaining tag, and those tags like (DURATION) no longer show up in MediaInfo after running the mkvpropedit command
thanks for the ideas on how to loop, I would not have thought about using errorlevel, that would work for me
here is my final windows CMD script (some lines are commented out if different functionality is desired)
Code:@echo off CLS echo ***** Starting mkvtitle ***** for %%m in (*.mkv) do ( echo ----- echo File: "%%m" echo ----- echo Edit: Info... call :_edit_info "%%m" echo ----- echo Edit: Tracks... Set count=0 call :_edit_loop "%%m" echo ----- echo File: Complete. echo ----- ) echo ***** Finished mkvtitle ***** goto :eof :_edit_info REM echo Changing Title to "%~n1"... REM "C:\Program Files\MKVToolNix\mkvpropedit" "%~1" -e info -s title="%~n1" echo Removing Title... "C:\Program Files\MKVToolNix\mkvpropedit" "%~1" -e info -s title="" echo Removing Tags... REM "C:\Program Files\MKVToolNix\mkvpropedit" "%~1" -t all: "C:\Program Files\MKVToolNix\mkvpropedit" "%~1" -t global: exit /b :_edit_loop Set /a count+=1 echo Changing Track %count%... "C:\Program Files\MKVToolNix\mkvpropedit" "%~1" -e track:%count% -s name="" if "%ERRORLEVEL%"=="0" call :_edit_loop "%~1" exit /b :eof
Similar Threads
-
MKV Tag Editor
By gonwk in forum Newbie / General discussionsReplies: 32Last Post: 24th Jan 2021, 09:39 -
MP4 Video and Audio Tag Editor [for PC]
By duesouth in forum AudioReplies: 0Last Post: 19th Oct 2016, 09:18 -
Need newbie help translating ffmpegX commands to terminal commands.
By BatterseaPS in forum ffmpegX general discussionReplies: 3Last Post: 30th Sep 2013, 11:53 -
Need help creating program to tag MKV's
By ASilverblade in forum ProgrammingReplies: 4Last Post: 8th Jan 2013, 10:37 -
Any free ID3 or music tag editor/tool that can convert character set.
By csh in forum AudioReplies: 1Last Post: 17th Jun 2012, 11:09