How to add tags to MP4 file?

1.7k views Asked by At

I am trying to bulk edit some MP4 files in my computer using C# and I have been clueless about how to edit the file tags.

.

I was able to edit the Title and Comment using taglib, but I don't really understand how to add the rest of the tags.

TagLib.File archivo_video = TagLib.File.Create("filetest.mp4");
        archivo_video.Tag.Title = "CORRECT";
        archivo_video.Tag.Comment = "CORRECT";
        archivo_video.Save();
1

There are 1 answers

0
Jammer On

I've only just started working with the source code but you might find doing this does the job.

var xmpTag = File.GetTag(TagType.XMP, false) as XmpTag;

xmpTag.Rating = ?

Although I've not done anything with MPEG4 in taglib yet. From looking over the code I'm not 100% sure you can do this at the moment.

There is mention of a Windows Rating value in the IFDEntryTag but that isn't included in the MPEG4 File class ...