Re: Issue 18 in mp4v2: Adding Rating tag for movies like G or PG or PG-13 or UNRATED

42 views
Skip to first unread message

mp...@googlecode.com

unread,
Nov 25, 2010, 10:28:35 AM11/25/10
to mp...@googlegroups.com

Comment #2 on issue 18 by stesteau: Adding Rating tag for movies like G or
PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

You can do it with generic itmf

mp...@googlecode.com

unread,
Nov 25, 2010, 12:15:58 PM11/25/10
to mp...@googlegroups.com

Comment #3 on issue 18 by stesteau: Adding Rating tag for movies like G or

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...


mp...@googlecode.com

unread,
Mar 10, 2011, 9:48:14 AM3/10/11
to mp...@googlegroups.com

Comment #4 on issue 18 by mikeycar...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

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.

mp...@googlecode.com

unread,
Mar 10, 2011, 11:16:20 AM3/10/11
to mp...@googlegroups.com

Comment #5 on issue 18 by chagem...@gmail.com: Adding Rating tag for movies

What hardware are you using? On Mac I should advise Subler.

mp...@googlecode.com

unread,
Mar 10, 2011, 12:12:37 PM3/10/11
to mp...@googlegroups.com

Comment #6 on issue 18 by mikeycar...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

I'm using Linux. At least that's where all the files are stored/processed.

mp...@googlecode.com

unread,
Mar 22, 2011, 11:01:19 AM3/22/11
to mp...@googlegroups.com

Comment #7 on issue 18 by catesand...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

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

mp...@googlecode.com

unread,
Mar 22, 2011, 4:01:18 PM3/22/11
to mp...@googlegroups.com

Comment #8 on issue 18 by catesand...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

Here, use this patch file instead.

Attachments:
mp4tags.diff 37.5 KB

mp...@googlecode.com

unread,
Mar 23, 2011, 9:26:04 AM3/23/11
to mp...@googlegroups.com

Comment #9 on issue 18 by mikeycar...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

How do you apply the patch. I'm new to this part.

mp...@googlecode.com

unread,
Mar 23, 2011, 11:57:37 AM3/23/11
to mp...@googlegroups.com

Comment #10 on issue 18 by catesand...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

In the root of mp4v2, run this command.

patch -p0 -i ~/mp4tags.diff

I'm assuming you're using mac/linux.

mp...@googlecode.com

unread,
Mar 23, 2011, 12:12:50 PM3/23/11
to mp...@googlegroups.com

Comment #11 on issue 18 by mikeycar...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

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?

mp...@googlecode.com

unread,
Mar 23, 2011, 3:13:44 PM3/23/11
to mp...@googlegroups.com

Comment #12 on issue 18 by catesand...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

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

mp...@googlecode.com

unread,
Mar 23, 2011, 7:34:58 PM3/23/11
to mp...@googlegroups.com

Comment #13 on issue 18 by mikeycar...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

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


mp...@googlecode.com

unread,
Mar 27, 2011, 12:23:48 PM3/27/11
to mp...@googlegroups.com
Updates:
Owner: kidjan

Comment #14 on issue 18 by kidjan: Adding Rating tag for movies like G or

Cates,

thanks for the patch. I'll try and review it sometime this week, and if it
looks okay, I'll add it.

mp...@googlecode.com

unread,
Apr 15, 2011, 12:51:28 PM4/15/11
to mp...@googlegroups.com

Comment #15 on issue 18 by greenwoo...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

@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.

mp...@googlecode.com

unread,
Apr 23, 2011, 3:37:58 AM4/23/11
to mp...@googlegroups.com

Comment #16 on issue 18 by mos...@gmail.com: Adding Rating tag for movies

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?

mp...@googlecode.com

unread,
Apr 26, 2011, 2:01:50 PM4/26/11
to mp...@googlegroups.com

Comment #17 on issue 18 by catesand...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

autoreconf -fiv
./configure --prefix=/usr/local --enable-shared -enable-static
--enable-ub=i386,x86_64 --disable-gch
make
sudo make install

mp...@googlecode.com

unread,
Apr 26, 2011, 4:08:21 PM4/26/11
to mp...@googlegroups.com

Comment #18 on issue 18 by kidjan: Adding Rating tag for movies like G or

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.

mp...@googlecode.com

unread,
Apr 26, 2011, 7:51:31 PM4/26/11
to mp...@googlegroups.com

Comment #19 on issue 18 by catesand...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

agreed, wasn't aware of tags.cpp before or would of never happened.

mp...@googlecode.com

unread,
Apr 27, 2011, 7:14:27 PM4/27/11
to mp...@googlegroups.com

Comment #20 on issue 18 by kidjan: Adding Rating tag for movies like G or

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.

mp...@googlecode.com

unread,
Apr 28, 2011, 6:09:10 PM4/28/11
to mp...@googlegroups.com

Comment #21 on issue 18 by catesand...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

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.

mp...@googlecode.com

unread,
May 13, 2011, 2:22:38 PM5/13/11
to mp...@googlegroups.com

Comment #22 on issue 18 by kidjan: Adding Rating tag for movies like G or

cates,

let's IM about it--catch me at kid...@gmail.com


mp...@googlecode.com

unread,
Jun 26, 2011, 1:55:30 AM6/26/11
to mp...@googlegroups.com

Comment #23 on issue 18 by kid...@gmail.com: Adding Rating tag for movies

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.

mp...@googlecode.com

unread,
Aug 29, 2011, 3:49:29 PM8/29/11
to mp...@googlegroups.com

Comment #24 on issue 18 by Scott.Gr...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

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"


mp...@googlecode.com

unread,
Aug 12, 2014, 1:10:35 PM8/12/14
to mp...@googlegroups.com

Comment #25 on issue 18 by onlinesp...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

Did this every make its way into the official repository? Am looking for a
Windows build that has this functionality. Thanks

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

mp...@googlecode.com

unread,
Aug 12, 2014, 10:07:54 PM8/12/14
to mp...@googlegroups.com

Comment #26 on issue 18 by onlinesp...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

I was able to build the latest repository revision 504 with this mp4tags
update. File attached

Attachments:
mp4v2-r504-win32.zip 3.2 MB

mp...@googlecode.com

unread,
Aug 13, 2014, 9:09:58 PM8/13/14
to mp...@googlegroups.com

Comment #27 on issue 18 by onlinesp...@gmail.com: Adding Rating tag for
movies like G or PG or PG-13 or UNRATED
http://code.google.com/p/mp4v2/issues/detail?id=18

Sorry. Incorrectly had a debug build earlier.

Attachments:
mp4v2-r504-win32.zip 317 KB
Reply all
Reply to author
Forward
0 new messages