VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Member
    Join Date
    Nov 2009
    Location
    United Kingdom
    Search Comp PM
    I have a few videos that have been shot with a portable camera on their side and need to be rotated 90 degrees. I am able to do this with virtual Dub; however it seems to re-encode the video even if I go to compression menu and select the same codec that the video was shot in. The source video was shot in XVID MPEG 4 and it around 6.84mb in size. When virtual dub has rotated this video and saved it in the same codec it is now only 1.25MB in size, so Virtual Dub is obviously compressing the video further. All I want to do it rotate the video, and save in exactly the same form without changing the file size or re-endoding in any way. Are there any programs that will allow me to do this? – either free programs or commercial?

    I am able to rotate the video in VLC and play it, but there is no option to save this rotated video? Is there a build of VLC I can install or any other program that will allow me to rotate without re-encoding or loosing quality? When I play my rotated video in VLC the quality looks great. It is just I can't save it?? This should be a simple thing to do without even having to open a fully fledged video editor. A neat idea would be to have a program that adds a rotate function to the windows context menu on right click – like you can do with pictures.

    Thanks Dave
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    I'm pretty sure you must reconvert. But increase the target quantizer or bitrate to get similar quality as the source. In virtualdub under video->compression->xvid and click configuration. Drag the target quantizer to max quality or click on target quantizer and you can set the bitrate manually(click on calc to calculate it).
    Quote Quote  
  3. Member
    Join Date
    Nov 2009
    Location
    United Kingdom
    Search Comp PM
    Thanks for your reply

    I have selected best quality; however the output video is still smaller at 5.41MB opposed to 6.84MB source. I can't understand why I have to re-encode as all I want to do is change the rotation with everything else staying the same - Codec bitrate etc. I don’t want smaller file or larger file, just everything the same apart from rotation.

    If VLC can rotate without re-encoding why can't it just save this output? Surely it can't be that hard??
    Quote Quote  
  4. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    As soon as you change the video....it need re-encoded. Plain and simple.
    Quote Quote  
  5. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by marada
    If VLC can rotate without re-encoding why can't it just save this output?
    The rotation is done after decompressing, before displaying on the screen.
    To save it would require recompressing the changed image, ie re-encoding.
    Quote Quote  
  6. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by marada
    If VLC can rotate without re-encoding why can't it just save this output? Surely it can't be that hard??
    When VLC, or any player, displays a video -- creates an output stream -- it has decompressed it.
    This can then transformed in various ways.
    To save that uncompressed image you have to reencode.

    There are some bitmap formats (like jpeg) where you can do a lossless rotation, but I'm pretty sure than no video formats allow that. More to the point, no applications support this.
    Quote Quote  
  7. In theory DCT compressed video can be rotated without fully decompressing the frames. In practice, nobody has written a program to do this because it's quite complex.

    The simplest solution is to remux your video into a container that supports rotation in its header metadata to instruct players to rotate the video at playback. I believe MP4 supports this but I don't know of any muxers that give the option.
    Quote Quote  
  8. Member
    Join Date
    Nov 2009
    Location
    United Kingdom
    Search Comp PM
    So in summary is Virtual Dub the best tool for this, and how do I get Virtual Dub to output the exact same file size / quality of the rotated video compared to the source?
    Quote Quote  
  9. Member
    Join Date
    Nov 2009
    Location
    United Kingdom
    Search Comp PM
    Also please check out the following tool that enables you to rotate video from within windows just by right click:

    http://www.nirp.co.uk/rotatevideos/download-rotate-videos

    The problem is I run windows 7 and this tool was not working for me. Also it is in a very early development.
    Quote Quote  
  10. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    Originally Posted by marada
    how do I get Virtual Dub to output the exact same file size / quality of the rotated video compared to the source?
    It's being re-encoded. Forget about the original file size. That is gone....along with the original quality.
    Quote Quote  
  11. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by marada
    how do I get Virtual Dub to output the exact same file size / quality of the rotated video compared to the source?
    Same quality as the source: choose a lossless codec (Lagarith, FFV1,
    lossless MJPG, lossless H264, Ut Video, CamStudio 1.0, etc) ;

    Same file size as the source: not possible.
    Quote Quote  
  12. You can't get both the same file size and same quality. It's one or the other. Or something in between.

    A simple way to get fairly good quality, without increasing the file size too much, and relatively quickly, is to encode with Xvid in Single Pass, Target Quantizer Mode with a quantizer of 3.
    Quote Quote  
  13. Member
    Join Date
    Nov 2009
    Location
    United Kingdom
    Search Comp PM
    Same quality as the source: choose a lossless codec (Lagarith, FFV1, lossless MJPG, lossless H264, Ut Video, CamStudio 1.0, etc) ;
    I can't see how that would work at the video is already in Xvid, that would mean re-encoding to Lagarith which would achieve nothing. To preserve quality it would be best just to stick with Xvid as that is what the source is.

    Does everyone agree?
    Quote Quote  
  14. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Lagarith is lossless, so there would be no quality loss. Xvid is lossy. Each re-encoding with Xvid incurs a quality drop to some degree. If you are happy with larger file sizes, use Xvid, do a quality based encode with a quantiser of 2, and most likely you wont see a visual difference. However the file size could be substantially larger.
    Read my blog here.
    Quote Quote  
  15. Member
    Join Date
    Nov 2009
    Location
    United Kingdom
    Search Comp PM
    use Xvid, do a quality based encode with a quantiser of 2, and most likely you wont see a visual difference
    Why use a quantiser of 2 when 1 is better quality? I used 1 and the file size is still around 1.5MB smaller than the source. If this is the best Xvid quality why is it smaller than the source which is the same codec? What about bitrate how would I set that to the highest?

    On another note I know lagarith is lossless, however the video is Xvid so you must still convert from Xvid to Lagarith which will incur a slight quality drop (as with anytime you re-encode anything). I don't kow how this would compare to just keeping it as Xvid?
    Quote Quote  
  16. No, there will be no quality drop with Lagarith.

    The process of reencoding video consists of decompressing the source then compressing again. Using a lossless compression in the recompression means that the video that comes out of that compression is exactly the same video as went in. Exactly the same video that came out of the first decompression. You could decompress and recompress a thousand times with Lagarith and the video that came out of that 1000th decompression would be exactly the same as the video that went into the first. But using a lossless codec will usually give you a file that many times larger than an Xvid source.

    It's highly unusual that your Xvid recompression at target quantizer 1 came out smaller than your Xvid source. There is something unusual about your source. Maybe it's all I frame? A quantizer of 1 will usually result in a much larger file. So big in fact that you might as well use a lossless codec (hardware compatibility aside). A quantizer of 2 will also usually generate a significantly larger file as the encoder is working hard to preserve the artifacts created by the first compression.

    Also, turn off B frames if you want a little more quality. Even in a Target Quantizer encode, B frames are encoded at a lower quality.
    Quote Quote  



Similar Threads

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