View Full Version : Unfiltered/filtered video to 1st/2nd pass question...
Poutnik
10th December 2004, 12:21
Hi,
because of space, I am forced to capture TV broadcast into MJPEG (Morgan) with suboptimal setting. There is no space left for filter preprocessing to intermediate lossless codec.
Would it be far from optimal 2pass encoding, if I would pass to 1st pass original captured video only ( to avoid doing it twice ), then filtered by avisynth I would pass filtered one to XviD 2nd pass?
Id undersizing a danger, or Xvid will evenly resize frames to use extra space because of filtering ?
Ark
10th December 2004, 12:28
If you do a 2nd pass based on filtered version of the video used for 1st pass you'll get horrible things, because the encoder thinks that the video is the same as before (and all the data in the .stats file from 1st pass is based on the "non-filtered" video).
Your only choice is to do a normal 2-pass encoding feeding the filtered version for both passes.
And XviD cannot "resize" video frames dinamically or according to a certain compressibility ratio (I've heard times ago of a feature like that but not for XviD).
Manao
10th December 2004, 13:24
I disagree with Ark : It depends of the strength of the filtering you want to make. If it doesn't change too much ( not more than 10 % I'd say ) the compressibility of the movie, it won't matter.
The 2 passes scheme in XviD allows for imprecisions in the first pass. If it didn't, it wouldn't be able to do a fast first pass ( which disables settings that change the compressibility ). The only things that must not change are the frame temporal alignment & frame rate. ( so no trim / bob / convertfps in your script ).
Poutnik
10th December 2004, 13:38
Manao, I like your answer. Maybe I did not note clearly Xvid settings was intended to be the same, of course, so does video but directly passed in first pass, and denoised by 2nd pass...
I remember encodind "Fellowship of the Ring" 384*288 PAL 11+19 hours.
Uff.
lark
10th December 2004, 13:55
Originally posted by Poutnik
I remember encodind "Fellowship of the Ring" 384*288 PAL 11+19 hours.
what kind of PC are you using?
or is it the filtering....?
regards
t :)
Poutnik
10th December 2004, 15:01
Celeron 600/66 (MMX,SSE),198MB RAM, 5 GB free disk space :-(
But filtering was done by virtualDub in that time, not by AviSynth.
Poutnik
10th December 2004, 15:05
Originally posted by Manao
The 2 passes scheme in XviD allows for imprecisions in the first pass. If it didn't, it wouldn't be able to do a fast first pass ( which disables settings that change the compressibility ). The only things that must not change are the frame temporal alignment & frame rate. ( so no trim / bob / convertfps in your script ). [/B]
In AviSynth forums Denoisers/smoothers usually take away 5-15 % of size. According to that fact, should I by some way change default settings of 2nd pass ? Not familiar with them, but there are 3 items about 5% and owerflow ( Koepi 1.0.2 final )
Didée
10th December 2004, 15:33
Originally posted by Poutnik
I remember encodind "Fellowship of the Ring" 384*288 PAL 11+19 hours.
Uff.
Well, that's not that long, really ... I remember encoding "Fellowship" in 960*528 @ 24fps FILM took me ~1 month (minimal denoised, 4*SSXsharpen'ed, chapter-wise 1-pass encoding with quantizer-distribution completely done manually. Recoding the 5.1 AC3 to 24fps was big fun at that time :devil: )
If you plan doing a "1st-pass/notfiltered // 2nd-pass/filtered" encoding, you should either:
- for 2nd-pass, set "overflow strength/improvement/degradation" to "20/20/20"
or
- replace the 2nd-pass filtering with another, faster filtering for the 1st-pass that delivers similar bitrate. E.g.: encode a sequence with your 2nd-pass filtering, at a fixed quantizer. Encode the sequence again, but replace the filtering with "blur(x)", where 0.0<x<1.5. Find a value for x that gives the same size than the first test sequence, and then use that for the 1st-pass.
If you're only doing light filtering, the 1st method is sufficient. For stronger filtering, you're probably better off with the 2nd method. It's not a recommended method, but still better than letting the bitrate control mechanism go freaky.
Personally, I would also go into "advanced/quantizers", and change all "minimum quantizers" from "1" to "2".
Poutnik
10th December 2004, 17:03
Thanks, DiDée, for advices. I will probably try both. Espacially those with fake fast bluring with the same video size is interesting....
Ark
10th December 2004, 17:05
Originally posted by Manao
I disagree with Ark : It depends of the strength of the filtering you want to make. If it doesn't change too much ( not more than 10 % I'd say ) the compressibility of the movie, it won't matter.
The 2 passes scheme in XviD allows for imprecisions in the first pass. If it didn't, it wouldn't be able to do a fast first pass ( which disables settings that change the compressibility ). The only things that must not change are the frame temporal alignment & frame rate. ( so no trim / bob / convertfps in your script ).
Well, i was a bit unclear :p
I meant medium-strong processing, something that do noticeable modifications to the source.
However i don't like the idea of giving at the encoder something that it doesn't espect at 100%... (but it's my thought anyway :))
Poutnik
10th December 2004, 17:10
Originally posted by Didée Well, that's not that long, really ... I remember encoding "Fellowship" in 960*528 @ 24fps FILM took me ~1 month (minimal denoised, 4*SSXsharpen'ed, chapter-wise 1-pass encoding with quantizer-distribution completely done manually. Recoding the 5.1 AC3 to 24fps was big fun at that time )
I think the movie is worthy for that hard work cost. I hope so does your PC :-))
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.