View Full Version : Anyone else having a problem with WMP4Player?
Try this one: I added mp4creator a -t option to specify the TimeScale. I tested it and seems to work fine.
mp4creator60 -t 120000 -c myfile.avi myfile.mp4
To achieve best results I'd suggest you to put an exact multiple of frame rate, such as 23976.
Please test it and tell me how it goes. It would be interesting doing real-life tests, i.e. encoding a long movie and check if there are still a/v sync problems.
Beware this is just TEST stuff and will be removed in few days.
http://webs.ono.com/de_xt/mp4creator_timescalefix.zip
(BTW this is a 0.9.3.15 build)
Chibi Jasmin
9th May 2002, 23:29
Thanx...so it will calculate the rest by itself? I just have to specify a time scale? Okay, I will try...I always check the result with mp4v1getfps, which was in the package up to V0.9.3.9. I think its results are reliable (talking about testing with long movie...)...I can also have a look in the headers that are generated...
BTW: Will you also put out regular V0.9.3.15 compiles?
Chibi Jasmin
9th May 2002, 23:39
Quick tests indicate that it works...great stuff!
What about adding an automatic calculation of timescale (frame rate * 1000) ? Would make it more fool-proof :)
Can you commit your fix to the mpeg4ip project?
Thanx a lot for this!
Ok, np, here you have 0.9.3.15 builds:
http://webs.ono.com/de_xt/mp4player.zip
http://webs.ono.com/de_xt/mp4tools.zip
Just small changes (IPv6 sync and some small fixes). It had a couple of issues which prevented it from compiling under VC++, hopefully I fixed 'em. I also added the win32 frame rate rounding fix (i.e. the one you posted). These three issues are being fixed in the next release, this is why i didnt think about releasing it.
About the custom version I put in the previous post, well it just allows you to set a TimeScale different than the default 90000. mp4creator has this value fixed in three points, I had to change this. Other than that it's exactly like the original one. I'm not sure what are you referring with "the rest", it will take the input AVI framerate, so no need to specify one (provided it's a fixed frame rate).
I tried a 23.976 AVI file with a -t 23976 value (i can use any multiple of it such as 47952) and the MP4 got an exact 23.976 frame rate too. A way of automatizing this would be reading the AVI frame rate, multiplying it with 1000 and use this as TimeScale value. Seems DivX5 MP4 creator tool does the same.
Chibi Jasmin
10th May 2002, 00:00
Thanx for everything!
So you added the win32 fix and not the one you just made? Doesn't make too much sense...as that fix alone doesn't give exact results? Anyway, I got your fixed version, it's great.
The rest was meant to be the duration value that has to be calculated out of the number of frames of the avi and the time scale...seems it is calculated correctly already.
What three issues are going to be fixed in the next release? The frame rate stuff, we're just talking about? You mean the next official release? Great! When does it come out ??? :-) So you actually got it in...
Good work!
Ah yeah, and automatic time scale calculation would exactly be that...take input frame rate and multiply by 1000....should be easy to add...what do you think?
UPDATE: Just read your thread about the frame rate-fix on MPEG4IP Sourceforge...you should also tell them about your above fix that actually makes frame rate 100% accurate! Hopefully they will integrate it, I first thought, that was what you meant.
Well I was writing my last post while you posted yours :)
No the issue being fixed in the next release is the known integer rounding, the value we get this way is accurate enough althought not exact due to the fact MP4Duration is an integer. This is a design issue.
About my fix, I have no problem with sending this to mpeg4ip team but I don't think they are going to take my modifications, I think my code can't reach the quality level required for this project...
About this automatic time scale I see some difficulties, since in two of three points the TimeScale value is being used before opening the AVI file. So I'm not sure if it can be done this way.
Chibi Jasmin
10th May 2002, 00:19
Why did they have this integer rounding in at first? It has specially been written for win32, as we could see!?!?!?
Hmm..you can tell them the principles and they can code themselves...but what is so much quality about adding an input parameter for a variable that is already in the code!? 'Accurate enough'? Doesn't sound good, when we can have it perfect with a simple mod. PLEASE at least tell them, what you did, now that there is a thread about it. You could at least point them to this thread...
They should be interested in seeing it work, shouldn't they?
Forget about the automatic thing then, it is not really needed...it is great the way it is...I'd be interested in what mpeg4ip people have to say about it...
UPDATE: Test with a whole 23.976 xvid-movie incl. AAC-Sound passed! No sync issues at all!!! :D :D :D
AFAIK this integer casting on WIN32 was due to an old VC++ compiler issue, which is already solved in somewhat recent versions (works fine with my VC++ 6.0 SP5).
I already submitted my modifications to the MPEG4IP forum but as I said I doubt they will take 'em. In any case I will embed it in all my compiles.
Some samples from my tests, to make people see what does this mean when converting two NTSC (29.97 & 23.976) AVI files to MP4 using the different mp4creator versions, and retrieving fps information using mp4v1getfps:
mp4creator 0.9.3.14 (or any previous win32 build):
29.004189 & 23.000256 (horribly a/v desync)
mp4creator 0.9.3.15 (my build with integer rounding patch as posted by Chibi):
29.970030 & 23.980815 (pretty accurate but still with some small sync issues)
mp4creator 0.9.3.15 + my timescale fix (using -t 29970 and -t 23976):
29.970000 & 23.976000 (perfect!!)
So the side note is: if you are going to convert NTSC content you should use the timescale fix version. BTW the first patch (integer rounding) will be present in next mpeg4ip version, the latter one I don't know.
Chibi Jasmin
10th May 2002, 12:29
Originally posted by DeXT
AFAIK this integer casting on WIN32 was due to an old VC++ compiler issue, which is already solved in somewhat recent versions (works fine with my VC++ 6.0 SP5).
I already submitted my modifications to the MPEG4IP forum but as I said I doubt they will take 'em. In any case I will embed it in all my compiles.
Some samples from my tests, to make people see what does this mean when converting two NTSC (29.97 & 23.976) AVI files to MP4 using the different mp4creator versions, and retrieving fps information using mp4v1getfps:
mp4creator 0.9.3.14 (or any previous win32 build):
29.004189 & 23.000256 (horribly a/v desync)
mp4creator 0.9.3.15 (my build with integer rounding patch as posted by Chibi):
29.970030 & 23.980815 (pretty accurate but still with some small sync issues)
mp4creator 0.9.3.15 + my timescale fix (using -t 29970 and -t 23976):
29.970000 & 23.976000 (prefect!!)
So the side note is: if you are going to convert NTSC content you should use the timescale fix version. BTW the second patch (integer rounding) will be present in next mpeg4ip version, the latter one I don't know.
I saw your post at MPEG4IP...it's a bit short, but I think, they will understand that it's best to use framerate * 1000...maybe you could add the above quoted text!?
You did great work on this...they should somehow integrate it (maybe by modifying their code so that it can automatically do this)...
Thanx!
Chibi Jasmin
10th May 2002, 12:30
Maybe you should have mentioned, that the timescale fix file linked above got updated today to have the -t option included in the options list :D
God, definitely you catch them all! ;)
Well let's see what they say about this, if they still can't see its utility we can show them real-life examples. But I think they are smart enough to see what can be achieved with this, without further explanation.
Chibi Jasmin
10th May 2002, 18:25
Yeah, I catch'em all :) I wanted to propose doing exactly that (adding -t to the options list) :D
Well, let's see what they make out of this...and if they are as smart as you say...;)
Well MPEG4IP 0.9.4 was released and guess what, they included my TimeScale fix in it!! I cannot believe it!! God I'm just a crappy programmer...
Of course the "real one" would be automatic TimeScale selection. I think I can now work on this to try to make the thing just perfect...
I'm dreaming :D :D :D :D
Chibi Jasmin
11th May 2002, 10:43
I really don't believe that, but that's great...when will you release the binaries for us? :D :D :D
Chibi Jasmin
11th May 2002, 14:07
BTW: Did they include any docs explaining how to use the timescale function?
Unfortunately not, but anyways MPEG4IP docs are very basic and this issue can be pointed out in the tutorials as well.
0.9.4 builds:
http://webs.ono.com/de_xt/mp4player.zip
http://webs.ono.com/de_xt/mp4tools.zip
http://webs.ono.com/de_xt/mp4v1tools.zip (deprecated tools)
I'm setting up a small page with some information and related links, as well as binary builds. This way I don't have to post a new message with every new build.
Anyways I think everwicked will submit his ICL 0.9.4 builds to RareWares soon, too.
Chibi Jasmin
11th May 2002, 14:38
Thanx once again...let us know, when you have your 'MPEG4IP' page ready... :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.