View previous topic :: View next topic |
Author |
Message |
R!tman Veteran
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Thu Nov 25, 2004 11:59 am Post subject: Not matching file size when encoding in XVID |
|
|
Hi all,
when I rip a DVD and encode it in xvid I have some problems.
Lets say I want a normal movie (1.5-2h) to be on 1 CD, no problem. The movie is almost exactly 700MB.
But when I want it on 2CDs or bigger, the movie is not 1400MB.
The last movie I did was about 1h45mins and I wanted it to be 2GB (~1/2 DVD). I have 2 ogg sound streams with 160kBit/s each. But altogether the movie is only 1.1GB.
Why? How can I change that?
Everything works normal with divx, but I would rather use xvid.
I use dvd::rip and have the movie on max quality (quel, max movement...).
Last edited by R!tman on Sun Nov 28, 2004 12:53 pm; edited 2 times in total |
|
Back to top |
|
|
R!tman Veteran
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Thu Nov 25, 2004 11:15 pm Post subject: |
|
|
I made a small test with 1000 frames.
Bitrate in kbit/s - filesize im MB
350 - 3.3
500 - 4.0
750 - 5.2
1000 - 6.4
1250 - 6.5
1500 - 6.5
2000 - 6.5
Seems like the size is not influenced by the bitrate since a certain quality is achieved. I think divx shows the same behavior but I have not fully tested it yet.
But it still looks quite odd... |
|
Back to top |
|
|
SZwarts l33t
Joined: 13 Oct 2003 Posts: 629 Location: Sydney, NSW, Australia
|
Posted: Thu Nov 25, 2004 11:27 pm Post subject: |
|
|
If you really want to match a file size you have to do a two pass I think. After that you should be able to target a certain match pretty acurately.
If your doing only a one pass, this is very hard because the bitrate is variable and the bitrate you give is only some sort of indication, the codec is variating it all the time depending on how complex the scenes are. _________________ only when it is dark enough, can you see the stars |
|
Back to top |
|
|
R!tman Veteran
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Fri Nov 26, 2004 12:32 am Post subject: |
|
|
SZwarts wrote: | If you really want to match a file size you have to do a two pass I think |
I AM doing two passes. Sorry, I forgot to mention that. |
|
Back to top |
|
|
SZwarts l33t
Joined: 13 Oct 2003 Posts: 629 Location: Sydney, NSW, Australia
|
Posted: Fri Nov 26, 2004 5:16 am Post subject: |
|
|
Well in that case I suppose it is your program, because in mplayer it works fine. I don't have a DVD here so I tested it on a smalle file, which I converted to xvid
Code: | mencoder -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=X:vpass=1 -oac copy input.avi -o output.avi;mencoder -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=X:vpass=2 -oac copy input.avi -o output.avi |
(according to the mplayer site vodec mpeg4 is xvid compatiable)
and the results are:
Code: |
8237116 350.avi
8784984 500.avi
10678072 750.avi
13570764 1000.avi
16478868 1250.avi
19423708 1500.avi
25163734 2000.avi
|
And I still have an increase in filesize after 1250 _________________ only when it is dark enough, can you see the stars |
|
Back to top |
|
|
R!tman Veteran
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Fri Nov 26, 2004 2:54 pm Post subject: |
|
|
Ok, strange things happen...
I can reproduce your stuff. But this is NOT xvid. ie, lavc doesn't give me qpel.
But the strange things are these:
Code: | mencoder -o /scratch/test/test.avi -nosound -ovc xvid -xvidencopts bitrate=10000 /scratch/test/test.vob |
This works. Changing the bitrate works and gives larger or smaller files. After doing what is in the code line, the file is considerably big, lets say xMB. No wonder with bitrate 10000.
But when I do the following directly after
Code: | mencoder -o /scratch/test/test.avi -nosound -ovc xvid -xvidencopts bitrate=100:pass=1 /scratch/test/test.vob |
and also pass=2, the file is still about size xMB.
So, although the bitrate is 100x smaller, it get the same filesize; and quality.
I have to do another encode without the "pass=n" argument to set another bitrate, which then is again used for 2pass encodings.
What the hell is wrong?
PS: This happens with mencoder and transcode. I already tried to remerge xvid. |
|
Back to top |
|
|
R!tman Veteran
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
|
Back to top |
|
|
R!tman Veteran
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Sun Nov 28, 2004 12:55 pm Post subject: |
|
|
Well, it _seemed_ to have fixed it....
xvid-twopass.stats looks fine without chattr'ing it. |
|
Back to top |
|
|
|