Comments (7)
Please provide a short code-snippet which shows 2 cases; one where
MP4ConvertTime() works as intended, and
one where it returns wrong duration.
Original comment by [email protected]
on 8 Dec 2008 at 10:34
from mp4v2.
For example: MP4ConvertTime(5618688, 48000, 600) returns 65844, while a correct
value would be ~70234.
MP4ConvertTime(1000, 48000, 24000); works as advertised instead.
Well it seems the problem is that using integer to do this calculation may
result in some approximation, I don't
think it would do any harm to use float for everything.
Original comment by damiog
on 8 Dec 2008 at 11:37
from mp4v2.
I do not get the results you list -- how can you get negative; it's an unsigned
64-bit int. Need more information,
maybe it's your platform or compiler. The results I got are 70233 which is
correct.
This would probably be easier if you dropped by IRC.freenode.net channel #mp4v2
.
Original comment by [email protected]
on 8 Dec 2008 at 12:12
from mp4v2.
Woops sorry, yes MP4ConvertTime is working fine, the bugs must be somewhere
else. I'll try to track it down.
Btw I am not getting a negative number, but a smaller number. It was a tilde
(~) not a - ;)
Original comment by damiog
on 8 Dec 2008 at 1:49
from mp4v2.
The problem was in void MP4Track::UpdateDurations(MP4Duration duration). It was
transforming the duration of
each sample to the new timescale and then it added it to the track duration.
This was introducing a small
conversion error for each sample that was accumulated over time. I fixed it by
calculating a new media duration
from the track duration.
Original comment by damiog
on 8 Dec 2008 at 2:51
Attachments:
from mp4v2.
patch applied to trunk@195
Original comment by [email protected]
on 24 Dec 2008 at 9:30
from mp4v2.
Original comment by [email protected]
on 24 Dec 2008 at 9:30
- Changed state: Fixed
from mp4v2.
Related Issues (20)
- MP4Info not showing information related to MJPEG Video
- 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
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.