You can do it with generic itmf
You can do it with generic itmf
But it seems there is a bug when freeing memory with MP4ItmfItemFree( item
);
item->mean = _strdup( mean );
item->name = _strdup( name );
and MP4ItmfData* data = &item->dataList.elements[0];
So you can fix it by freeing manually and setting everything to NULL...
free(item->mean);
item->mean = NULL;
free(item->name);
item->name = NULL;
free(data->value);
data->typeSetIdentifier = 0;
data->typeCode = MP4_ITMF_BT_IMPLICIT;
data->locale = 0;
data->value = NULL;
data->valueSize = 0;
MP4ItmfItemFree( item ); //now its working...
Is there any movement on this one? I'd like to see the rating tag as I
have an 7yr daughter that I'd like to have a clear rating so she knows
which shows are too scary to watch.
What hardware are you using? On Mac I should advise Subler.
I'm using Linux. At least that's where all the files are stored/processed.
Please accept my changes for the project. The attached diff has the rating,
rating annotation tags implemented. It also implements content rating
("clean", "explicit", and "Inoffensive"), cast, director, co-directors,
producers, screen writers, copyright warning and studio.
Attachments:
mp4tags.diff 36.4 KB
Here, use this patch file instead.
Attachments:
mp4tags.diff 37.5 KB
How do you apply the patch. I'm new to this part.
In the root of mp4v2, run this command.
patch -p0 -i ~/mp4tags.diff
I'm assuming you're using mac/linux.
I get the following:
[mcarter@liandra mp4v2-1.9.1]$ patch -p0 -i mp4tags.diff
patching file util/mp4tags.cpp
patch: **** missing line number at line 5: @@ -%ld,%ld +%ld,%ld @@
Am I missing something here?
if you're having problems with the patch file, then just replace your local
util\mp4tags.cpp with the one included in this zip.
Attachments:
mp4tags.zip 11.0 KB
Sorry to be such a pest.
When I try to compile the file from the mp4tags.zip I get:
util/mp4tags.cpp:700:58: error: \u2018MP4TagsSetContentID\u2019 was not
declared in this scope
util/mp4tags.cpp:706:56: error: \u2018MP4TagsSetGenreID\u2019 was not
declared in this scope
util/mp4tags.cpp:727:59: error: \u2018MP4TagsSetPlaylistID\u2019 was not
declared in this scope
util/mp4tags.cpp:749:52: error: \u2018MP4TagsSetXID\u2019 was not declared
in this scope
util/mp4tags.cpp:758:57: error: \u2018MP4TagsSetArtistID\u2019 was not
declared in this scope
util/mp4tags.cpp:761:59: error: \u2018MP4TagsSetComposerID\u2019 was not
declared in this scope
util/mp4tags.cpp:875:60: error: \u2018MP4TagsSetContentID\u2019 was not
declared in this scope
util/mp4tags.cpp:884:58: error: \u2018MP4TagsSetGenreID\u2019 was not
declared in this scope
util/mp4tags.cpp:914:61: error: \u2018MP4TagsSetPlaylistID\u2019 was not
declared in this scope
util/mp4tags.cpp:927:67: error: invalid conversion from \u2018const
void*\u2019 to \u2018void*\u2019
util/mp4tags.cpp:927:67: error: initializing argument 1 of \u2018virtual
bool mp4v2::platform::io::File::read(void*,
mp4v2::platform::io::FileProvider::Size,
mp4v2::platform::io::FileProvider::Size&,
mp4v2::platform::io::FileProvider::Size)\u2019
util/mp4tags.cpp:933:44: error: invalid conversion from \u2018const
void*\u2019 to \u2018void*\u2019
util/mp4tags.cpp:933:44: error: initializing argument 1 of \u2018void
free(void*)\u2019
util/mp4tags.cpp:951:55: error: \u2018MP4TagsSetXID\u2019 was not declared
in this scope
util/mp4tags.cpp:962:59: error: \u2018MP4TagsSetArtistID\u2019 was not
declared in this scope
util/mp4tags.cpp:968:61: error: \u2018MP4TagsSetComposerID\u2019 was not
declared in this scope
Comment #14 on issue 18 by kidjan: Adding Rating tag for movies like G or
PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18
Cates,
thanks for the patch. I'll try and review it sometime this week, and if it
looks okay, I'll add it.
@mikeycar,
I got the patch to compile, but you must use the svn version, not the
release tarball. Install svn on your computer and run the following command.
svn checkout http://mp4v2.googlecode.com/svn/trunk/ mp4v2-read-only
this will create a folder called mp4v2-read-only. Under that folder, you
will find the util/mp4tags.cpp file. replace it with the one catesand
posted and it should compile cleanly. I've also tested and can confirm that
this will set the ratings on videos. I haven't yet tested to see if those
ratings will be filtered correctly on the apple tv, which is my ultimate
goal, but I believe that they will.
I tried to use the SVN Command under linux (ubuntu) but it doesn't have the
make in the project's root directory. I even tried to copy the downloaded
svn into the tarball directory and that didn't compile either.
What am I doing wrong?
autoreconf -fiv
./configure --prefix=/usr/local --enable-shared -enable-static
--enable-ub=i386,x86_64 --disable-gch
make
sudo make install
Cates,
The patch adds some great functionality, but I noticed you duplicated a
bunch of arrays that are already present in type.cpp; for example, there's
already a content rating array in type.cpp, along with all the genre info
that you added.
...but you re-define a lot of this information at the top of mp4tags.cpp.
Is there any way you could consolidate your code to use the existing
structures in type.cpp? I'd really prefer not to have this information
defined in multiple places in mp4v2; I think that's asking for trouble.
agreed, wasn't aware of tags.cpp before or would of never happened.
no worries, and to be clear I really appreciate the contribution. If you
need help reworking the patch, let me know and I can help you.
i would of done it by now, but we're busy at work and i'm moving this
weekend. i'll have it done by end of next week. how do you feel about
expat? i was thinking that mp4info should output the directors/actors/etc,
but in order to do so, its going to have to read in the xml that stores all
that info and output it. what are your feelings about expat or the built in
/usr/bin/xpath? email me directly or grab me on im. thanks.
cates,
let's IM about it--catch me at kid...@gmail.com
In general, I'd prefer not to add dependencies on other projects. For
linux/OSX builds it'd probably just be a check in autotools, but for
Windows builds you'd have to have compiled binaries for 32/64 bit, most
likely--or require people to configure it all themselves, which I'm not
particularly keen on.
I'd prefer no expat, unless you have a compelling reason why it'd be
beneficial to most users.
This is likely a bad idea. What does PG mean? If you're in the US you
have to write "mpaa|PG|200" to the reverse DNS atom. However, if I'm in
the UK, and I say PG, then I expect you to write "uk-movie|PG|200"
instead. Likewise, if I'm in Canada, and it's a TV show, not a movie, then
PG means "ca-tv|PG|400"