VideoHelp Forum




+ Reply to Thread
Results 1 to 27 of 27
  1. I wanted to resize the frame of an avi without changing the video or the audio.
    Since I was unsuccessful, (see below), I would like to ask 1st:

    Is this change fast or is it like a new reencode?

    First I tried to use virtualdub in video full processing mode, xvid target quantizer 4, and audio direct stream copy. See the error in the attached. Of course I added the resize filter before run.

    Then, I tried to use AGK. In hidden settings I ticked "Override input AR" and ticked "16:9". In main window I chose 100% target quality and in Advanced settings I left everything to auto (xvid codec). Here is the log:
    [2010-11-24 17:58:11] AutoGK 2.55
    [2010-11-24 17:58:11] OS: WinXP (5.1.2600).2
    [2010-11-24 17:58:11] Job started.
    [2010-11-24 17:58:11] Input file: D:\AV\ToBurn\AugustRush\AugustRush.avi
    [2010-11-24 17:58:11] Input codec: DivX 5
    [2010-11-24 17:58:11] Source duration: 1h 54mn 17s 107ms
    [2010-11-24 17:58:11] Output file: D:\\AV\ToBurn\AugustRush\AugustRush_agk.avi
    [2010-11-24 17:58:11] Output codec: XviD
    [2010-11-24 17:58:11] Audio 1: 112 Kbps MPEG-1/2 L3 2ch
    [2010-11-24 17:58:11] Subtitles: none
    [2010-11-24 17:58:11] Format: AVI
    [2010-11-24 17:58:11] Target quality: 100%
    [2010-11-24 17:58:11] Audio 1 settings: Auto
    [2010-11-24 17:58:11] Started encoding.
    [2010-11-24 17:58:11] Source resolution: 616x256
    [2010-11-24 17:58:11] Source fps: 23.976
    [2010-11-24 17:58:11] Manual aspect ratio: 16:9
    [2010-11-24 17:58:11] Output will contain 164406 frames
    [2010-11-24 17:58:11] Demuxing audio.
    *************************************
    EXCEPTION: Unsupported audio type.
    *************************************
    [2010-11-24 17:58:11] Job finished. Total time: 0 seconds

    Notice that AGK says the source is DivX!
    Image Attached Thumbnails Click image for larger version

Name:	GSInfo.jpg
Views:	219
Size:	271.6 KB
ID:	4316  

    Image Attached Images  
    Last edited by drgt; 24th Nov 2010 at 12:53.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Changing frame size requires reencoding.

    Be sure to try change your frame dimensions to an even value. Or try resize with avidemux.
    Quote Quote  
  3. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    If you are just trying to change the aspect ratio, and not actually change the resolution, try Mpeg4Modifier. For Xvid/Divx AVI files it can change the aspect ratio flags without the need for re-encoding.
    Read my blog here.
    Quote Quote  
  4. I wanted to change the AR to avoid those black bars during playback or avoid to have to zoom to get rid of them. But if I am gonna spend an hour or so doing this, then I prefer to zoom.

    Apart from that, Thank you guns1inger, I 'll give it a try.
    Baldrick, you 're right. This 616 is indeed ODD!!!

    What is strange is that AGK reports source as DivX while GSpot says the source is XVid!
    Also strange is the fact that AGK got stuck on audio, and virtualDub got stuck on video.

    Both DivX and XVid are installed in the system.
    Quote Quote  
  5. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    To get rid of black bars means cropping and resizing and re-encoding. Very few movies fit a TV screen perfectly. Personally, I just don't understand the issue with aspect ratios and letterboxing.
    Read my blog here.
    Quote Quote  
  6. I agree. There are so many AR out there. There should only be 4:3, 16:9 and this new very wide one (I forget the ratio) tops!
    Quote Quote  
  7. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    It's approx 2.40 - a common size for the cinema. Are you trying to make it less wide when played back on
    a standalone player? Most ignore internal aspect ratio flags within the file. You'll have to re-encode it.

    Have you tried AVIdemux ?

    PS this movie will look pretty bad stretched to 16/9, but horses for courses and all that.
    Might be better finding a compromise, crop 20 off the left and right and then resize to
    576/288 -giving a ratio of 2.0.

    I did this in Virtualdub and it worked fine.
    Last edited by davexnet; 25th Nov 2010 at 06:38.
    Quote Quote  
  8. If it requires re-encoding, it is not worth it. Better zoom in.

    Just curious about what I defined "strange" above.

    Any ideas?
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Yes . If you look at the header of the file in the HEX editor, the so-called "video codec FOURCC handler" is "xvid" , while the
    "video format FOURCC code" is "DX50". Both can be overridden in Virtualdubs extended open dialog - although as I mentioned,
    I opened it without issue as-is.

    You should be able to recode this file in 30-40 minutes on any average, recent PC.
    Quote Quote  
  10. Originally Posted by drgt View Post
    If it requires re-encoding, it is not worth it. Better zoom in.
    I don't understand some people's obsession with not seeing black bars. Why not just view the movie the way it was intended to be seen? The full frame, with the correct aspect ratio, and no distortion. Do you complain to the movie theater manager when the curtains cover unused parts of the screen at the theater?
    Quote Quote  
  11. I think it's all psychological. It doesn't bother people in a theater as much, because it's dark enough that you can't see where the screen ends and the wall beings. If people bought TV's with black bezels or darkened their room enough, it probably wouldn't be an issue.

    Originally Posted by jagabo View Post
    Originally Posted by drgt View Post
    If it requires re-encoding, it is not worth it. Better zoom in.
    I don't understand some people's obsession with not seeing black bars. Why not just view the movie the way it was intended to be seen? The full frame, with the correct aspect ratio, and no distortion. Do you complain to the movie theater manager when the curtains cover unused parts of the screen at the theater?
    Quote Quote  
  12. Good point jagabo; I think robjv1 has the answer!

    Personally, due to ignorance, back then when I bought my 1st wide screen tv I thought I 'd say goodbye to those annoying black bars!

    But, you got to admit, tv not being nearly the size of a movie theater screen, if you see a 2.4 ratio movie on relatively small tv it is simply annoying. It uses less than half the screen. This ratio is for the theater and extra wide tv.
    Quote Quote  
  13. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    I have watched and enjoyed 2.4 : 1 movies on smaller sets, and hell, I even encode widescreen for my iPod classic. My largest TV is only 37 inches, which isn't all that big by today's standards, and for years I watched widescreen on 4:3 CRT. In all that time I have never noticed the black bars.
    Read my blog here.
    Quote Quote  
  14. I guess the matter is subjective.

    Anyway, I thought I 'd give it a 2nd try, so I loaded it on VDub, this time using DivX codec. In code configuring I selected Home Theater preset 3 and overidden source AR to 640x360. The process took 20 minutes.

    Is it possible to maintain picture quality when resizing? If yes, what settings should I use?
    See picture below.
    Image Attached Thumbnails Click image for larger version

