Digital Video Forums  

Go Back   Digital Video Forums > Video File Formats > AVI, DivX/Xvid

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 2 Oct 2009, 05:33 PM   #1
Geek in training
 
Join Date: Oct 2009
Location: India
Posts: 5
Default Resizing a video *prior to* compression

Hi all,

This is my first post here although I've been lurking around similar forums for a while now. I'm not completely new to video encoding, having done a few encodes and I understand the basics. I have a lot of AVI movies that are usually around 2 CD's in size (1.4 GB, already XviD encoded) that I want to convert to single CD (~700 MB, AVI format), while maintaining a reasonable degree of quality. For this purpose, I use VirtualDUB with XviD compression. My modus operandi is to encode the video and audio separately and then Mux the output.

During these encodes, sometimes the resultant video's average bitrate falls below 800 kbps from a source bitrate of about 1500 kbps (which is unacceptable). So, my idea was to reduce the dimensions of the video slightly (90%-95%) and then perform the compression. However, this does not seem to be so simple because VirtualDUB seems to apply the resize filters as a "post-processing" mechanism. The bitrate calculator in the XviD configuration dialogs does not seem to take into account the fact that the video dimensions have been reduced, so a higher bitrate would be feasible. It gives me an output video with almost the same bitrate irrespective of whether I apply a Resize filter or not.

In order to work around this, I attempted to do it in two steps - Use VirtualDUB to "Direct stream copy" a resized video and then apply compression to this intermediate file. However, VirtualDUB does not allow me to apply filters in Direct stream copy mode.

I also tried to encode a frame served video (using an AviSynth script to load a Lanczos resized video in VirtualDUB) and encoding it. However, the bitrate calculator and the actual encoding output results in a video with the same quality as earlier. I feel that I am missing something basic and my research has not revealed any clues. Am I even on the right track here and perhaps need to reduce dimensions still more? Would greatly appreciate any help in this matter.

Please note that I do not wish to use H.264 compression because I want the movies to be playable on my standalone DVD player.
Cerebrus is offline   Reply With Quote
Old 2 Oct 2009, 06:42 PM   #2
Lord of Digital Video
Lord of Digital Video
 
paglamon's Avatar
 
Join Date: Aug 2005
Location: 22░38'12.55" N, 88░25'20.87" E
Posts: 2,126
Default

Quote:
It gives me an output video with almost the same bitrate irrespective of whether I apply a Resize filter or not
Well,that is expected. Size of file= bitrate x time. Once you have specified the size of the file to be 700 MB(1 cd), the bitrate will be the same for a given length of the video. The RESIZE filter will not affect the bitrate, but it will have an effect on the quality of video at a given bitrate.Thus, at a lower bitrate,the video with a lower resolution might look a bit better than one with a higher resolution.
__________________

ONLY MOMENTS LINGER...DEWDROPS ON A FALLEN LEAF
paglamon is offline   Reply With Quote
Old 4 Oct 2009, 10:59 PM   #3
Geek in training
 
Join Date: Oct 2009
Location: India
Posts: 5
Default

Paglamon, sorry for not replying earlier... was having internet connectivity issues.

Thank you so much for clarifying the concept so succinctly. I understand now that the bitrate is a fixed parameter based on the running video length (once output size is fixed).

How do the experts do it, then ? How do they create files with ~800-1000 kbps bitrate within a limited size of 700 MB even for videos that extend upto 2 hrs ? If you were given a video file around 1.4 GB in size and asked to convert it to 700 MB with best possible quality, how would you go about it (step by step)?

Edit: You suggested that a lower resolution might look better even at lower bitrate. How is this done ? The only way I know of is to apply the post-process resizing filter in VirtualDUB. Is that the right way to achieve the effect ?

Your response is greatly appreciated.

Last edited by Cerebrus; 4 Oct 2009 at 11:11 PM
Cerebrus is offline   Reply With Quote
Old 5 Oct 2009, 12:10 AM   #4
Super Moderator
 
UncasMS's Avatar
 
Join Date: Nov 2001
Posts: 9,047
Default

as paglamon already mentioned: bitrate is a fixed number which refers to the number of frames / running time

a certain bitrate, say 800kbps, will have to be distributed to ALL the pixels of a given frame

this means that a frame by the size of 720x480 will have way more pixel than 576x384 but the frames of both sizes will get the same bitrate distribution

