How do you Edit Video ID3 Tags in Python?
I've been slowly writing a little project to create a Movie/TV Show/Music ID3 tag editor that can be used on batches of files from my iTunes library. I started designing the GUI in python after finding a bunch of ID3 tag editors here: http://wiki.python.org/moin/UsefulModules#ID3Handling
Unfortunately when it came time to set up the actual ID3 tag editor I discovered that none of the libraries on the page, or any of the other ones that I found, like eyeD3, could handle actual movie files. I've already put a lot of effort into the python app and I was hoping someone could tell me one of three things (if not, I have to switch to Java, which, according to an earlier post apparently has a library for handling mp4 files' ID3 tags):
Is there some library/package that you know can be used to edit the ID3 of MOVIES (the vast majority of the stuff out there that I've been able to find, and I have done my homework well on this, is for audio only) MP4 files specifically. I have to point out that eyeD3 was actually great for mp3's and REALLY easy to use, so the more like eyeD3 the better.
Is there some sort of file reader-like library that would allow me to read the entire file, change the ID3 tag to what I want, and then write it. In desperation I tried to open the MP4 file with notepad++ and found that the first line of the file is the ID3 tag, but I was unable to decode it. If you guys know something on this level, like how to go in and edit it manually with python, then that would be appreciated.
or
- Some sort of script in another language which I would be able to execute with python (keep in mind however that I only know Java and Python at the moment), but this would have to be something ridiculously simple开发者_JAVA百科 to use like: edit_MP4_Tag(filename, title, artist, etc...) which I doubt exists.
Thanks in advance for any help.
Massively overdue, but if you're on OSX, you can use appscript to alter metadata via iTunes itself, which is very easy if slow.
The great thing about this is that it works on any kind of media and you can alter iTunes-specific metadata, too.
If not, you can use Atomic Parsley via subprocess or similar.
To start, I do not know much about python so I'm just gonna give you my 2 cents as no one answered you yet.
Second, if you know where in the string is the id3, it should be workable. You will need to write your code from scratch as there is nothing really out there for id3 in python in movies.
Now, this all has to do with STRING and SUBSTRING. You got to open the file and grab the substring you need and modify with try and fail. A great example, is made in this by Prashant Khandelwal.
Good luck.
精彩评论