I keep having issues when a movie has metadata with a different Title than the file name. I’m aware of the trick to move “Local Media Assets” to the bottom of the Agent list, but Plex still seems to use the metadata regardless when it searches for a match. Is there a simple terminal command or script that can do this?
I use MetaZ (for mp4s) to strip any embedded tags; 4GB file takes a minute or so. Load file in app and delete any unwanted info (title, sort, etc.), should clean up any issues. Any meta editor should do the trick.
In Windows for MP4s just delete the title in properties like any other file. For MKVs, I use mkvtoolnix GUI.
Thanks for the help, but i’m looking for a way to automate it with folder actions or hazel. So does MetaZ have a command line interface?
command line tools:
for mp4 files there is mp4box
for mkv there is mkvpropedit (part of mkvtoolnix)
Here is a simplified command that uses FFmpeg to copy the video and audio stream and deletes the title metadata (really sets it to “”).
for i in *.mkv ; do ffmpeg -i "$i" -c:v copy -c:a copy -metadata title="" "E:/Media/Extras/Conversions/$i" done;
You can use this command with bash, zsh, or similar shells I’m sure. If you’re on Windows (like me), you can use Cygwin to use bash or zsh. Cygwin basically gives you a Linux-like command line environment on Windows. I highly recommend it if you do a lot of command line tasks. I also use it for quick Plex-compatible renaming. I prefer zsh because it makes life easier, but bash is popular.
Note: This only copies the 1st video and 1st audio stream. If you have more audio streams or if you have subtitle streams, you need to adjust the command for that, possibly using the -map option. Also, this only works with the files in a directory, but not subdirectories. This example just shows how you can set the title metadata using FFmpeg.
I’d only recommend this way if all of your files have the same format, such as 1 video stream, 1 audio stream, and 1 subtitle stream. There might be an easy way to copy all streams using FFmpeg, but I don’t know how. Perhaps you could use the tools mentioned by others to do something similar: iterate through files in a directory and change the title metadata. I don’t know those tools will enough to do it, but I’ll definitely be looking into it. mkvpropedit looks like the way to go for mkv files since you don’t have to actually remux any files. I’ll have to try this.
Yeah, using mkvpropedit is extremely easy and fast. This should get rid of all the title metadata for .mkv files in a directory and sub-directories, from my testing. Again, I’m using Cygwin with zsh here, but bash will do. I’m sure there’s an easy way to iterate over files using Windows cmd or PowerShell.
for i in **/*.mkv ; do mkvpropedit "$i" --set title= done;
Does anyone know how to change the title with mp4box? I’m looking at the docs, but can’t find anything.
Thanks for the mkvpropedit command JordanHarris. I can’t work out mp4box either. If i try the -rem-xml flag it just says “No meta box in input file”. if i do -info, it shows the problem info under “iTunes Info”. is this different to metadata?
This seems to keep all streams and just removes the metadata Title:
ffmpeg -i INPUTFILE -c copy -metadata title="" OUTPUTFILE
Plex still doesn’t find a match though. I give up. I think using Infuse and automating the concatenation of multi-file videos will be easier than messing around with Plex
garagethrash: That wiped out the subtitles and additional audio streams.