therefor the saturation in the smaller frames will be higher and may look better in critical scenes/bitrates

by the way: instead of doing the job manually (audio + video conversion + muxing) why not load your input material in tools like mediacoder or super and let them reduce frame and file size?

+++++

in vd mod you can access internal filter like a resizer this way:
=> video => filters => add => resize
__________________

Last edited by UncasMS; 5 Oct 2009 at 12:12 AM
UncasMS is offline   Reply With Quote
Old 5 Oct 2009, 04:40 AM   #5
Geek in training
 
Join Date: Oct 2009
Location: India
Posts: 5
Default

Thanks for that explanation, UncasMS! I think the problem was that I was incorrectly judging the quality of a video by its bitrate.

I use GSpot to analyze all video files. Maybe I should be looking at the Qf instead (which indicates it is actually average "Frame Quality" - bits/pixel-frame) ? If not, what is the right way to accurately measure the relative quality of a video file ?

Thanks for your patience, guys!

Quote:
Originally Posted by UncasMS View Post
by the way: instead of doing the job manually (audio + video conversion + muxing) why not load your input material in tools like mediacoder or super and let them reduce frame and file size?
I prefer to do it manually because I'm a control freak! Additionally, I like to encode the beginning and end credits at a very low weight factor and in grayscale. I also like to encode my audio to mp3 ABR with specific downmixing options. But most of all, I learn a lot every time!
Cerebrus is offline   Reply With Quote
Old 5 Oct 2009, 04:53 AM   #6
Super Moderator
 
UncasMS's Avatar
 
Join Date: Nov 2001
Posts: 9,047
Default

i personally would NOT give toooo much on quality analysis because you already deal with compressed material and i feel tempted to say:
garbage in, garbage out - or you cant turn **** into gold

dont be offended, but you may already have pixelation and bad bitrate distribution and you cannot reverse artefacts and flaws

as a sidenote because you mentioned not wanting h/x264:
my blu-ray player now (after latest fw update) supports MKV playback from cd/dvd/usb

you dont by chance plan to use a htpc or blu-ray player?
they could provide new opportunities

Last edited by UncasMS; 9 Oct 2009 at 01:33 AM
UncasMS is offline   Reply With Quote
Old 5 Oct 2009, 06:16 AM   #7
Eclectician
 
MilesAhead's Avatar
 
Join Date: Nov 2006
Posts: 2,615
Default

Just for grins you could try AviDemux 2.4. You can use the slider to select an I frame after opening credits and before closing credits. In the xvid configuration choose 2 pass video size. The default is 700 MB. Then do your opening and closing credits with other settings. In the Audio menu you just save out the audio track if you wish to process it with a 3rd party program. When done you can mux them back with the same menu.

I haven't experimented with changing sizes for the purpose you mention. But it sounds like if you really want to experiment the way to go would be AviSynth filters. Perhaps using some converter where the entire process is controlled by an AviSynth script that allows you to control which action happens in what order. If you google AviSynth Filters and Tutorial you should get a bunch of sites.

I'm lazy so I learned just enough about AviSynth to edit scripts created by converters, but if you get into it you can do quite a bit of manipulation with free tools.
MilesAhead is offline   Reply With Quote
Old 9 Oct 2009, 01:24 AM   #8
Geek in training
 
Join Date: Oct 2009
Location: India
Posts: 5
Default

Thanks for that useful advice, guys. I'm really pleased to have joined this forum. You folks rock!

I'll create a separate thread to continue the discussion on quality analysis since that question isn't really related to the Thread topic.
Cerebrus is offline   Reply With Quote
Reply

Bookmarks

Tags
avisynth, bitrate, virtualdub, xvid


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing to Anamorphic - compression question spudgun01 DVD Rebuilder 7 21 Jan 2007 08:41 AM
Resizing video toniolo2000 Conversion/Encoding 6 29 Aug 2003 05:07 PM
video files resizing itaidavid General Discussions 1 15 May 2003 12:04 PM
Video Resizing Methods 5k0rp10n General Discussions 2 12 Dec 2002 08:30 AM



All times are GMT +10. The time now is 05:09 PM.

Kirsch designed by Andrew & Austin


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 1999 - 2018 Digital Digest

Visit DivXLand   Visit dvdloc8.com