Log in

View Full Version : Real Reducing image size... (Was "AviSynth, vdub problem)


Joni
12th November 2003, 08:48
Hi!
Can someone help me out here, please?

I want to import a .rm-file to VirtualDub, it is a file with a resolution of 640x480, 7,5 fps and itīs compressed to 100Kbps with "Helix Producer" (the clip is 189 frames long).

I have used "Avisynth" to import .rm-files to VirtualDub several times before, but only files with 320x240 in resolution.
The problem is that when the file pops up in VirtualDub it has not the correct resolution (size), it should have 640x480 but it becomes 464x352. Why? And how can I bypass this?

I have used the following .avs syntax:
--------------------
Video=DirectshowSource("RM_640x480_7,5fps_100Kbps.rm", fps=7.5)
Video=Trim(Video,0,186)
return Video
--------------------

I have a couple of different compressions (34K, 50K, 100K, 225K and 450K) on the same source file, with the same resolution and framrate as mentioned above. The 225K and 450K compressions works as I want when I import them to VirtualDub, but the three compressions with the lowest bitrates becomes resized when I import them.
What should I do?

[Edit by sh0dan: Changed title]

sh0dan
12th November 2003, 09:20
Are you 100% sure your video isn't compressed this way?

Joni
12th November 2003, 09:41
Yes, Iīm 100% sure about that!

It there any function in Avisynth that can specify the size, so that I can lock it in some way. Or, how should I bypass this?

sh0dan
12th November 2003, 09:51
Where have you checked the size? Media player?

Joni
12th November 2003, 10:30
Iīve used a couple of different applications to verify the size. "GSpot", "Avicodec", "VirtualDub", "Windows Media Player 9" and "RealOne Player". They all say the same thing.

I can also say that the compressions gets different sizes. The 100K compression becomes 464x352, and both the 34K and 50K becomes 336x256. I canīt figure out wy this is so? Help me!
/Joni

sh0dan
12th November 2003, 10:48
Could you post a sample?

Joni
12th November 2003, 11:14
How do mean? Shall I post the file it self? And if so, how do I do that, this is only my 6th post at the Doom9 Forum.
Or do you mean that I should post some description of the files?
Iīm really grateful that you want to help me!

sh0dan
12th November 2003, 12:14
You would have to put it on a web-page or similar, as it isn't possible to attach (larger) files here.

Joni
12th November 2003, 12:29
I donīt have any web server and Iīm sitting at a company with firewalls.So it seems impossible for me to post the file!
Unless I canīt mail the .rm-files to you? The files are not that big. The 34K-compression file is just 114KByte, the 50K-compression file is 159Kbyte and the 100K-compression file is 321Kbyte.

sh0dan
12th November 2003, 13:53
The files ARE 464x352 in size (reported by Graphedit). However aspect ratio is set to 640x480, so the player is upscaling the video to 640x480.

This is probably done by Real Producer. I'll move the the thread to the appropriate forum.

scharfis_brain
12th November 2003, 14:23
realproducer is reducing image size (without asking!) when bitrate is dropping a certain limit.
the normal size will be rescaled py the player at playback.

Joni
12th November 2003, 15:19
Is there anything that I can do to make Helix Producer not to resize the file?

karl_lillevold
12th November 2003, 20:11
compressing 640x480 at 100 kbps and lower, while maintaining an acceptable PQ and framerate, is very hard. Based on certain criteria, like bits/pixel, Producer may decide to resample the video before compression, and put a flag in the bitstream to have the player resize back on playback. This happens both dynamically, and statically. So in this case, Producer decides ahead of time that the bits/pixel is so unreasonable it needs to do something about it :(

For such low bitrates, this is the only case where 'normal' vs 'sharp' video mode actually matters, since when using 'sharp' the decision to resample will happen later than in 'normal'. However, this does not help here, since the bitrate is too low, relative to resolution.

The ability to disable this resampling is a good idea for a custom codec option (undocumented tweak), and I just added it. Should be available in the next Milestone or erv4 snapshot. Joni, you can get it touch with me via PM, if you would like to try it out. Without resampling at these low bitrates, it may be hard to get the codec to achieve the target bitrate though, especially for a short clip. In the meantime, I found that when using 2-pass, it is easier to get Producer to encode in the native resolution, but without the option I just added, this is still no guarantee.

Also, be aware that when using RealMediaSplitter (DirectShowSource in Avisynth), you do not get frame rate upsampling, which improves the user experience when the framerate is 15 fps and lower, and motion not too high.

LeonMcNichol
13th November 2003, 00:45
This would explain why I got 240x480 when I played the commercial I encoded in zoomplayer. I thought it was something I did to my directshow to make it not show up properly. WMP, MPC, and RealOne showed it at 640x480, but zoom player and graphedit showed it at 240x480. I just did a directshowsoure on it and got 240x480. So now I know it was compressed like that... Now, can someone tell me how to make zoomplayer act like the other players? I use it as my output to tv player. Since I can adjust for overscan.

BTW, why did it encode at 240x480? Bitrate is listed as 968.8Kbps in RealOne. That doesn't seem very low. And previously, when I was encoding Saber Marionette J at 500kbps, they weren't resized and actually play at 640x480 in zoom player.

karl_lillevold
13th November 2003, 00:58
why did it encode at 240x480? Bitrate is listed as 968.8Kbps in RealOneI have never seen that happen. Are you sure it's not 320x480? That's called HHR, half-horizontal resolution, where the encoder will encode high resolution video at half the resolution horizontally, and the player will scale back on playback. We used this in the past with RV8, and you also get it if you choose 'smooth' video for the video mode selection in RV9.

LeonMcNichol
13th November 2003, 01:35
Did I say 240? I meant 320... And you are right, I may have hit smooth for this. Now I know not to do that again. Thanks for your help.