Name:	2869.JPG
Views:	156
Size:	39.7 KB
ID:	4392  

    Quote Quote  
  15. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Don't screw with the aspect ratio when resizing. Crop to 1.778 : 1 (16:9) first, the resize after that if necessary. Note : if you are cropping files that are not original source (your own DVDs) then chances are they have already been cropped (bars removed) and resized down. When you crop them further, they may become quite small. Resizing them back up will only degrade picture quality further. That is the price you pay. If you are using your own DVDs as source material, start by cropping off the bars (leaving a small amount for overscan is usually a good idea), then crop the edges off to get to 1.778 : 1, and encode at whatever resolution you are left with. Trying to resize up will only hurt you.
    Read my blog here.
    Quote Quote  
  16. Re-encoding with a lossy codec will result in quality loss too. And finally, the bigger image on screen will make all those defects and low resolution more visible.
    Quote Quote  
  17. Guns1inger: Let me see if I get this right. So what you are saying is "Do not squeeze nor stretch the image by altering the ratio. Just select a centered 16/9 area and discard what is out of it." (Basically, "do the zoom here").

    Assuming this is right:
    In VDub if I choose video direct stream copy (so I use the same codec, no recompression) the "filters" is dim and I cannot select a null filter so I can crop the image.

    How do you do it?
    Is there an automatic 16/9 crop or I have to do it manually?

    Does this mean that whatever was out of the crop box will be replaced by black? If yes, it defeats the purpose.
    Quote Quote  
  18. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Here's what I came up with, bit of a compromise. I cropped 36 from the left and right
    then resized to 544/304. SO you lose less at the edges and the stretch doesn't look so ridicuous:

    Click image for larger version

