Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Anamorphic Widescreen (MKV) (Read 7645 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Anamorphic Widescreen (MKV)

In mmg.exe I set the resolution to 720 X 364, thats the resolution I got after cropping in Gordian Knot.  When I first tested the resultant files it seemed to have failed, there where black bars on the top and bottom and a green line at the very bottom, below the black bar that is.  I figured that it was either because I should have set the resolution to 720 X 304, which was the output resolution from Gordian Knot or that it was on the decoding end, in one way or another I didn't have Media Player Classic set up right.  However, by some off chance I selected the two files for deletion, but opened them by accident (note: I have MPC set to open each file in a separate window).  The first one that opened, opened like it did before; black bard, green line but, to my surprise, the second video to open, opened in perfect anamorphic widescreen  .  With some experimenting I have found that the file I right click on, while both selected, to hit open, is the one which opens in anamorphic widescreen.  Thus I can live with this how it is but I would:

(A)Like to know what's going on and

(B)Figure out how to fix it because if I don't have to go through this (slight) hassle, I would just a soon not.

edit: using MKV Tools 1.01, MPC 6.4.8.2, Matroska Pack 1.03, Win 2000 SP4
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

Anamorphic Widescreen (MKV)

Reply #1
i have noticed similar problems with some dv files (which must be displayed in '4:3'), solution is to open, stop, play. iam not sure anyone is actually working on mpc at the moment so bug reports wont help probably.
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

Anamorphic Widescreen (MKV)

Reply #2
Quote
With some experimenting I have found that the file I right click on, while both selected, to hit open, is the one which opens in anamorphic widescreen.
[a href="index.php?act=findpost&pid=260805"][{POST_SNAPBACK}][/a]

Sounds like a renderer issue to me, maybe? First video you open will use the default set in MPC config; for the second one it might fall back to another renderer.

But that's all speculation, no idea whether this is actually plausible..
A riddle is a short sword attached to the next 2000 years.

Anamorphic Widescreen (MKV)

Reply #3
I too think it must be a renderer issue. Try to experiment with all the different renderers in MPC. And I think that I remember something about overlay mixer being able to resize only horizontally, not vertically, so this could be your problem.

Anamorphic Widescreen (MKV)

Reply #4
Thanks for the replys.  I'll check out the renderer and try just stoping and restarting MPC, that would at least be better then my current solution.
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

Anamorphic Widescreen (MKV)

Reply #5
Stopping and starting the file does not help.  Nor does opening it in a different rendering mode.  In fact, for all rendering modes but VMR9 (renderless) in 2D or 3D, my trick does not even work and there seems to be no way to get the file to play properly .
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

Anamorphic Widescreen (MKV)

Reply #6
Alright. Just noticed.  Height 364 is not a multiple of 16 (or 8). Hence the green bar. What is the original height of the video? Have you tried remuxing the video with --display-dimensions 1:720x304?
I am absolutely certain that the windows version of mplayer (www.mplayerhq.hu) will play your original file perfectly.

Anamorphic Widescreen (MKV)

Reply #7
Quote
Alright. Just noticed.  Height 364 is not a multiple of 16 (or 8). Hence the green bar. What is the original height of the video? Have you tried remuxing the video with --display-dimensions 1:720x304?
I am absolutely certain that the windows version of mplayer (www.mplayerhq.hu) will play your original file perfectly.
[a href="index.php?act=findpost&pid=260890"][{POST_SNAPBACK}][/a]

Oh, perhaps that is the problem.  I thought that the point of anamorphic resolutions was to overcome the limitations of mod16.  720 X 364 was the resolution of the origonal video after it had been cropped, 720 X 304 was the resized resolution, I don't understand why they would differ and I would have thought that 720 X 304 would have been the default display for the video if I had of muxed it without setting the resolution.  Where am I mistaken here?  How is all this actually supposed to work?

edit: clarification
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

Anamorphic Widescreen (MKV)

Reply #8
OK, I'll try to explain. Your original video (assuming DVD source) is 720x576 (or 720x480 for NTSC). If the aspect ratio of the DVD is 1.8 your DVD will play anamorphically at 1039x576. Note that after cropping the black bars to 720x368 the correct aspect ratio becomes about 2.8. Anamorphic playback basically means stretching the horizontal resolution to make the aspect ratio correct. Since the human eye is more sensitive to vertical resolution you probably cannot tell the difference between a 1039x576 video and a 720x576 video played anamorphically at 1039x576. Now when you are encoding the DVD (assuming in MPEG4) you are resizing it. And you have to follow the mod16 rule when you are making MPEG4 videos. If you don't want an anamorphic video your video resolution will be the same as the playback resolution (square pixels). So a 720x304 video will play at exactly that resolution. In other words you corrected its aspect ratio when encoding. If you want to create an anamorphic video you should stick to what anamorpic means: stretching the horizontal resolution. So you could encode at 400x384 and when played anamorphically with an aspect ratio of 2.8 it will play at 1075x384.
So in your case for your video to play back properly you should play it with square pixels (not anamorphically). If you try to resize vertically as you do you miss the point of anamorphic playback.
In any case when you encode to MPEG4 you should always stick to mod16. Anamorphic playback will resize only the horizontal axis. The anamorphic resize doesn't have to be mod16 horizontally but the encoded file does.
I hope all these didn't confuse you. 
[span style='font-size:8pt;line-height:100%']
edit: ration->ratio[/span]

Anamorphic Widescreen (MKV)

Reply #9
what he was trying to say () is:

"either encode at 720x364 and set the aspect ratio to 2.35 in mmg, or encode at 720x304 and leave the aspect ratio alone."

no need to fiddle with playback res btw.
A riddle is a short sword attached to the next 2000 years.

Anamorphic Widescreen (MKV)

Reply #10
Thanks a lot guys, I get the idea now.
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

Anamorphic Widescreen (MKV)

Reply #11
The idea of using the AR flag in MKV is to avoid that any kind of resizing filter is being used during the encoding process, as its known that resizing filters introduce a lot of noise on the temporal axis, putting extra stress on the encoder. This way you can preserve the full resolution of the DVD source, especially in vertical direction, with only a marginally higher bitrate compared to the extra resolution you gain.

In my tests with a typical 1:2,35 video ( Star Wars - Phantom Menace ), these were the results when encoding a part of the movie with a fixed quantizer :

720 x 576 ( full picture, uncropped ) :                    124 %                                                                       
720 x 432 ( cropped ) :                                        122 %
720 x 304 ( cropped and resized ) :                        100 %

As you can clearly see, with only a 22% higher bitrate, you will achieve a 42% higher vertical resolution, and as one member was pointing out above, this is where the human eye is more sensitive.

If you do this, you should set the playback AR to 1024 x 432, to make sure your movie will play with the right aspect ratio ( 1 : 2,35 ).

2 Other things are important :

1. Even though most MPEG4 encoders today will allow to use other resolutions, sticking to the MOD 16 rule will improve encoder performance significantly. 720 x 432 fulfil this rule.

2.  However, in any case you have to avoid that there is some rest pixels of the black bars remaining on top and bottom of the video ( after cropping, remember you DONT use any resizing filter or the numbers above are NOT valid anymore ), so to fulfil MOD 16 or at least MOD 8 rule, dont hesitate to crop a couple of lines into the picture. Nobody will notice if 3 or 5 of 432 lines are missing, i swear  ....

Christian
matroska project admin
http://www.matroska.org

Anamorphic Widescreen (MKV)

Reply #12
Quote
2.  However, in any case you have to avoid that there is some rest pixels of the black bars remaining on top and bottom of the video ( after cropping, remember you DONT use any resizing filter or the numbers above are NOT valid anymore ), so to fulfil MOD 16 or at least MOD 8 rule, dont hesitate to crop a couple of lines into the picture. Nobody will notice if 3 or 5 of 432 lines are missing, i swear  ....

Christian
matroska project admin
http://www.matroska.org
[a href="index.php?act=findpost&pid=261329"][{POST_SNAPBACK}][/a]

With my newest encode I left 2 black lines of pixels on the top and bottom to avoid resizing to mod 16 (I thought this to be better than cutting away a couple of lines but I suppose your right no one would notice a couple of lines).  The result seems to be very good, do you think I could get considerably better quality out of a reencode or should I not bother?
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

Anamorphic Widescreen (MKV)

Reply #13
Quote
With my newest encode I left 2 black lines of pixels on the top and bottom to avoid resizing to mod 16 (I thought this to be better than cutting away a couple of lines but I suppose your right no one would notice a couple of lines).  The result seems to be very good, do you think I could get considerably better quality out of a reencode or should I not bother?


The sharp contrast between the black borders and the picture is in fact eating a lot of bandwidth, so unless you made a 2 CD rip and had plenty of bandwidth to spend, yes, i would redo it ! A good test is always to reencode only a certain part of it, with and without fully cropped black bars, and using a fixed quantizer ( mq = k = MQ ) for these test encodes. The file size difference will then give you a good idea if its worth doing it again, or not.

Christian
matroska project admin
http://www.matroska.org