Hi all
I have a Sony DivX certified DVD Player, and it can play DivX/Xvid files (in avi container), so obviously I want to convert all my video files so I can play them on it.
I’ll give you a clear example for my problem
Lets say that I have this file:
and I want ti convert it to avi (DivX) using TMPGEnc 4.0 Xpress
so I’ll choose an AVI output format
then DivX video codec (wich is DivX 6.6.1) and mp3 for the Audio
now I want to configure settings so the target file matches the source file (picture size and quality)
it’s obvious that the video size should be 352*240 like the original
other settings like aspect ratio is no problem for me
but the problem is in the bitrate!!!!!!!!!
As far as I know, the bitrate for the source file is 1151 kbps (and its MPEG-1)
If I didn’t play with any of the divX settings
the output file will be like this
so the size dropped from 588 to 392 MB
and the bitrate for the AVI divX file is 702 kbps
is this OK????????
or should I put the same bitrate like the source file manually like this
I want to add
Concerning converting toDivx/Xvid the aspect ratio doesn’t matter because they don’t have any aspect ratio, so we should resize the video if we want to watch it on TV (4:3 screen for example)so it wouldn’t look stretched
Concerning the main question about setting the bitrate
I know how to use the calculator to set a bitrate when I want a specific size for the file (like if I wanted the output file size to be 695 b I can know how to set the bitrate)
But how can I set a bitrate that doesn’t depend on a file size, but depends on the quality… I mean how to set a bitrate that ensures me that I didn’t lose any quality and at the same time that I didn’t set extra bitrate that will increase the output file size without having a better quality
so I think its better to select home theater, but if I choose it i will not be able to configure settings, only change the preset and I don't have any idea what preset 3 or 4 or 5 meansProfiles are pre-programmed settings for the DivX codec that conform to standards set by DivX.com, hence ensuring maximum compatibility with DivX devices. This will make sure your encoded video files are compatible with DivX enabled devices that are available on the market (like standard DVD/DivX players). By turning certification off, the risk is that the file you have encoded will not playback properly on certified DivX devices, and can only be avoided if you knew exactly which settings are supported and not supported by specific certified devices.
+ Reply to Thread
Results 1 to 16 of 16
-
-
how can I set a bitrate that doesn’t depend on a file size, but depends on the quality… I mean how to set a bitrate that ensures me that I didn’t lose any quality and at the same time that I didn’t set extra bitrate that will increase the output file size without having a better quality
As for the pre-sets, if quality is the main aim, set it to 8 (high up at the quality end of the scale. It is a little slower, but seems to produce better results.Read my blog here.
-
After lots of searching and reading, I conclude the following (please tell me if I’m on the right path)…
1-I should first choose “Home Theater” profile (I think unconstrained profile could cause computability problems)
2-I guess I shouldn’t enable the Encoding presets
3-For the “Rate Control Mode” I know that I should choose single pass because I’m not targeting a specific size but I’m not sure if I should choose “1-pass” or “1-pass quality-based” although I think I should choose “1-pass quality-based” because when I choose it the “Target Quantizer” will be activated and it determines how much detail to throw away and I think I should choose 2 because I don’t want to lose any detail. (the “1-base” will activate the bitrate option and I think it’s hard to put a specific bitrate that guarantee me that I didn’t lose any quality and didn’t exceed the file size)
4-In the second tabe (codec) I should choose “balanced (default)” for the Encoding mode
What do you think?
And should I choose auto detect Noise reduction?
I've just done some sample encodes.
My source file is a 90 minute MPEG-1 at 352x288, 2400kbps CBR that was recorded from an analogue terrestrial TV signal with an original All in Wonder Radeon some years ago. The amount of broadcast noise in the unfiltered MPEG-1 source file is such that I would instinctively want to use at least some noise reduction.
Zero noise reduction - -- (CQ=3) 1164MB -- (CQ=4) 933MB
Auto-detect noise red. -- (CQ=3) 1144MB -- (CQ=4) 915MB
Light noise reduction - -- (CQ=3) 964MB --- (CQ=4) 761MB
Normal noise reduction -- (CQ=3) 892MB --- (CQ=4) 704MB
These files contain the VBR video stream only; if I wasn't using the fast preset, the files would be a little smaller.
Whatever the auto-detect noise reduction feature does, it doesn't seem to be choosing an optimum noise reduction level for CQ transcoding. (This is hardly surprising, as a one-pass transcode cannot feed its output back into the pre-processor input.)
My impression of the output is that the blocky, lossy nature of the MPEG-1 source is noticeably magnified by the transcode, so I prefer CQ=3 for this purpose. For a transcode of a Freeview recording (4Mbps MPEG-2, free from white noise), I find CQ=4 perfectly adequate.
I still need to play with the NR settings, because I still don't see what (other than 25% of the file size) I'm losing by turning NR on.
Edit (midnight): I think the auto-detect NR feature is more for use with limited-bit-rate (CBR, multipass ABR) settings. It also seems that the noise filter is throwing away very little other than the source file's MPEG artifacts; and a low-pass filter is just about as crucial for DivX as it is for MP3 audio encoding
++++++++++++++++++++++++++
Edit: seems that I was writing this post after you posted you answer
Change the rate control to Quality, and choose 2 or 3 for high - good quality. This will encode based on quality preservation, rather than pre-defined bitrate.
As for the pre-sets, if quality is the main aim, set it to 8 (high up at the quality end of the scale. It is a little slower, but seems to produce better results.
If I choose 3, or 8, what are the things that will be affected? Would the file size be bigger at 8? Would choosing 8 make the bitrate higher than if choosing 2? If yes does it make it a lot higher?
Sorry but I’m really afraid from these things and I will start converting about 40 GB of videos according to what u’l tell me. -
it’s obvious that the video size should be 352*240 like the original
-
The Speed vs Quality presets are to do with how much analysis is done o the video. The more analysis, the better the quality, but the longer it takes. If you were doing a bitrate based encode it would not affect the file size. If you are doing a quality based encode it might affect the file the size. Hard to say by how much though.
Read my blog here.
-
Originally Posted by guns1inger
note that I'll do the same thing with dozens of videos so would it be ok generally to choose 8 and go?
last question about this... do you know what will happen if I didn't check this option and left inactive?
No, not so obvious. That 352x240 4:3 MPEG-1 video gets resized to 320x240 on playback. Your AVI should be the same, or some similar ratio.
So you mean if I left it without changing the DVD Player will resize it and that I think will affect the picture.
And it would be better to resize it in the converting process.
So what do you think the best way to do this?
1-Not doing anything in the DivX options and changing the dimensions in TMPGEnc 4.0 Xpress settings
You can see it here
2-Changing the size from the DivX settings
If I choose to change it from the DivX setting (which I think would be the way to do it)… I’ll go first to the video tab then what?
Just put the output pixel aspect ratio on NTSC 4:3?
Or activate the custom resize option and put it manually? -
do you know what will happen if I didn't check this option and left inactive?
thats confusing
and I noticed that when I choose preset no. 8, the codec performance will be set at extreme quality
anyway I'll just submit what you said (activate it and choose 8) and THATS IT -
The Certification Profiles enable/disable certain features of the codec that can cause problems with different players. The Home Theater Profile is probably appropriate for your Divx/DVD player.
The Encoding Presets are for people who don't want to learn what all the other settings in the codec are for. If you enable the presets you'll notice that some of the other controls are no longer available (grayed out). The difference in encoding time may be several fold going from the low presets to the high presets. In Constant Quality mode the difference in file size will between a preset of 3 and 8 will be on the order of 5 percent.
Use single pass constant bitrate encoding... never. Well, use it when your playback device doesn't support VBR.
Use multipass VBR encoding when you want a specific file size (like 700 MB to burn onto a CD) and don't care so much about the exact quality.
Use 1-pass Quality Based encoding when you want a specific quality and don't care exactly what the output file size will be. The higher you set this number the smaller the file you will get, and the lower the quality. I will concentrate on this mode for the remainder of this post.
Q=2 will deliver an output almost exactly like the input, even if you examine enlarged still frames. Q=3 will add a little macroblocking if you look at enlarged still frames but you won't notice it at normal playback speeds. This is the best compromise in my opinion. Higher values will result in more and more macroblocks, less and less detail, and smaller and smaller files.
Codec Performance -> Encoding Mode is the control that has the largest effect on encoding speed. The main function this controls is motion search precision. The more motion vectors the codec finds the more a video can be compressed. Going above Balanced rarely delivers much better compression (ie, higher image quality in bitrate modes, or smaller file size in CQ mode). You may typically see a 5 percent reduction in file size (CQ mode) when going from Balanced to Insane. But a several fold increase in conversion time. It's up to you to decide if saving 5 percent on file size is worth the extra time.
Regarding aspect ratios: the Divx codec now supports Display Aspect Ratios (DAR) independent of the frame size or Storage Aspect Ratio (SAR). Your 352x240 source should be displayed at 4:3 even though the frame size is not 4:3 (see your GSpot image).
Whether or not your Divx/DVD player supports Divx DAR is another question. Many players do not support DAR and will display with DAR equal to SAR (square pixels). You can quickly test your player by encoding your 352x240 video with DAR (Output Pixel Ratio in Divx 6.6.1) set to 4:3 then encode again with DAR set to 16:9. If the both files look the same on your player it isn't respecting the DAR. In that's the case you need to resize the frame so that the SAR is equal to the DAR. That is, a 4:3 DAR source should use a 4:3 frame size like 320x240 or 640x480. A 16:9 source should use a 16:9 frame size like 704x400 or 512x288.
Bidirectional Encoding can be problematic on some older players. Adaptive Single Consecutive should be fine on your Divx certified player. In theory B frames can reduce the bitrate by allowing the codec to predict backwards as well as forwards. In reality, B frames really only save bits because they are encoded with less quality (higher quantizers). The idea is that you won't notice if every other frame is of lower quality. In CQ encoding Single Consequtive B frames will make your file smaller -- by single digit percentages.
Do not enable Quarter Pixel Search and Global Motion Compensation. Many set-top players do not like these features.
I usually set the Max Keyframe Interval to 100 rather than the default 300. This makes files easier to seek during playback. In CQ mode the file will turn out a tiny bit larger, maybe 1 percent.
By the way, your player may play your MPG file directly so there may be no reason to convert to Divx AVI. -
l'll post this now ad reply to you when I finish reading your reply, but many thnx from now
I used these settings with the same file
and end up with this result
I don't think it's acceptable that a 588MB mpeg1 file goes up to 769MB avi divx file
I think the acceptable logical size should be around 350 or something! -
Originally Posted by firas_hashim
-
The Certification Profiles enable/disable certain features of the codec that can cause problems with different players. The Home Theater Profile is probably appropriate for your Divx/DVD player.
The Encoding Presets are for people who don't want to learn what all the other settings in the codec are for. If you enable the presets you'll notice that some of the other controls are no longer available (grayed out). The difference in encoding time may be several fold going from the low presets to the high presets. In Constant Quality mode the difference in file size will between a preset of 3 and 8 will be on the order of 5 percent.
I think I should not activate it so the codec performance will be active so I can choose “Balanced (default)” from the codec performance
Use single pass constant bitrate encoding... never. Well, use it when your playback device doesn't support VBR.
Use multipass VBR encoding when you want a specific file size (like 700 MB to burn onto a CD) and don't care so much about the exact quality.
Use 1-pass Quality Based encoding when you want a specific quality and don't care exactly what the output file size will be. The higher you set this number the smaller the file you will get, and the lower the quality. I will concentrate on this mode for the remainder of this post.
Q=2 will deliver an output almost exactly like the input, even if you examine enlarged still frames. Q=3 will add a little macroblocking if you look at enlarged still frames but you won't notice it at normal playback speeds. This is the best compromise in my opinion. Higher values will result in more and more macroblocks, less and less detail, and smaller and smaller files.
I want to set it at 2 so I can make sure that I didn’t lose any quality, but the last experience I mentioned in my previous post (588mb to 769mb) made me afraid even from setting it at 3!
Codec Performance -> Encoding Mode is the control that has the largest effect on encoding speed. The main function this controls is motion search precision. The more motion vectors the codec finds the more a video can be compressed. Going above Balanced rarely delivers much better compression (ie, higher image quality in bitrate modes, or smaller file size in CQ mode). You may typically see a 5 percent reduction in file size (CQ mode) when going from Balanced to Insane. But a several fold increase in conversion time. It's up to you to decide if saving 5 percent on file size is worth the extra time.
But just a small confirmation from you… do you mean that if I choose insane that I will have better quality and smaller file size?
Regarding aspect ratios: the Divx codec now supports Display Aspect Ratios (DAR) independent of the frame size or Storage Aspect Ratio (SAR). Your 352x240 source should be displayed at 4:3 even though the frame size is not 4:3 (see your GSpot image).
Whether or not your Divx/DVD player supports Divx DAR is another question. Many players do not support DAR and will display with DAR equal to SAR (square pixels). You can quickly test your player by encoding your 352x240 video with DAR (Output Pixel Ratio in Divx 6.6.1) set to 4:3 then encode again with DAR set to 16:9. If the both files look the same on your player it isn't respecting the DAR. In that's the case you need to resize the frame so that the SAR is equal to the DAR. That is, a 4:3 DAR source should use a 4:3 frame size like 320x240 or 640x480. A 16:9 source should use a 16:9 frame size like 704x400 or 512x288.
Bidirectional Encoding can be problematic on some older players. Adaptive Single Consecutive should be fine on your Divx certified player. In theory B frames can reduce the bitrate by allowing the codec to predict backwards as well as forwards. In reality, B frames really only save bits because they are encoded with less quality (higher quantizers). The idea is that you won't notice if every other frame is of lower quality. In CQ encoding Single Consequtive B frames will make your file smaller -- by single digit percentages.
Do not enable Quarter Pixel Search and Global Motion Compensation. Many set-top players do not like these features.
I usually set the Max Keyframe Interval to 100 rather than the default 300. This makes files easier to seek during playback. In CQ mode the file will turn out a tiny bit larger, maybe 1 percent.
By the way, your player may play your MPG file directly so there may be no reason to convert to Divx AVI.
I noticed from the player manual that it plays up to a cretin dimension (five hundred and something) and I’m downloading a TV episode (BBC Planet Earth) which is 720 pixel, do you think it might be able to play it or I should resize it?
I’ll try to convert the same file again with a different method and show you the result -
Originally Posted by firas_hashim
Originally Posted by firas_hashim
Note that you can use non-integer Q values too. For example, if you set Q=3.5 half the frames will be encoded at 3 and half at 4 (blindly alternating between the two) to give an average of 3.5.
One warning about using Q<3: the Home Theatre profile limits the maximum bitrate to something like 4800 kbps which should be safe for all Divx certified players. But if you switch to Unconstrained the max bitrate will not be limited. It may get too high for some players.
Originally Posted by firas_hashim
Originally Posted by firas_hashim
Originally Posted by firas_hashim
Originally Posted by firas_hashim
Originally Posted by firas_hashim
Originally Posted by firas_hashim -
[quote="jagabo Keep in mind that you are starting with an overly compressed VCD file so you shouldn't expect to get much more compression without without further sacrificing image quality.[/quote]
could be but divx should have much better compression than mpeg1, so the file size should be smaller at the same quality level.
Between you and me… I thought that it would be smaller even if I set the Q at 1 cuz I’m not adding anything.
anyway here is my new result
and the result was:
459 MB is good, BUT… could this mean that I lost some quality?
Here is my theory …. A 500MB MPEG-1 file = 300MB DivX file (talking about quality) because DivX has better compression level than MPEG-1.
Could it be that 1151 kbps in MPEG-1 = 959 kbps in DivX? If we supposed that I didn’t lose any quality in the last conversion!
If I set the encoding mode at “Insane” level… does it affect the DVD Player? I mean will the DVD Player finds it more difficult to play the Video?
It not and that’s what I think… will the only disadvantage of setting “Insane” level be increasing the conversion time only? And other than that it’s the best way to go?
Will the Auto detect noise reduction be a good thing to do? Specially that it reduces the size?
Thanks for your time guys. -
Here is my theory …. A 500MB MPEG-1 file = 300MB DivX file (talking about quality) because DivX has better compression level than MPEG-1.
There are a couple of flaws in it that you should consider.
1. Actual size is based on bitrate and running time. Nothing else. It has nothing at all to do with the codec being used.
2. Quality is affected by bitrate to some degree. High bitrate may produce no visible difference. Low bitrate will.
3. You are starting with a highly compressed source (VCD) which will be filled with compression artifacts and macro-blocks from the original encoding. This will not encode nicely. If you try to do a quality based encode the file size may well grow because it is trying to preserve all the crap from the first encoding, as well as the image. A fixed bitrate (even VBR) may well reduce the quality because to keep the file size down it will have to recompress all the noise and artifacts a lot.
Insane level is basically very thorough motion analysis of the file. It slows the encoding down a lot, for a small to moderate increase in quality and possibly a small reduction in file size.
Your biggest problem here is the poor quality of your source. It simply makes it very difficult for this type of codec to work efficiently.Read my blog here.
-
Originally Posted by firas_hashim
But a VCD quality MPG file has been very highly compressed. This results not only a loss of the original detail but the creation of details (artifacts) that weren't in the original video: macroblocks, DCT ringing, posterization. Selecting a low quantizer in Divx (or an MPEG encoder) will cause it to use a high bitrate in order to retain all those artifacts (it doesn't know what's detail from the original video and what's artifacts).
Originally Posted by firas_hashim
Originally Posted by firas_hashim
Originally Posted by firas_hashim
Originally Posted by firas_hashim
Originally Posted by firas_hashim -
Thanks a lot all for your time and effort, I’m feeling a lot in control of this stuff now.
I searched about that Lanczos4 methods for downsizing that jagabo mentioned and downloaded AviSynth 2.5, but I really don’t want to go that deep right now, and if I wanted I don’t think me and scripting will be a good idea!
I know that the best way to understand this field is by converting and testing all the options and settings but I just needed some information first so I can know what’s happening, I have a lot of useful information now and I’ll start my journey.
Similar Threads
-
re-configuring virtualdub default compressor codec to another ?
By vhelp in forum Newbie / General discussionsReplies: 9Last Post: 5th Aug 2012, 12:22 -
AVI with DIVx or XVid codec?
By Sierraguy in forum Newbie / General discussionsReplies: 9Last Post: 8th Feb 2011, 10:47 -
Converting Ripped Blu-Ray VC-1 Codec to MPG or AVI
By MisterZJ in forum Video ConversionReplies: 12Last Post: 24th Aug 2009, 13:12 -
Best settings to use when converting AVI to DVD for 624x464 files?
By Cobra281 in forum Newbie / General discussionsReplies: 5Last Post: 26th Sep 2008, 16:45 -
avi to dvd converting settings for winavi convertor
By soft in forum DVD RippingReplies: 6Last Post: 23rd Jul 2007, 23:45