Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 ASP

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th November 2004, 13:58   #1  |  Link
mat
Registered User
 
Join Date: Oct 2001
Location: PARIS
Posts: 26
conversion from msmpeg4v3 to iso mpeg4 attempt

Hi someone post a code that try to do the conversion on ffmpeg mailling list : http://sourceforge.net/mailarchive/f...&forum_id=1506

If someone is interested in reviewing/improving his code...
mat is offline   Reply With Quote
Old 11th November 2004, 20:14   #2  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
wow, cool stuff, hopefully someone will pick it up
would be great to be able to convert my old divx3.11 collection to brand new spec compliant mpeg-4 files...

thanks to koepi for moving the thread from the xvid to the new a/v forum. this topic isnt really related to xvid
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 11th November 2004 at 20:38.
bond is offline   Reply With Quote
Old 11th November 2004, 22:49   #3  |  Link
PowerMacG4
Oh boy
 
PowerMacG4's Avatar
 
Join Date: Nov 2002
Posts: 126
Who was the person who said he was doing this exact thing.. and then disappeared
PowerMacG4 is offline   Reply With Quote
Old 11th November 2004, 22:55   #4  |  Link
BoNz1
Registered User
 
BoNz1's Avatar
 
Join Date: Dec 2002
Location: Great White North
Posts: 522
Quote:
Originally posted by PowerMacG4
Who was the person who said he was doing this exact thing.. and then disappeared
You mean -h ? I don't think this is the same person though.

Last edited by BoNz1; 12th November 2004 at 01:33.
BoNz1 is offline   Reply With Quote
Old 11th November 2004, 22:59   #5  |  Link
jggimi
Moderator Emeritus
 
jggimi's Avatar
 
Join Date: Dec 2001
Location: The NW corner of Lake Erie
Posts: 5,552
A new user on the forum, pa. He's sent me the executable, which I've made available at <link deleted>.

He should be joining this thread as soon as his waiting period completes.
__________________
"It is easier for a camel to pass through the eye of a needle if it is lightly greased."
Kehlog Albran, The Profit

Last edited by jggimi; 17th December 2004 at 23:25.
jggimi is offline   Reply With Quote
Old 12th November 2004, 00:08   #6  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
thanks a lot for the link jggimi

