Comments (13)
same issue with trunk-355
Original comment by razone
on 3 Dec 2009 at 3:14
from mp4v2.
The problem is that there are two ways to specify a genre. The ~gen atom which
contains a string and the gnre atom which contains a genre number. It appears
that
MP4V2 only supports the ~gen atom. I've created a fix which will support both,
but
I'm not enlisted so I can't check it in. If you can build the source, go to
src\itmf\tags.cpp, find the line:
fetchGenre( cim, genreType, c.genreType );
and after it add:
if (genre == "") {
genre = enumGenreType.data[genreType-1].formal;
c.genre = genre.c_str();
}
That way if the ~gen atom is empty, it will decode the gnre atom and use it.
If you can't build and would like a fixed DLL, email me at [email protected].
If someone who understand both the format of MP4 files and this code sees that
this
is a bad solution, please let me know.
Dan
Original comment by [email protected]
on 13 Dec 2009 at 9:01
from mp4v2.
Thanks, it worked perfect.
razone
Original comment by razone
on 14 Dec 2009 at 1:25
from mp4v2.
[deleted comment]
from mp4v2.
Danahinsley can now commit code. Thanks Dan. Cheers Ed.
Original comment by [email protected]
on 14 Dec 2009 at 7:51
from mp4v2.
Eddy, I've tried using the same username/password that I use to log into google
code, but it doesn't like it. Do I have some other username/password that I
need to
use? You can email me directly at [email protected]
Original comment by [email protected]
on 14 Dec 2009 at 11:57
from mp4v2.
Okay, I checked this in, although with one bugfix--it also needs to make sure
genreType isn't GENRE_UNDEFINED:
// Fix for issue #45 - two different ways to specify a genre string, the
// ~gen atom which contains a string and the gnre atom, which contains
// an index. if our genre is empty and we have a valid genreType,
// go ahead and populate genre with the correct string.
if (genre == "" && genreType != GENRE_UNDEFINED) {
genre = enumGenreType.data[genreType-1].formal;
c.genre = genre.c_str();
}
Without the extra check, files that contain either will display an empty genre
string
in MP4Info. Hopefully kona can drop in and comment on this change (seems out of
place to me), but it's in r378.
Original comment by [email protected]
on 4 Apr 2010 at 12:56
- Changed state: Fixed
from mp4v2.
Reopening...after discussing this with Kona, I'm going to implement a slightly
different change. Callers should be checking for both genre and genreType if
they're
interested in a genre value.
The basic problem here seems to be there's no way to get a string value that
corresponds with genreType. The one thing we can do is provide a mapping
between
string values in the enum and genreType. But with the way the code currently
is, it
wouldn't be possible for someone to have an empty genre, which is invalid.
Original comment by [email protected]
on 23 Apr 2010 at 10:20
- Changed state: Accepted
from mp4v2.
okay--turns out you can pretty easily fetch the genreType and convert that into
its
associated string reference:
if ( tags->genreType ) {
string s =
itmf::enumGenreType.toString(static_cast<itmf::GenreType>(*tags->genreType ),
true);
fprintf( stdout, " GenreType: %u, %s\n", *tags->genreType, s.c_str() );
}
...I've updated mp4info to show how to do this--it follows suit with many of the
other enum types in the same file, so nothing too extraordinary here.
I backed out dana's fix (sorry)--it gives a false impression of what's actually
in
the file; mp4v2 should respect the fact that there truly is no "genre" tag and
not
misreport the contents of the file.
changes should be in changeset 384.
Original comment by [email protected]
on 27 Apr 2010 at 5:56
- Changed state: Fixed
from mp4v2.
Also, to the original poster, I should mention one more thing--you'll need to
use
r355 or trunk to use genreType, I don't believe they're available in 1.9.1.
Original comment by [email protected]
on 27 Apr 2010 at 6:42
from mp4v2.
I`m actually using r355 with dana`s fix, tested with a lot of mp4 files and no
problems. I will upgrade to trunk and report if there are new issues.
Thanks
Original comment by razone
on 27 Apr 2010 at 7:35
from mp4v2.
okay--if you use trunk, please make sure you review the changes in r384--I
updated
the command line utility to show you how to convert the genreType to its string
value. genre will still be empty/null.
Original comment by [email protected]
on 27 Apr 2010 at 8:08
from mp4v2.
(many years pass)
So, I see the code in mp4info and it works fine. My question is simply how can
one easily use this approach in their own code which uses mp4v2. The
enumGenreType, toString, and assorted other bits that get called into play are
all in the non-exposed part of the project. I tried to use as minimal a subset
as possible of the code and it just kept snowballing needing more headers and
cpp files that weren't part of the API.
enumGenreType looks like it is actually in the created lib files, but I don't
see a clean way to hook into it from outside code.
Original comment by [email protected]
on 11 May 2015 at 8:29
from mp4v2.
Related Issues (20)
- Can't compile with clang
- mp4info fails to show info of the simple video taken by Android phone HOT 1
- Error when trying to compile the project mp4v2 - 2.0.0 HOT 1
- Writing tags corrupts DASH-encoded files
- Integer overflow/wraparound in \src\mp4track.cpp
- Better FileProvider API HOT 3
- Modifying tags with mp4tags -m "test" corrupts some specific MP4 files
- add compilation, gapless, and genretype tag support to mp4tags
- https://code.google.com/p/mp4v2/issues/list?can=1&q=http%3A%2F%2Flimelinx.com%2Fdswj4
- Enhancement: Fill Genre from GenreType
- "Progressive Rock" mistyped as "Progresive Rock" in src/itmf/type.cpp HOT 1
- Ability to free memory allocated by MP4GetTrackH264SeqPictHeaders function HOT 2
- Support for Track Reference Atoms HOT 1
- Import/Export mp4 tags from/to text file
- make dist fail because make doc fails HOT 2
- use of impl / private code in example utils; enumGenreType HOT 1
- Charset problem at filenames
- Generate mp4 file.Can't play by media player.
- Google Code will shut down
- Unable to install on Android via termux
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mp4v2.