Hi.
I am trying to convert a video with VirtualDub and the Xvid codec. I would like the file size to be 700 MB so that it will fit in 1 CD. In the Xvid Configuration, in Bitrate Calculator, it has 4 suggested sizes, in kbytes: 665600, 716800, 1331200, 1433600. As I understand, they correspond to 650 MB, 700 MB, 1300 MB and 1400 MB. I choose the second one and fill in all the other details like video length and audio bitrate.
Unfortunately, when the conversion if finished, I am getting a file that is 704 MB which is too big to fit in a single CD. How can I achieve a more precise file size? I know that it's possible because I have experimented a bit with FairUse Wizard and it very accurately produces a file of 700 MB or less, usually 699 MB.
Does anybody know? Thanks in advance.
+ Reply to Thread
Results 1 to 30 of 58
-
-
Do the math yourself, and choose a slightly-lower target bitrate, problem solved.
Besides: the year is 2014, DVD-Rs are as cheap as CD-Rs, so why on Earth one would need to create "1-CD encodes" is beyond me -
That was not helpful. And I think it was a bit patronising.
Do the math yourself, and choose a slightly-lower target bitrate, problem solved.
Besides: the year is 2014, DVD-Rs are as cheap as CD-Rs, so why on Earth one would need to create "1-CD encodes" is beyond me -
Is it always oversized? It might come down to the version of Xvid you're using and/or whether you're using an Xvid profile. Some profiles (ie home theatre) limit the bitrate for compatibility which I think can mess with the ability to hit an exact bitrate a little. I recall there was a version of Xvid years ago that produced oversized/undersized files if profiles were used, but more than just 4MB, they'd often be way over/under sized. Even so, any bitrate limiting might effect the over-all bitrate calculations a little.
You could try opening the oversized AVI with VirtualDub and changing the audio interleaving (Audio/Interleaving menu). It defaults to "1". I don't think changing it makes a difference if the audio is variable bitrate but if it's constant bitrate increasing it will reduce the file size a little. Increasing it to "2" should save you a couple of MBs.... or increase it a little more. It shouldn't effect playback and might let you reduce the AVI's size enough without having to re-encode the whole thing again. It just reduces the over-head a bit (use direct stream copy for the video compression when resaving the AVI). AutoGK uses "2 frames" for interleaving and I never had a problem playing the AVIs it created.
Personally I'd just aim for 695MB and then if the output is oversized a little it shouldn't matter. -
(video bitrate - audio bitrate) * 700 / 704 =
Is it always oversized? It might come down to the version of Xvid you're using and/or whether you're using an Xvid profile.
You could try opening the oversized AVI with VirtualDub and changing the audio interleaving (Audio/Interleaving menu).
Personally I'd just aim for 695MB and then if the output is oversized a little it shouldn't matter.
I was thinking that maybe this oversizing is due to the AVI overheads, which I am not 100% sure how VirtualDub creates. In Xvid you can choose container format AVI-Legacy or AVI-OpenDML. I first tried telling Xvid it was AVI-OpenDML and got the 704 MB size, then I tried telling Xvid it was AVI-Legacy and the file was still slightly oversized, at 702 MB.
I'd like to learn how to do it perfectly, but yeah, if I can't I might just do what you suggested and go for 695 MB.Last edited by lagartixa; 2nd Nov 2014 at 14:13.
-
-
Yeah, seems like most of the CDs that I used to burn back in the day were 704MB.
According to the wiki page, for 80 minute CDs, the capacity is 737 MB (703 MiB).
A CD-ROM can easily store the entirety of a paper encyclopedia's words and images, plus audio & video clips
CD-ROM capacities are normally expressed with binary prefixes, subtracting the space used for error correction data. A standard 120 mm, 700 MB CD-ROM can actually hold about 737 MB (703 MiB) of data with error correction (or 847 MB total). In comparison, a single-layer DVD-ROM can hold 4.7 GB of error-protected data, more than 6 CD-ROMs.
Capacities of Compact Disc types (90 and 99 minute discs are not standard)
Code:Capacity[edit] Type Sectors Data max. size Audio max. size Time (MB) Approx.(MiB) (MB) (min) 8 cm 094,500 193.536 184.570 222.264 21 283,500 580.608 553.711 666.792 63 650 MB 333,000 681.984 650.391 783.216 74 700 MB 360,000 737.280 703.125 846.720 80 800 MB 405,000 829.440 791.016 952.560 90 900 MB 445,500 912.384 870.117 1,047.816 99 Note: megabyte (MB) and minute (min) values are exact; MiB values are approximate.
Last edited by DarrellS; 2nd Nov 2014 at 23:04.
-
Lagartixa, did you use one-pass or two-pass encoding?
Also, it is posible that audio is a bit oversized, bitrate calculator is wrong or bug in Xvid rate-control algorithm. -
Yeah, seems like most of the CDs that I used to burn back in the day were 704MB.
According to the wiki page, for 80 minute CDs, the capacity is 737 MB (703 MiB). -
Lagartixa, did you use one-pass or two-pass encoding?
Also, it is posible that audio is a bit oversized, bitrate calculator is wrong or bug in Xvid rate-control algorithm. -
Xvid's bitrate control is not that great, depending on the version AND on the complexity of the source video itself.
You could also remux with AVI Mux GUI, and check whether the container overhead gets reduced.
I am trying to learn how to do the calculation generally, not just specifically for this one time.
you could have used it for Googling elsewhere --- OR for re-learning how to solve elementary arithmetic problems
This is not tensor calculus, definitely. -
You appear to be pedantic now to the point of annoyance and fail to spot simple arithmetic.
By your own comment above, that '704' file should burn despite what the calculator on imgburn tells you and what other have told you in this thread.
For the sake of a few 'pence' why don't you just actually try to burn it ? -
I was not being pedantic, I was simply making conversation, like he was. As has been explained, the amount of data that fits a CD is irrelevant, the question is about how to estimate the correct bitrate / file size while using VirtualDub and Xvid.
-
Actually it IS relevant because you appear to have created a file that CAN burn to a '700 mb' CD, which is your purpose in this, but you fail to appreciate that or are too stubborn to try it.
If vdub does not do to your 'satisfaction' then why not try another tool such as autogk - also mentioned above - which also has the 700 mb basic setting but probably does thing differently to vdub and I guess what many people who create these 'split to fit on a CD' files use. -
The time you have spent in this thread, waiting for a spoonfed answer,
you could have used it for Googling elsewhere --- OR for re-learning how to solve elementary arithmetic problems
This is not tensor calculus, definitely. -
Actually it IS relevant because you appear to have created a file that CAN burn to a '700 mb' CD, which is your purpose in this, but you fail to appreciate that or are too stubborn to try it.
Before I came here to post, I converted the video to a DVD ISO file using DVD Flick, then converted it to an Xvid AVI file using FairUse Wizard, which took many hours, just to see if it could be done. I got a file that was 699 MB. If all I wanted was to fit the video into a CD I would have done that already.
To spell it out, in case my English is not good enough for you: I don't want to know how to burn a 704 MB file into a CD, I want to know how to calculate the bitrate or video size to obtain a file that is precisely 700 MB or less, using VirtualDub and the Xvid codec. -
-
Which is NOT how people have interpreted your OP where you wrote
"Unfortunately, when the conversion if finished, I am getting a file that is 704 MB which is too big to fit in a single CD."
So if this is not asking how to.... I am in the wrong topic.
But I outa here now since you do not wish to accept advice. -
Personally I think the problem's likely to be un-solvable. Xvid's bitrate control isn't that terrific and a MB or four over/undersized is probably not too out of the ordinary. I recall when using AutoGK regularly it was pretty good at outputting the requested file size/bitrate but now and then the output would be off by a MB or so. Every so often it'd be off by a bit more, but the only cause I can think of is Xvid. It's not like AutoGK would be getting the calculations correct 90% of the time but not for the other 10%.
You didn't say whether you're using an Xvid profile (one with bitrate restrictions) but if you are it might pay to try again using the default Xvid settings. If the second time it hits the target size exactly but not the first, then it's no doubt Xvid's fault.
Are you using the same version of Xvid FairUse Wizard does? Are you definitely encoding with Xvid when using FairUse Wizard? Have you converted the same video with both VirtualDub and FairUse Wizard to confirm you're getting slightly different file sizes even when specifying the same bitrate for the same video etc? I don't know how many videos you've converted with FairUse Wizard but maybe even though it's achieved the exact output size to date, it doesn't necessarily mean it always will. -
When I was doing this I don't think I remember being more than a MB off from the 700 or 701 MB I requested (since CDs burn up to 703 MB with no problem). I always used the GKnot bitrate calc. I have no idea how good the one included with XviD is but my suspicion is the OP is doing something wrong, even though this isn't exactly rocket science.
-
Personally I think the problem's likely to be un-solvable.
You didn't say whether you're using an Xvid profile (one with bitrate restrictions) but if you are it might pay to try again using the default Xvid settings. If the second time it hits the target size exactly but not the first, then it's no doubt Xvid's fault.
Are you using the same version of Xvid FairUse Wizard does?
Are you definitely encoding with Xvid when using FairUse Wizard?
Have you converted the same video with both VirtualDub and FairUse Wizard to confirm you're getting slightly different file sizes even when specifying the same bitrate for the same video etc?
I don't know how many videos you've converted with FairUse Wizard but maybe even though it's achieved the exact output size to date, it doesn't necessarily mean it always will.
Anyway, I think that the problem is not in any of these. Whose fault is it? Is it VirtualDub's fault? Is it Xvid's fault? Is it my fault? I believe it is not my fault because I have been very careful to check everything was chosen correctly. I also don't think it is VirtualDub alone, or Xvid alone either. I think probably it's a combination, I think the culprit is the AVI overhead, Xvid estimates the container overhead will be something but VirtualDub creates a container with different overhead, slightly higher as usually I get oversized files. As FairUse Wizard does everything itself, it knows how much the precise overhead it creates will be, hence it can predict a more accurate bitrate. That's my theory. -
"AVI files and common problems"
http://www.virtualdub.org/blog/pivot/entry.php?id=25
By the way... what are OpenDML AVI files?
Earlier, I said that chunks are tagged with a four-byte length. This limits the size of any chunk to ~4GB (4,294,967,295 bytes), and in fact, the practical limit is a lot lower due to compatibility concerns, around 1-2GB. The index also has the same limitation and this limits the size of standard AVI files to 2GB. A group called the OpenDML AVI M-JPEG File Format Subcommittee devised a semi-backwards-compatible way to extend this limit, by appending additional structure to a standard AVI file. The result is that legacy applications still can't read beyond 2GB, but the rest of the data is appended after the standard AVI and pointed to by a new type of two-level index. VirtualDub calls this the AVI2 format; by default it writes standard AVI files until it hits 2GB, at which point it switches to the new format.
http://forum.doom9.org/showthread.php?t=80157
VDubMod can only write Hybrid files and Legacy AVI, but no pure Open-DML.
http://www.alexander-noe.com/video/amg/en_estimate_overhead.html
Some rules on overhead calculation:
Let's first define one unit of overhead:
standard AVI file: 24 bytes
Open-DML without legacy index: 16 bytes
Open-DML with legacy index: 32 bytes within the first RIFF list, then 16 bytes. The size of the first RIFF list was 1 GB till AVI-Mux GUI 1.16.2, and is adjustable beginning with version 1.16.3
According to the first two references, VirtualDub "by default it writes standard AVI files until it hits 2GB, at which point it switches to the new format" and VirtualDubMod "can only write Hybrid files and Legacy AVI, but no pure Open-DML". And as you can see from the third reference "Open-DML with legacy index" takes 32 bytes while "Open-DML without legacy index" takes only 16 bytes, but Xvid does not have two options for Open-DML only "AVI-OpenDML".Last edited by lagartixa; 4th Nov 2014 at 06:27.
-
Take a look at the Options|Preferences|AVI options in the VirtualDub Menu. I don't really know what it's saying, but I doubt Open-DML is causing a 4MB difference in a file size that small (or at all).
We don't know what FairUse wizard is doing to get so close to 700mb, it's possible it sets the target bitrate low and then adds padding to get the correct size.
Handbrake removed the Target File Size setting from it's GUI because they could never get the bloody thing to work accurately enough, so I know it's not an easy feat to achieve.
However, I do know that MKVMerge is a much more efficient MKV Muxer than some others, even though it adds a rather large void to the beginning of the file for the convenience of Header editors. Unless you want to start looking at these files with Hex editors, I don't think you're going to find an answer to this one. -
I think the solution will be this:
On Xvid codec calculator to choose "AVI-Legacy" and in VirtualDub to save the file with "Save old format AVI..." which will force it to use the 16 bytes container overhead and this should produce a more accurate bitrate / file size.
That's what I'll try.