use the tool with the following commandline:
Quote:
ffmpeg -i inputdivx3.avi -vcodec mpeg4 -acodec copy -mstomp4 outputmpeg4.avi
i also talked to him and here is a brief summary of the tool up to now given to me by him:
- it's a hack which passes quantized coeffs, mb types and vectors from the msmpeg4 decoder to the mpeg4 encoder directly
- it works for most msmpeg4v3 files, often with only a 3% size penalty
- it converts about 80% of the msmpeg4v3 videos he tried perfectly, but he can't figure out what's wrong with the rest
- all nandub rips seem to convert fine
- there are still bugs (some files fail to convert, it's no faster than a regular re-encode, mmx must be disabled, etc.)
- on some problem samples, it looks like certain inter frames aren't having their intra blocks copied properly
- it's almost as if certain blocks are being decoded differently for no apparent reason
- it all looks ok in terms of mb types, coeffs, etc.
- the problems only happen with files he doesnt know how they have been created
- it doesnt seem to be related to old nandub versions, as he, in order to do the conversion, stepped through every line of code that was involved, and there weren't any different workarounds being invoked between files that worked and didn't work
- if you tried "ffmpeg input.avi output.avi" it was fine (albeit re-encoded lossily), but if you tried "ffmpeg -mstomp4 input.avi output.avi" the decoded mb types, vectors and coeffs are the same as before, but it is displayed differently (-mstomp4 tells ffmpeg that the conversion will be lossless. without it ffmpeg does a regular decode->encode)
- one thing he hasn't done is decode the original and the buggy converted streams side-by-side and check that way
- he suspects that there's something ffmpeg is doing that he hasn't noticed till now

my findings till now:
- i tried decoding a problem sample myself with various decoders (ffdshow, 3ivx, xvid, divx5) in both the divx3 and mpeg-4 version and the used decoder shows no difference for the output
- maybe this has nothing to say but when i compressed a divx3.avi and the correctly converted resulting mpeg4.avi of it with winzip i got a 1% additional winzip compression
when i compressed a divx3.avi and the not correctly converted resulting mpeg4.avi of, winzip compressed the mpeg4.avi with 7%, which is pretty high i think?
- trying to place the resulting mpeg-4.avi to .mp4 via mp4box works fine (mp4box doesnt handle importing divx3 streams with "uncorrect" mpeg-4 fourccs!), still of course the distortions are still there. also mp4box detects a not existing audio stream, one time mpeg-1 (with the working sample), another time mpeg-2 (with the not working sample), which it never did before, maybe the .avi writing is not 100% correct?


and of course he would be happy to recieve some support of devs knowing libavcodec if possible for being able to make this tool even better
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 12th November 2004 at 00:31.
bond is offline   Reply With Quote
Old 12th November 2004, 08:43   #7  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Nice,.. hope this guy and the libavcodec codec guys get together and fix and tune this tool. DivX3.11 => iso compliant mpeg4 would be great

Cu Selur
Selur is offline   Reply With Quote
Old 12th November 2004, 12:24   #8  |  Link
thoralf
Registered User
 
Join Date: Dec 2003
Location: Thiersechs
Posts: 165
Why on earth would one convert divx3.11 to mpeg4?
Admittedely, msmpeg4 was the first codec that allowed reasonably good looking DVD backups. Then again, it's quite ancient nowadays and quality-wise definitely not on par with xvid or h264. In addition, it would even make our favourite mpeg4-codec looking bad - a native mpeg4-encode will look definitely better than a transcoded one.
By converting those files to mpeg4, one would gain no quality boost at all, and most standalone DVD players are capable of decoding divx3 directly. I just don't get the point of this ...
thoralf is offline   Reply With Quote
Old 12th November 2004, 12:56   #9  |  Link
ReinerSchweinlin
Registered User
 
Join Date: Oct 2001
Posts: 454
For me this makes perfect sense, since i have a lot of redorded tv-shows which I stored in DIVX3.11 in the old days. Now, when played back on my KISS 500, the Sound ist not processed in 16Bit but in 8 Bit, which makes it impossible to use my Denon 1602 to do the sound.
I get ur point, but there IS a great use in this!
ReinerSchweinlin is offline   Reply With Quote
Old 12th November 2004, 14:11   #10  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
I personally would like to convert some old home clips to a standard so that mpeg4 compatible player will have no problem with it. And no, reencoding the vhs tapes to xvid etc. is no option since it's long gone .

Cu Selur
Selur is offline   Reply With Quote
Old 15th November 2004, 21:56   #11  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
so did anyone test this tool already? it should work already on most files

Quote:
Originally posted by Selur
I personally would like to convert some old home clips to a standard so that mpeg4 compatible player will have no problem with it.
indeed
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 15th November 2004, 22:20   #12  |  Link
jggimi
Moderator Emeritus
 
jggimi's Avatar
 
Join Date: Dec 2001
Location: The NW corner of Lake Erie
Posts: 5,552
Bond sent me pa's original divx 3 .avi that will show artifacts when converted to mpeg-4 using this tool. I haven't tried it yet, but have made the 3MB file available at:

<link deleted>
__________________
"It is easier for a camel to pass through the eye of a needle if it is lightly greased."
Kehlog Albran, The Profit

Last edited by jggimi; 17th December 2004 at 23:25.
jggimi is offline   Reply With Quote
Old 15th November 2004, 22:37   #13  |  Link
gotaserena
String Theorist
 
Join Date: Mar 2003
Location: Na terra dos 10000 lagos.
Posts: 218
I did a few conversions... Almost all files crashed gabest's avi splitter when I tried to play them.
gotaserena is offline   Reply With Quote
Old 15th November 2004, 23:46   #14  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally posted by jggimi
Bond sent me pa's original divx 3 .avi that will show artifacts when converted to mpeg-4 using this tool. I haven't tried it yet, but have made the 3MB file available at:
http://jggimi.webhop.net/divx3-to-mpg4_sample.zip
thanks jggimi

would be great if people try this tool on this sample and share their opinions on what could cause these artifacts and maybe pointing to hints to fix this problem
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 16th November 2004, 03:01   #15  |  Link
Shtirlits
Registered User
 
Join Date: Jan 2004
Posts: 4
I did a conversion on a ~700 Mb file. After the conversion video played alright, but sound didnt. I dunno if its intended.
Shtirlits is offline   Reply With Quote
Old 16th November 2004, 23:24   #16  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
this tool converts divx3 video to mpeg-4 video losslessly, it doesnt deal with audio
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 19th November 2004, 21:30   #17  |  Link
pa
Registered User
 
Join Date: Nov 2004
Posts: 1
yes the tool has some problems, and the ffmpeg cvs it was built from has a problem with pts/dts generation which makes bad .avi files.

i plan on working on this further but it is hard without help from people familiar with libavcodec h263 coding. there are a number of other fixes that must be made for this conversion to work (frame skipping, re-quant frames where quant>25), perhaps next week some time. i don't expect this to make it into the official ffmpeg cvs so it will always be a standalone tool.
pa is offline   Reply With Quote
Old 20th November 2004, 20:41   #18  |  Link
mat
Registered User
 
Join Date: Oct 2001
Location: PARIS
Posts: 26
Quote:
Originally posted by bond
thanks jggimi

would be great if people try this tool on this sample and share their opinions on what could cause these artifacts and maybe pointing to hints to fix this problem
that's strange : it look like the first keyframe is wrong : in msmpeg it is black, in the mpeg4 it start with the star.


If I remenber well some divx3 suffer from frozen frame, could the program that fix the problem make the stream invalid ?
Or on the contrary apply it could fix the problem ?

Do you know how was made this divx ?
mat is offline   Reply With Quote
Old 22nd November 2004, 22:57   #19  |  Link
mat
Registered User
 
Join Date: Oct 2001
Location: PARIS
Posts: 26
i have checked the not-working avi with avidemux (~virtualdub for linux) and it seem the first 60 are null and not valid...


So it seem in order to convert this file you have to remove all the null frame (avidemux saw 66 bad frame), another solution could to add a check that skip these bad frame during the conversion.


Pat, I hope you will continue to improve it, and perhaps when it would be stable, it could be merged with ffmpeg.

Matthieu
mat is offline   Reply With Quote
Old 14th December 2004, 00:46   #20  |  Link
jggimi
Moderator Emeritus
 
jggimi's Avatar
 
Join Date: Dec 2001
Location: The NW corner of Lake Erie
Posts: 5,552
Due to space requirements, I am removing the software and sample links by Friday 17 December.
__________________
"It is easier for a camel to pass through the eye of a needle if it is lightly greased."
Kehlog Albran, The Profit
jggimi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.