Name:	resize.JPG
Views:	282
Size:	84.0 KB
ID:	4395
    Quote Quote  
  19. Originally Posted by drgt View Post
    In VDub if I choose video direct stream copy (so I use the same codec, no recompression) the "filters" is dim and I cannot select a null filter so I can crop the image.
    You can't crop the video in Direct Stream Copy mode.

    Originally Posted by drgt View Post
    How do you do it?
    Is there an automatic 16/9 crop or I have to do it manually?
    Add a Null Transform filter and elect to add cropping to that filter at the main filter dialog. Cropping can be added to any filter -- so if you're going to use another filter you can attach cropping to that filter instead. Cropping takes place before the filter is applied.

    Originally Posted by drgt View Post
    Does this mean that whatever was out of the crop box will be replaced by black?
    No, it leaves you with a smaller frame.
    Quote Quote  
  20. Originally Posted by jagabo View Post
    Originally Posted by drgt View Post
    In VDub if I choose video direct stream copy (so I use the same codec, no recompression) the "filters" is dim and I cannot select a null filter so I can crop the image.
    You can't crop the video in Direct Stream Copy mode.

    Add a Null Transform filter and elect to add cropping to that filter at the main filter dialog. Cropping can be added to any filter -- so if you're going to use another filter you can attach cropping to that filter instead. Cropping takes place before the filter is applied.
    So, I select "Full Processing Mode" in order for "Filters" to be available. I select a null filter which does nothing except for allowing me to crop.

    Is there an automatic 16/9 crop or I have to do it manually?

    Now, since I am in full processing mode, do I go on to "compression" choose codec (in this case we want the same codec) and configuration settings? If yes, that would be a re-encode with a loosy codec which means we loose quality which I do not want.

    So, I cannot crop the frame without re-encode?
    Quote Quote  
  21. Originally Posted by drgt View Post
    If yes, that would be a re-encode with a loosy codec which means we loose quality which I do not want.
    Then don't bother with cropping and resizing.
    So, I cannot crop the frame without re-encode?
    That's right. Didn't you even remember what you were told earlier in this thread:
    Originally Posted by Baldrick View Post
    Changing frame size requires reencoding.
    Originally Posted by guns1inger View Post
    To get rid of black bars means cropping and resizing and re-encoding.
    Is it in one ear and out the other? Are we just wasting our time here?
    Quote Quote  
  22. Originally Posted by drgt View Post
    Is there an automatic 16/9 crop or I have to do it manually?
    Did you try it? Did you see an automatic setting? Too hard to use a calculator?

    width = height * 16 / 9
    If you're going to compress with Xvid you should then round to the nearest mod 4 frame size (mod 8 or mod 16 is even better).

    Originally Posted by drgt View Post
    Now, since I am in full processing mode, do I go on to "compression" choose codec (in this case we want the same codec) and configuration settings? If yes, that would be a re-encode with a loosy codec which means we loose quality which I do not want.
    Since the process of cropping video involves first decompressing the source, then cropping, you will have to recompress it if you want a compressed file. In VirualDub select Video -> Compression, select the codec you want to use, press Configure, and adjust the codec to your liking.

    If you don't want to lose quality to a lossy compression you will have to use a lossless codec or no video compression. That will result in enormous files. Your 616x256 source, cropped to 456x256 (~16:9 and mod 8), compressed with HuffYUV will result in about 7 GB/hr, about ~20 GB/hr as uncompressed YUY2, ~30 GB/hr as uncompressed RGB.

    Actually, even using a lossless codec or no compression you will get a little quality loss because VirtualDub filtering works in RGB and your source is in YV12. To perform the crop VirtualDub will convert the YV12 to RGB which will result in a small quality loss. Then the compression codec may convert back to a YUV leading to a little more quality loss.

    Originally Posted by drgt View Post
    So, I cannot crop the frame without re-encode?
    You have been told this many times, unequivocally. No.
    Last edited by jagabo; 27th Nov 2010 at 07:06.
    Quote Quote  
  23. Thank you for your in depth explanations.

    Originally Posted by jagabo View Post
    You have been told this many times, unequivocally. No.
    Originally Posted by manono View Post
    Is it in one ear and out the other? Are we just wasting our time here?
    Sorry guys, I got confused by:
    Originally Posted by guns1inger View Post
    If you are just trying to change the aspect ratio, and not actually change the resolution, try Mpeg4Modifier. For Xvid/Divx AVI files it can change the aspect ratio flags without the need for re-encoding.
    Of course you are not wasting your time, you are offering a much appreciated service! Some ...students need to ask more than once!
    Originally Posted by jagabo View Post
    Did you try it? Did you see an automatic setting? Too hard to use a calculator?
    A simple "no" would suffice. Didn't hurt to ask, did it?
    Quote Quote  
  24. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    There is one final point where there will be a perception of quality loss - playback. After all the cropping your resolution will have been substantially reduced in most cases. On playback you will be resizing the image bacl to full screen, however this time with a larger amount of zoom. This will make any artifacts either in the source or from your cropping and re-encoding much more obvious, and the quality fo the resize will be completely up to the resizer in your player or TV. And they are not all created equal.
    Read my blog here.
    Quote Quote  
  25. Originally Posted by guns1inger View Post
    There is one final point where there will be a perception of quality loss - playback. After all the cropping your resolution will have been substantially reduced in most cases. On playback you will be resizing the image bacl to full screen, however this time with a larger amount of zoom. This will make any artifacts either in the source or from your cropping and re-encoding much more obvious, and the quality fo the resize will be completely up to the resizer in your player or TV. And they are not all created equal.
    I pointed that out already. Though not as clearly.
    https://forum.videohelp.com/threads/328552-Frame-resize?p=2035587&viewfull=1#post2035587
    Quote Quote  
  26. Another question:

    Up until now, we discussed changing the frame size of a compressed video file. Now if we had the DVD and we wanted to change its "unconventional" frame size to a 16:9 or to 4:3 would we run into the same problem as the picture(s) I posted above?
    Quote Quote  
  27. Unconventional? Most movies are shot at 2.35:1. If anything, 16:9 is unconventional. Nothing was shot at 16:9 until HDTV was standardized at that size. Even now, only TV shows are shot at 16:9.

    And yes, DVD has to be handled similarly if you want to convert 2.35:1 to 1.78:1. How else are you going to fit a wide video in a less wide screen?
    Last edited by jagabo; 28th Nov 2010 at 11:58.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!