Log in

View Full Version : Blocks problem with xvid/autogk


Floruro
15th January 2005, 10:05
Sorry i am pretty noob with encoding, but im trying to encode some of my dvds, but recently some of them have turned out these little blocks. Everything seems clear, but on some scenechanges these blocks start appearing. This does not happen using e.g. dr.divx and encoding divx, but recently has with autogk. I have encoded many xvid with no problems before with autogk. I have have also tried many different versions of xvid to fix the problem with no success. Heres the log from the encoding(xvid 1.03):
[2005/01/02 13:51:24] AutoGK 1.84b
[2005/01/02 13:51:24] OS: WinXP (5.1.2600).2
[2005/01/02 13:51:24] Job started.
[2005/01/02 13:51:24] Input file: VTS_01_1.VOB
[2005/01/02 13:51:24] Output file: E:\Extract\ClockworkOrange\VTS_01_1.avi
[2005/01/02 13:51:24] Audio: Unknown Audio
[2005/01/02 13:51:24] Subtitles: none
[2005/01/02 13:51:24] Codec: XviD
[2005/01/02 13:51:24] Target size: 2040Mb
[2005/01/02 13:51:24] Custom audio settings: AC3
[2005/01/02 13:51:24] Started encoding.
[2005/01/02 13:51:24] Demuxing and indexing.
[2005/01/02 13:54:42] Processing file: E:\Extract\ClockworkOrange\VTS_01_1.VOB
[2005/01/02 13:54:42] Processing file: E:\Extract\ClockworkOrange\VTS_01_2.VOB
[2005/01/02 13:54:42] Processing file: E:\Extract\ClockworkOrange\VTS_01_3.VOB
[2005/01/02 13:54:42] Processing file: E:\Extract\ClockworkOrange\VTS_01_4.VOB
[2005/01/02 13:54:42] Processing file: E:\Extract\ClockworkOrange\VTS_01_5.VOB
[2005/01/02 13:54:42] Processing file: E:\Extract\ClockworkOrange\VTS_01_6.VOB
[2005/01/02 13:54:42] Processing file: E:\Extract\ClockworkOrange\VTS_01_7.VOB
[2005/01/02 13:54:42] Source aspect ratio: 4:3
[2005/01/02 13:54:42] Source resolution: 720x576
[2005/01/02 13:54:42] Found PAL source.
[2005/01/02 13:54:42] Analyzing source.
[2005/01/02 13:59:48] Source has percentage of interlacing in motion areas: 0.61
[2005/01/02 13:59:48] Source is considered to be progressive.
[2005/01/02 13:59:48] Found 198541 frames
[2005/01/02 13:59:48] Audio size: 378,318,336 bytes (360.79 Mb)
[2005/01/02 13:59:48] Overhead: 1,323,648 bytes (1.26 Mb)
[2005/01/02 13:59:48] Video size: 1,759,453,056 bytes (1677.95 Mb)
[2005/01/02 13:59:48] Running compressibility test.
[2005/01/02 13:59:48] Writing the following script to E:\Extract\ClockworkOrange\agk_tmp\VTS_01_1_comptest.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrain.dll")

