View Full Version : Matroska + Anamorphic XviD + MPC = bad ratio
Sirber
15th April 2004, 12:06
The only way to get correct ratio is to use "overlay mixer" in ffdshow. Is there a way to not use "overlay mixer" and get it correctly?
Thanks
+ EBML head
+ Segment, size 4631045205
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 4025)
|+ Segment information
| + Muxing application: libebml v0.6.4 + libmatroska v0.6.3
| + Writing application: mkvmerge v0.8.2
| + Duration: 10528.944s
| + Date: Thu Apr 15 10:47:43 2004 UTC
| + Segment UID: 0x16 0x23 0x10 0x17 0xfa 0xb8 0xc6 0xbe 0x0b 0x3c 0xca 0x01 0x6a 0x74 0xb0 0xdf
|+ Segment tracks
| + A track
| + Track number: 1
| + Track UID: 2610057274
| + Track type: video
| + MinCache: 1
| + Timecode scale: 1.000000
| + Codec ID: V_MS/VFW/FOURCC
| + CodecPrivate, length 40 (FourCC: XVID, 0x44495658)
| + Default duration: 41.708ms (23.976 fps for a video track)
| + Default flag: 1
| + Language: eng
| + Video track
| + Pixel width: 720
| + Pixel height: 480
| + Display width: 852
| + Display height: 480
| + Lacing flag: 0
| + A track
| + Track number: 2
| + Track UID: 1475656536
| + Track type: audio
| + MinCache: 0
| + Timecode scale: 1.000000
| + Codec ID: A_AC3
| + Default flag: 1
| + Language: eng
| + Audio track
| + Sampling frequency: 48000.000000
| + Channels: 6
| + A track
| + Track number: 3
| + Track UID: 1736051260
| + Track type: audio
| + MinCache: 0
| + Timecode scale: 1.000000
| + Codec ID: A_AC3
| + Default flag: 0
| + Language: fre
| + Audio track
| + Sampling frequency: 48000.000000
| + Channels: 2
|+ EbmlVoid (size: 1024)
|+ Cluster
bond
15th April 2004, 12:25
Originally posted by Sirber
The only way to get correct ratio is to use "overlay mixer" in ffdshow. Is there a way to not use "overlay mixer" and get it correctly?hm i dont think so
maybe tcmp has some inbuilt ar support independantly of om, but i never tried it
Sirber
15th April 2004, 12:36
I'm sure you're surprised I'm using XviD :D
bond
15th April 2004, 12:41
Originally posted by Sirber
I'm sure you're surprised I'm using XviD lol ;)
SeeMoreDigital
15th April 2004, 13:16
Hi Sirber,
Interesting that you are experimenting with anamorphic XviD encodes. I've been doing the same but with the MP4 container.
Have you tried anamorphic 3viX streams in Matroska... I'm interested to see if they might work differently?
Cheers
Sirber
15th April 2004, 13:53
Haven't tryed 3ivx yet. I'm just trying to get good quality with "the godfather part 1" :). The source is *very* noisy. XviD is completed. Q is awesome. I'm now testing VP6.
Bitrate: 2900kbps
In ffdshow:
[ ] Overlay Mixer
[x] Overlay Mixer
[x] Overlay Mixer
What is the gray one?
ChristianHJW
15th April 2004, 14:01
Zoomplayer, TCMP, VLC, Xine and mplayer can all handle the AR info independant from the decoder filter or its settings ....
SeeMoreDigital
15th April 2004, 14:05
I've just tried muxing an 3viX 'anamorphic' .AVI into an .MKV container using AVI-mux... and unfortunately MPC did not open it up at the correct AR. Despite the fact it was able to correctly identify the stream as being 3viX!
Cheers
Wilbert
15th April 2004, 15:25
In ffdshow:
[ ] Overlay Mixer
[x] Overlay Mixer
[x] Overlay Mixer
What is the gray one?
IIRC, the grey one is Overlay Mixer I and the black one is Overlay Mixer II.
Read the page from the following thread:
http://forum.doom9.org/showthread.php?s=&threadid=48511&pagenumber=43
Sirber
15th April 2004, 15:53
hum...
Is there a way to have with MPC and ffdshow the correct AR whitout using overlay mixer?
SeeMoreDigital
15th April 2004, 16:35
Originally posted by Sirber
hum...
Is there a way to have with MPC and ffdshow the correct AR whitout using overlay mixer? I don't think so, I've tried every way I can think of... Looks like another job for Gabest!
Cheers
Sirber
15th April 2004, 16:58
http://forum.doom9.org/showthread.php?s=&goto=lastpost&threadid=29798
Already asked :) This little "bug" might prevent me for using xvid for this movie, even if the quality is excellent. I cannot let "overlay mixer" on coz producer will fail.
bond
15th April 2004, 17:10
Originally posted by Sirber
Already asked :) This little "bug" might prevent me for using xvid for this movie, even if the quality is excellent. I cannot let "overlay mixer" on coz producer will fail. [/B]i dont get it? what producer will fail with overlay mixer (btw for ar correction you need overlay mixer2!)
Sirber
15th April 2004, 17:25
Helix Producer (RealVideo encoder) will fail if overlay in ffdshow is enabled.
SeeMoreDigital
15th April 2004, 17:26
Originally posted by Sirber
http://forum.doom9.org/showthread.php?s=&goto=lastpost&threadid=29798
Already asked :) This little "bug" might prevent me for using xvid for this movie, even if the quality is excellent. I cannot let "overlay mixer" on coz producer will fail. What's the sudden interest in Mpeg4? I thought you were Mr RealMedia!
While experimenting with XviD I encoded a 2.35:1 image from an 720x576 DVD source. Anyway, I cropped the mattes away leaving a slightly resized 'anamorphic' 720x432 image.
The thing is I did not realize that if I configured XviD's AR settings to 2.35:1 (instead of my usual 'non cropped' 16:9 setting) the image will be displayed perfectly once the stream is muxed into an MP4 container... It even works when the file is played in hardware.
But it's still a no-go when you try and mux the same video stream into MKV :(
Cheers
bond
15th April 2004, 17:41
Originally posted by Sirber
Helix Producer (RealVideo encoder) will fail if overlay in ffdshow is enabled. thats what i wondered about...
why do you want to encode to xvid first and than reencode to rv9?
Originally posted by SeeMoreDigital
But it's still a no-go when you try and mux the same video stream into MKVsmd use search!
no mkv muxer will read out the ar info stored on the bitstream level
in mkv the bitstream level is ignored (it should be at least), you have to set the ar info on the container level!
Sirber
15th April 2004, 17:45
sometimes I watch movies while I'm encoding. I don't want to have to switch this flag every time. And, I don't encode in xvid to reencode in RV10 :p :)
bond
15th April 2004, 17:49
Originally posted by Sirber
sometimes I watch movies while I'm encoding. I don't want to have to switch this flag every time.you dont have to, simply use ffdshow with om2 enabled for decoding, absolutely no problem with that
And, I don't encode in xvid to reencode in RV10 :p :) well whats than the problem with overlay mixer and real producer :rolleyes:
SeeMoreDigital
15th April 2004, 18:09
Originally posted by bond
...no mkv muxer will read out the ar info stored on the bitstream level
in mkv the bitstream level is ignored (it should be at least), you have to set the ar info on the container level! I wonder why Nero's ShowTime Player is able to correctly display 'anamorphic' 3viX video in an .MKV container!
It's all very odd ;)
bond
15th April 2004, 18:13
because, as i told you already, the nero decoder analyses the ar on the bitstream level and resizes according to it (no matter in which container)
Sirber
15th April 2004, 18:14
@bond
I need OM to watch it, but I can't use OM while encoding coz it does not work with helix producer. Both use ffdshow at the same time. It's very anoying to always watch that flag.
bond
15th April 2004, 18:17
Originally posted by Sirber
Both use ffdshow at the same time.hm why does the encoder need ffdshow (so you are encoding from mpeg-4 sources, right?)
either way mpeg-4 is so nice that there exist many mpeg-4 decoders, so i am sure you could use ffdshow with om for decoding and another mpeg-4 decoder with helix ;)
Sirber
15th April 2004, 18:26
I cannot choose which decoder to use, it's based on fourcc. Also, I don't have mutliple decoders installed, only ffdshow.
About RV10, anime comes in AVI and I reencode them in RMVB. But, I can watch at the same time other AVIs.
karl_lillevold
15th April 2004, 18:28
The problem with ffdshow/overlay-mixer and Producer is that Producer uses DirectShow to read source files. When ffdshow is set to use overlay mixer it does not work as a source filter, it works only for playback. You can see this when trying to transcode any source file that ffdshow handles, Producer will not get any video, an ActiveX overlay mixer window will pop up instead, and Producer will encode only the audio track.
In any case, since XviD is one of my favorite codecs ;) I too have encoded with it anamorphically a while ago, and changed to Matroska just for the purpose of setting the display AR (w Matroska shell ext tool). I can not recall any problems playing this back correctly, but I do not have the test file accessible at the moment. I will check again.
bond
15th April 2004, 18:39
Originally posted by karl_lillevold
The problem with ffdshow/overlay-mixer and Producer is that Producer uses DirectShow to read source files. When ffdshow is set to use overlay mixer it does not work as a source filter, it works only for playback.Originally posted by Sirber
I cannot choose which decoder to use, it's based on fourcc. Also, I don't have mutliple decoders installed, only ffdshow.thats what i meant, simply use another mpeg-4 decoder than ffdshow for reading sourcefiles with helixproducer (there are lots of different mpeg-4 decoders: 3ivx, divx5, xvid, which all should be able to handle all mpeg-4 streams no matter what encoder was used)
to change the 4cc you can use the 4cc changer tool coming with koepis xvid builds
also you can open the source file via avisynth with defining which dshow graph should be used already afaik (you dont need to change the 4cc with this method)
SeeMoreDigital
15th April 2004, 19:09
Originally posted by bond
because, as i told you already, the nero decoder analyses the ar on the bitstream level and resizes according to it (no matter in which container) Yep exactly, which why we should have more software players able to do the same :D
At least this way we would not have any AR problems. What do you think?
Cheers
Sirber
15th April 2004, 20:00
I vote for player, less troubles for everyone :)
SeeMoreDigital
15th April 2004, 20:40
I've just uploaded some anamorphicly cropped 720x432 3viX encodes (http://homepage.ntlworld.com/seemoredigital/3viX_Anamorphic_Crop_Test.zip) in AVI, MKV and MP4 containers.
They react differently to the anamorphicly cropped 720x432 XviD encodes I made.
I would be grateful for any comments please!
Cheers
EDIT: Sorry, files removed from 'speedy' server to save space!
shitowax
15th April 2004, 21:13
I would like to have some details how you produced your samples because:
- the avi and mkv have a broken AR coded in the bitstream
- the mp4 seems to have a correct one.
After that, if you don't say what decoder you use in mpc, that doesn't help that much.
Anyway, for me, using the 3ivx video decoder, the coded AR is respected in .avi (the broken one), and in .mp4 (the correct one). With mkv, the decoderSpecificDesc seems to have been lost during the muxing and with it the AR info needed BEFORE the connection... Could some MKV guy comment on that ???
That's why the mkv one uses 1:1 AR. If you remux the mkv into mp4 (with the 3ivx muxer of course!!!), the AR will be restored... but as it's the broken one, that doesn't help that much ;))
Originally posted by SeeMoreDigital
I've just uploaded some anamorphicly cropped 720x432 3viX encodes (http://homepage.ntlworld.com/seemoredigital/3viX_Anamorphic_Crop_Test.zip) in AVI, MKV and MP4 containers.
They react differently to the anamorphicly cropped 720x432 XviD encodes I made.
I would be grateful for any comments please!
Cheers
Sirber
15th April 2004, 22:45
Correction:
works #1 with XviD decoder. Gonna use it instead of ffdshow. :D
SeeMoreDigital
16th April 2004, 10:28
Originally posted by shitowax
I would like to have some details how you produced your samples because:
- the avi and mkv have a broken AR coded in the bitstream
- the mp4 seems to have a correct one. To generate the AVI used MPEGmediator 1.5 set at 1:1. After cropping away the mattes I'm left with an 720x432 image. In the 3viX settings I selected 'Custom AR' Width:235 Height:100
Once the AVI stream was generated I used it (as a source) to slip into an MKV container via AVI-mux (v1.16.4). And to slip into the MP4 container using MP4UI. I decided not to use GraphEdit and the 3viX muxer becuase it's too clever and might repair something if it was broken!
Originally posted by shitowax
After that, if you don't say what decoder you use in mpc, that doesn't help that much.
Anyway, for me, using the 3ivx video decoder, the coded AR is respected in .avi (the broken one), and in .mp4 (the correct one).
With mkv, the decoderSpecificDesc seems to have been lost during the muxing and with it the AR info needed BEFORE the connection... Could some MKV guy comment on that ???
That's why the mkv one uses 1:1 AR. If you remux the mkv into mp4 (with the 3ivx muxer of course!!!), the AR will be restored... but as it's the broken one, that doesn't help that much ;)) I used your 3vix decoder in MPC. And to make sure it was just your decoder that was used I 'un-registered' all the others (except Nero).
Curiouser and curiouser... If the AVI's AR is broken at the bitstream level I wonder how MP4UI could have restored it. If anything, MP4UI would have broken it more!
I forgot to put in my 'notes' that I also viewed all the encodes in hardware, using my Xcard with 16:9 TV output selected and a 16:9 TV. Both the AVI and MKV encodes filled the entire screen (top to bottom and let to righ) but the MP4 encode opened up correctly, with the mattes very nicely restored.
Cheers
Stux
16th April 2004, 13:51
Originally posted by SeeMoreDigital
To generate the AVI used MPEGmediator 1.5 set at 1:1. After cropping away the mattes I'm left with an 720x432 image. In the 3viX settings I selected 'Custom AR' Width:235 Height:100
And there lies your problem ;)
http://www.3ivx.com/support/par.html
If you're encoding a 16:9 source, and its NTSC use NTSC 16:9 PAR
if you're encoding a 16:9 source, and its PAL use PAL 16:9 PAR
You should have no reason to use Custom PAR, and if you do, a custom PAR of 235:100 is a very strange shape for a Pixel...
Sigh
shitowax
16th April 2004, 13:58
I dunno what's you're trying to do with this test but anyway:
For a 2.35:1 DAR you have to use the 16x9 PAL PAR (which is indeed 16/11)....
- With your 235/100 PAR you output a funky 47/12=3.92:1 DAR... and this is what you precisely get with the 3ivx decoder and your .avi.
- The mkv has lost the decoderSpecificDesc during the remux ... no comment.
- your .mp4 contains an xvid encoded movie with the correct 16x9 PAL PAR ... and not a remux of the 3ivx movie with the funky PAR...
I wonder what I should think now ...
SeeMoreDigital
16th April 2004, 15:31
The reason why I used these settings is because this is what I have to do in order to make XviD work properly in an MP4 container.
As usual 'assumption is the mother of all f**k-ups' so I should have known that 3viX would have found a more elegant solution.... And it appears you have!
I've just generated another 'cropped' encode with 3ivX and selected 16:9 and yep it works perfectly :D
For an examples of what XviD looks like when you crop the mattes away from an 2.35:1 image and select 16:9 (instead of 2.35:1), look here (http://homepage.ntlworld.com/seemoredigital/XviD_Cropped_in_MP4_(16.9).zip).
At least I hope nobody else will make the same assumptions as I did. Normally I encode anamorphicly with the mattes. However, I wanted to see how much of an image improvement could be gained by cropping them away. By all accounts there is a visual improvement. So it's all well worth the effort.
EDIT: Stux. The link you provided is very useful. However, bearing in mind that there is quite a quality enhancement to be had by cropping away the mattes from an 2.35:1 anamorphic source it may be worth mentioning how you can do it with your codec, in the form of a graphic.
The differences between leaving the mattes in or cropping them out, when viewed on a big screen via hardware playback, is quite impressive and significant... After-all there's no use using all those precious bits to encode loads of black!
Cheers
Teegedeck
18th April 2004, 16:25
It's not sooo many bits because they're all skipped blocks - but you certainly render GMC useless if you leave the black bars.
SeeMoreDigital
18th April 2004, 22:05
Originally posted by Teegedeck
...but you certainly render GMC useless if you leave the black bars. Interesting point I did not realise this but I suppose it makes sense when you consider a 2.35:1 image laid over an 720x480/576 anamorphic frame contains nearly 33% matte!
Personally I tend to stay away from most forms of ASP features especially with XviD because my Xcard does'nt like it... but it sure likes anamorphic encodes in an MP4 container :D
Some of you guys don't know what you're missing!
Cheers
Sirber
19th April 2004, 03:41
my friend's HDTV don't like anamorphiced xvid resized by the computer. The only way to get it working is to leave it 720x480, or else I'll get black bars top and bottom.
SeeMoreDigital
19th April 2004, 11:19
Originally posted by Sirber
my friend's HDTV don't like anamorphiced xvid resized by the computer. The only way to get it working is to leave it 720x480, or else I'll get black bars top and bottom. So I guess your source was originally 16:9 with no black bars (ie: 1.77:1 or 1.85:1?
It seems that I, like you, have been unable to get anamorphic XviD (AVI) encodes to automatically AR correctly in MPC. I've tried everything I can think of such forcing the XviD encode to play via different Mpeg4 DS filters, forcing XviD to play via 3ivX's DS filter by un-registering all my Mpeg4 DS filters (except 3ivX). Changing the XviD encodes 4CC to 3IV2 but nothing seems to work.
Even if I mux anamorphic XviD into an .MP4 container and play it with MPC it does not AR correctly!
So it would appear, using 3ivX in either AVI or MP4 via MPC is far more successful but only if played back using 3ivX's own DS filter (for the reasons bond explained) but it's still not a perfect solution.
Personally speaking I don't want to change to a different software media player so it would be great if Gabest could create a fix. So I guess if MPC can't detect XviD's AR signalling in AVI or MP4, it ain't gonna work in MKV either!
Cheers
kilg0r3
19th April 2004, 14:23
Originally posted by SeeMoreDigital
So I guess if MPC can't detect XviD's AR signalling in AVI or MP4, it ain't gonna work in MKV either! AFAIK Matroska has its own AR flag/tag. What else should be the purpose of the AR value that you can specify in mkvmerge?
SeeMoreDigital
19th April 2004, 14:46
Originally posted by kilg0r3
AFAIK Matroska has its own AR flag/tag. What else should be the purpose of the AR value that you can specify in mkvmerge? As a rule of thumb, I would have thought just having the AR signalling encoded in the AVI bitsteam prior to muxing into MKV would suffice. As it does when muxed into MP4 (but not with MPC).
However it would seem that if Sirber elected to use the 3ivX codec (instead of XviD) with MKV, he would obtain three options of sending an anamorphic signal. Two from 3ivX and one from MKV!
... surly with this many anamorphic options MPC should see something!
I guess the question has to be asked, has anybody here been able to do what Sirber wants - assuming that the video stream is a proper anamorphic frame size to begin with!
Cheers
Sirber
19th April 2004, 16:26
My XviD encode had XviD AR flag *and* AR flag in MKV (using mkvmerge).
SeeMoreDigital
19th April 2004, 16:32
Originally posted by Sirber
My XviD encode had XviD AR flag *and* AR flag in MKV (using mkvmerge). Why don't you give 3ivX a try with MKV and MPC. And then use different DS filters until you 'hopefully' find one that works!
Might be worth a shot!
Sirber
19th April 2004, 16:48
3ivx is too commercial for my taste.
SeeMoreDigital
19th April 2004, 17:04
Originally posted by Sirber
3ivx is too commercial for my taste. I'm not saying you should use 3ivX permanently if you don't want to, just give it a go to see if it's able to do what you want to.
If it does, then we can 'nicely' ask the XviD guys to incorporate it.
The great thing about both the XviD and 3ivX teams are that they are keen to help.
Cheers
bond
19th April 2004, 18:20
Originally posted by Sirber
3ivx is too commercial for my taste. 3ivx is absolutely available for free and doesnt install things like spyware
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.