PDA

View Full Version : DivX5 2-pass encoding during reltime capture - possible ?


arminio
8th August 2002, 13:50
Just a thought - is it possible to capture video from TV card (realtime) in 2-pass using DivX5 ?
By this I mean to capture AVI from TV card using "2-pass, first pass" mode and then compressing resulting AVI again with "2-pass, second pass" ?

Anybody tried ?

Maybe this will fix quality and file oversizing problems I have ...

DJ Bobo
8th August 2002, 14:00
It's impossible

Acaila
8th August 2002, 14:32
Although DJ Bobo was entirely correct, considering the nature of your question I believe some more info on the "why" part wouldn't hurt. :)

When you do a 2-pass 1st pass the codec analyzes the video for scene changes, complexity, size etc. This info is stored in a logfile and (by necessity) a dummi avi file is also written. This avi file is completely useless and in fact contains nothing.
The 2-pass 2nd pass takes the original source again and encodes it using the info that the first pass stored in the logfile. This logfile has to be complete, i.e. 1st frame to last frame, which means the 1st pass has to be completed before the 2nd pass can begin.

Since you can only capture once, using 2-pass mode is not possible.

And alternative however is that you capture at 1-pass 100% quality mode. The resulting file you can then encode using 2-pass mode to the exact file you want it to become, you can even use filters to clean it up now. This doesn't not always mean better quality though, as you'll be encoding an already compressed source.

grug2k
8th August 2002, 14:38
Another alternative would be to use a lossless compression codec (such as Huffyuv) before compressing to 2-pass DivX, rather than 100% quality mode.

arminio
8th August 2002, 14:41
Obviosuly it is impossible if first pass produce dummy AVI - I thought that it produce normal AVI or something that might be usefull in 2nd pass but in this case, things won't work.

Also, idea for encoding 1st pass with 100%quality is good in my case because from some reason I can't capture in anything except DivX5 (other codec incl. huffyuv produce messy result with dropped frames and freezings ...) ... but I would be satisfied with realtime DivX encoding if I manage to set bitrate propperly to have desired filesize (in several attempts and 1-pass mode with low bitrate of 600 and video of 60 min. duration produced over 800MB video file :( )

Acaila
8th August 2002, 16:24
In that case you should increase the rate control settings. A normal 1-pass mode isn't very accurate because it can't look ahead like 2-pass mode. Increasing the rate control averaging period gives the codec a longer range to look 'behind' (still not ahead) for bitrate allocation and thus might make it a little better at reaching your filesize.

arminio
8th August 2002, 22:10
Doesn't help :(
I increased from 2000 up to 20000 but filesize is the same ...
Curently, I am trying to encode using AVI_IO capture tool and huffyuv (I noticed litle lipsync but without freeze frame problems ...). I will see will this helps ...

DJ Bobo
8th August 2002, 22:40
Get the PicVideo MJPEG codec, it is very fast and delivers decent quality starting from quality18.

avih
9th August 2002, 04:39
Originally posted by arminio
... but I would be satisfied with realtime DivX encoding if I manage to set bitrate propperly to have desired filesize (in several attempts and 1-pass mode with low bitrate of 600 and video of 60 min. duration produced over 800MB video file :( )

i always capture and encode in real time. very rarely i encode 2 pass after capturing. i use xvid, and i get very accurate file sizes (up to very few MB from what i need) i use nic's bitrate calc, and set the cbr options (last tab) to 100,1000,1000. worth giving it a try imo.

arminio
9th August 2002, 07:21
Well, XVid is pretty unpopular here but if it can do the job well, I will try ... but I prefere DivX more.