movie = mpeg2source("E:\Extract\ClockworkOrange\agk_tmp\VTS_01_1.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0)
fixed_aspect = 1.06666666666667
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = input_par > 1.4 ? input_par : (4.0/3.0)
out_width = 704
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
SelectRangeEvery(300,15)
===========================================================
[2005/01/02 14:06:49] Duration was: 7 minutes 1 second.
[2005/01/02 14:06:49] Speed was: 23.57 fps.
[2005/01/02 14:06:49] Compressibility percentage is: 73.01
[2005/01/02 14:06:49] Chosen resolution is: 704x416 ( AR: 1.69 )
[2005/01/02 14:06:49] Predicted comptest value is: 73.01
[2005/01/02 14:06:49] Running first pass.
[2005/01/02 14:06:49] Writing the following script to E:\Extract\ClockworkOrange\agk_tmp\VTS_01_1_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrain.dll")

movie = mpeg2source("E:\Extract\ClockworkOrange\agk_tmp\VTS_01_1.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0)
fixed_aspect = 1.06666666666667
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = input_par > 1.4 ? input_par : (4.0/3.0)
out_width = 704
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
===========================================================
[2005/01/02 15:20:02] Duration was: 1 hour, 13 minutes 12 seconds
[2005/01/02 15:20:02] Speed was: 45.20 fps.
[2005/01/02 15:20:02] Expected quality of first pass size: 73.70
[2005/01/02 15:20:02] Running second pass.
[2005/01/02 17:24:46] Duration was: 2 hours 4 minutes 43 seconds
[2005/01/02 17:24:46] Speed was: 26.53 fps.
[2005/01/02 17:24:46] Job finished.


Heres a snapshot of what the blocks look like on scenechanges.
Thank you if you can help and hope i am not asking idiotic questions.
Edit:Pics at bottom

woah!
15th January 2005, 10:23
i too have this problem aswell. only started recently,my old xvid encodes are ok but recently i got a rjtech divx/xvid player (old xvid encodes show perfect) and it shows this problem real bad with this blocking recently. same encode using autogk with divx is fine. i started to use divx instead as i couldnt find the cause. i would show a log but i havent saved any as it all pi**ed me off when i found out and deleted everything heh.

i will do one tonight in xvid to show the difference aswell.

len0x
15th January 2005, 18:14
Are you sure its not decoder/player problem? Try opening AVI in VdubMod and see if broken frames are present there. Try uninstalling and then resintalling XviD. Make sure XviD is not decoded by DivX or any other filter (use can use GSpot to examine what is used for decoding).

Floruro
15th January 2005, 19:39
Thx lenox for the reply.
I have done every combination of installing reinstalling divx, xvid etc.
I have also tried many different players (e.g. mediaplayer classic, powerdvd6 etc), with same result, and e.g. only had xvid installed and played back etc. I have also tried the movies on other machines with same result.
The strange thing is that i encoded Akira (anime) with the same setup, and it had no problems. All non anime movies this happens with latest combinations of autogk and xvid. I reencoded with autogk using divx as encoder, and had none of these problems (squares at some of the shifts in the scenes) that i had with xvid. Can this be an autogk and xvid problem or only xvid maybe?
Thank you again.

len0x
15th January 2005, 20:18
Which version of XviD are you using?

Floruro
15th January 2005, 22:08
1.03, both nicks, koepis and normal i have tried.
Thx

len0x
16th January 2005, 13:45
Just an idea - can you try encoding with 1.0.2?

Floruro
17th January 2005, 00:20
Yes ill make one encode when i go to sleep tonight.
I saw Koepi 1.10 beta1 got released, so ill try that one tomorrow after testing with 1.02.
Cheers

Floruro
17th January 2005, 20:58
I reencoded with xvid 1.02, and exact same problem. I also used Autogk 1.86beta now. The blocks dont only come in scenechanges, they also come when there is sudden movement in a movie, e.g. if people are standing still and they suddenly all start jumping, there will be blocks the instant they start moving, and will gradually go away a little. Most of the time the blocks arent there. Its not normal blocks that are from e.g. low quality encoding. The blocks are all the same size pretty much.
Heres the log and another pic.
[2005/01/17 18:12:17] AutoGK 1.86b
[2005/01/17 18:12:17] OS: WinXP (5.1.2600).2
[2005/01/17 18:12:17] Job started.
[2005/01/17 18:12:17] Input file: VTS_01_1.VOB
[2005/01/17 18:12:17] Output file: E:\Extract\AClockworkOrange\VIDEO_TS\VTS_01_1.avi
[2005/01/17 18:12:17] Audio: Audio Stream 0
[2005/01/17 18:12:17] Subtitles: none
[2005/01/17 18:12:17] Codec: XviD
[2005/01/17 18:12:17] Target size: 2000Mb
[2005/01/17 18:12:17] Custom audio settings: AC3
[2005/01/17 18:12:17] Started encoding.
[2005/01/17 18:12:17] Demuxing and indexing.
[2005/01/17 18:14:02] Processing file: E:\Extract\AClockworkOrange\VIDEO_TS\VTS_01_1.VOB
[2005/01/17 18:14:02] Processing file: E:\Extract\AClockworkOrange\VIDEO_TS\VTS_01_2.VOB
[2005/01/17 18:14:02] Processing file: E:\Extract\AClockworkOrange\VIDEO_TS\VTS_01_3.VOB
[2005/01/17 18:14:02] Processing file: E:\Extract\AClockworkOrange\VIDEO_TS\VTS_01_4.VOB
[2005/01/17 18:14:02] Source aspect ratio: 16:9
[2005/01/17 18:14:02] Source resolution: 720x576
[2005/01/17 18:14:02] Found PAL source.
[2005/01/17 18:14:02] Analyzing source.
[2005/01/17 18:18:39] Source has percentage of interlacing in motion areas: 0.00
[2005/01/17 18:18:39] Source is considered to be progressive.
[2005/01/17 18:18:39] Found 198520 frames
[2005/01/17 18:18:39] Audio size: 189,158,400 bytes (180.40 Mb)
[2005/01/17 18:18:39] Overhead: 1,323,520 bytes (1.26 Mb)
[2005/01/17 18:18:39] Video size: 1,906,670,080 bytes (1818.34 Mb)
[2005/01/17 18:18:39] Running compressibility test.
[2005/01/17 18:18:39] Writing the following script to E:\Extract\AClockworkOrange\VIDEO_TS\agk_tmp\VTS_01_1_comptest.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrain.dll")

movie = mpeg2source("E:\Extract\AClockworkOrange\VIDEO_TS\agk_tmp\VTS_01_1.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.42222222222222
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = input_par > 1.4 ? input_par : (4.0/3.0)
out_width = 704
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
SelectRangeEvery(300,15)
===========================================================
[2005/01/17 18:24:59] Duration was: 6 minutes 20 seconds
[2005/01/17 18:24:59] Speed was: 26.12 fps.
[2005/01/17 18:24:59] Compressibility percentage is: 98.06
[2005/01/17 18:24:59] Chosen resolution is: 720x416 ( AR: 1.73 )
[2005/01/17 18:24:59] Predicted comptest value is: 92.20
[2005/01/17 18:24:59] Running first pass.
[2005/01/17 18:24:59] Writing the following script to E:\Extract\AClockworkOrange\VIDEO_TS\agk_tmp\VTS_01_1_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrain.dll")

movie = mpeg2source("E:\Extract\AClockworkOrange\VIDEO_TS\agk_tmp\VTS_01_1.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.42222222222222
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = input_par > 1.4 ? input_par : (4.0/3.0)
out_width = 720
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
===========================================================
[2005/01/17 19:39:30] Duration was: 1 hour, 14 minutes 31 seconds
[2005/01/17 19:39:30] Speed was: 44.40 fps.
[2005/01/17 19:39:31] Expected quality of first pass size: 93.80
[2005/01/17 19:39:31] Running second pass.
[2005/01/17 21:43:46] Duration was: 2 hours 4 minutes 14 seconds
[2005/01/17 21:43:46] Speed was: 26.63 fps.
[2005/01/17 21:43:46] Job finished. Total time: 3 hours 31 minutes 29 seconds
http://img88.exs.cx/img88/2928/snapshot200501172150438lh.jpg

Floruro
17th January 2005, 21:36
Here is what it looks like using Autogk with Divx 5.21, using all same options and encoding to 2 gig file as the broken ones with xvid are.
http://img70.exs.cx/img70/298/co13da.jpg

len0x
17th January 2005, 23:04
Can you cut out small piece of AVI with a broken frame and make it available for us to download?

Floruro
17th January 2005, 23:41
Yes for sure. Ill just have to reencode it again since i deleted the broken one. I will have something for you by tomorrow. Thanks!

dchandler
18th January 2005, 02:07
I too am experiencing the exact same problem. If you need any logs or configuration info for troubleshooting purposes let me know. BTW, thanks Floruro for doing all the work on this issue.

dchandler
18th January 2005, 02:26
I guess my last post was premature.... My problem was solved by using a different player like len0x said. VdubMod and Media Player Classic both displayed my XviD movies perfectly. Now I wondering what went haywire with my Windows Media Player 10!

Floruro
18th January 2005, 12:22
Heya. This is weird since mediaplayer classic displays it corrupt for me. Also the quality is very bad comparing it to divx. Also i dont get this problem with anime movies.
I will have the videoexample up in a little while.

Floruro
18th January 2005, 12:53
BTW can you guys recommend a program i can quickly extract the scene with? I tried with e.g. Pinnacle Studio, but crashes. Probably because of filesize (2gig).

len0x
18th January 2005, 13:03
VDubMod:
- find broken frame
- Shift-Left
- Home
- Shift-Right
- End
- F7 (save)

P.S. Don't forget to set direct stream copy in Video menu.

jggimi
18th January 2005, 13:06
VirtualDubMod. It's installed as part of AGK. To select one second's worth of video from the middle of the content, start at step 1. If bad video can be seen immediately, use steps 1-3, then jump to step 9: Start .... Run .... c:\program files\autogk\vdubmod\virtualdubmod.exe
File .... Open -- select your .avi file
Set direct stream copy so that no encoding is done. Video .... Direct Stream Copy.
Set the selection start point at the first frame. Press the HOME key.
Move slider to a starting keyframe: Hold SHIFT while moving the slider with the mouse.
Back up one frame. Press the left arrow key.
Set selection end point: Press the END key.
Delete the front section of video. Press the DEL key.
Use the right arrow to move right 25 or 30 frames to move forward 1 second.
Set selection start point: Press the HOME key.
Select the very last frame: Press Ctrl - right arrow.
Set selection end point: Press the END key.
Delete the back section of video. Press the DEL key.
File .... Save As and save a new clip.

Floruro
18th January 2005, 13:22
OK thanks guys. Virtualdub shows none of these decoding errors that the other progs do. Virtualdub shows it perfect. I managed to extract a 20 mb file (sound is abit offsync in the extract for some reason), but when I open that extract in e.g. media player classic, it shows all the corruption. If i open it in Virtualdub, no errors.
Here is a 20mb file from my ftp:
ftp://ougadougou:igidigi@floruro.dyndns.ws/clockworkautogkxvidtest.zip

Hope it doesnt go too slow.

len0x
18th January 2005, 13:26
That proves that you DShow decoder is buggered up...

Floruro
18th January 2005, 13:34
Aha. I just find it strange that this problem isnt with divx, since that uses Dshow as well or not? How do i reinstall the Dshow? Is it related to Directx9c? Can this also be related to hardware video decoding with ATI drivers and errors in them?
Thankyou for your help.

jggimi
18th January 2005, 14:09
It could certainly be whatever MPEG-4 decoder is being used for XviD: XviD itself, ffdshow, etc.

Use GSpot (http://www.doom9.org/Soft21/Editing/gspot221.exe), you can determine which decoder is used to render the video.

Floruro
18th January 2005, 14:15
Even though i tried every combination of installing, removing etc of all video codecs in traditional way, nothing helped, but now i see that uninstalling didnt help for one of the combinations.
In nay sense, i found a nice prog now that might give me control over it:
http://www.softella.com/dsfm/index.en.htm

I will report back and say what the problem was.
Thank you so much for your help!

jggimi
18th January 2005, 14:22
I've run your sample .avi through 3 decoders: ffdshow, XviD, and DivX. All 3 looked fine here.

Floruro
18th January 2005, 14:30
I found the problem! I had removed all xvid and divx, but something was still decoding the xvid. It was an Intervideo mpeg decoder (from DVDcopy2)!
When DVDcopy2 is installed, it simply takes over all xvid decoding! With only the intervideo codec installed, i could play back the video with all the corruption.
I now installed xvid only, removed Intervideo mpeg decoder, and now its all playing back perfect.
So thats another lesson learned. Thank you guys for all your help again!

Floruro
19th January 2005, 00:31
I just want to thank you again for your help even though it wasnt in AutoGK. Was just a hard nut to figure out since i usually dont expect a DVDcopy program to hijack all decoding of xvid like that. And i only use AutoGK for encoding, and when divx had no probs, and i(re)installed all divx/xvid so many times i didnt know were to start.
Your help really cornered the problem. Thanks.