I am preparing to write a program to modify MP4 file attributes, specifically the “Title,” “Subtitle,” “Comments” and “Genre” attributes. I need to do this globally as I have thousands of files to deal with, far too many to do by hand using File Explorer.
I have performed some preliminary Google searches and found several ways to retrieve these attributes, but not to store them. Note that I am talking about existing MP4 videos already created and stored. My software will modify them programmatically.
I know how to do most things, I’ve been programming for more than 50 years, but Google and Microsoft searches for methods to do this are all vague, off-topic and/or overly-specialized. I thought this would be a straightforward process (e.g. regularly used), but I cannot find much about it. I found this in another StackOverflow message:
Dim shellApplication, folderNamespace
Set shellApplication = CreateObject("Shell.Application")
Set folderNamespace = shellApplication.Namespace("E:Share DriveChrisMovies")
Dim headers, i, aHeaders(290)
For i = 0 to 289
aHeaders(i) = folderNamespace.GetDetailsOf(folderNamespace.Items, i)
Next
This will work (modified) for retrieval, but then what? How do I edit the cited attributes and write them back to the MP4 files?
I want to get this right the first time. Therefore, my question is: In the opinion of S.O. members, what is the most efficient way to retrieve, modify and store MP4 Detail attributes using VB.NET code?
Preparing to start. Have not yet decided on best method. I don’t profess to know everything. Appreciate any guidance or suggestions. Many thanks in advance for any input you can offer.
Thomas Sawyer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.