View Full Version : Bad Frames Cause Encode to Fail
Angelus
20th July 2003, 23:07
Hi I've been encoding a few movies ("Gangs of NY, Old School") and when I start to encode it always seems to freeze on different frames within the source itself. I've made a post in the avisynth forum about bad frames and they mentioned that it could be due to the bad frame function in the mpeg2dec3.dll that's causing the freeze. Anyways, one person in the forum suggested that I use MPEGDecoder.dll instead but I was wondering how I can do this in Gordian Knot or in VDub manually.
P.S. Do you think its possible that they are just bad rips? I even ripped old school twice and still got the same thing.
Thanks
manono
21st July 2003, 00:52
Hi-
when I start to encode it always seems to freeze on different frames...
You encode the same movie more than once, and it freezes at different places each time? I'd suspect a hardware problem, such as overheating. Are you overclocked, by chance?
Anyway, to do what you asked: GKnot will always have the name Mpeg2Dec3.dll in the .avs. So, go to the GKnot folder, find the Mpeg2Dec3.dll, and rename it as Mpeg2Dec3.bak.dll (in case you want to use it again some time). Then take MpegDecoder.dll and rename it as Mpeg2Dec3.dll, and place it in the GKnot folder.
But I don't really think that Mpeg2Dec3.dll is at fault.
Angelus
21st July 2003, 02:08
I don't think that I'm am overclocked because I managed to encode another movie fine without any problems. It's weird because I tried to cut out the bad frames in the .VOB files using VOBSplit but when I tried to encode with the bad frames cut out, it froze on a different frames...so it could be a bad source. But I'll try to rename it and see if it works.
Angelus
21st July 2003, 02:13
When I rename the mpegdecoder.dll file to mpeg2dec3 and try to encode in GKnot it gives me a:
Avisynth Open Failure:
Script Error: there is no function named "mpeg2source".
I'm guessing that the mpegdecoder doesnt have that function so I wonder what functions it does have...
jggimi
21st July 2003, 02:15
You would know if you were overclocked...unless you have a second-hand computer.
Encoding stresses your CPU, producing heat beyond the amounts produced with most desktop applications. If you are overclocking, set your PC back to normal. If you have insufficient airflow, you might also have problems. There are motherboard monitors and stress tests available. For more information, peruse the PC Hardware forum.
manono
21st July 2003, 11:01
Hi-
I have been investigating this a bit more. It turns out that MpegDecoder.dll is mainly for opening vob and m2v files directly in VDubMod, and not for .d2vs. So, you shouldn't be using it, as near as I can tell. In this Thread (http://forum.doom9.org/showthread.php?s=&threadid=55554&highlight=Mpegdecoder.dll), Nic, the author, says:
Dont use MPEGDecoder.dll, Use MPEG2Dec3 if your going to use AviSynth 2.5+ and YV12.
And Here's (http://forum.doom9.org/showthread.php?s=&threadid=31329&highlight=Mpegdecoder.dll) the big MpegDecoder Thread. I'm not sure why it was recommended to you to use MpegDecoder.dll, but I suggest you dump it and return to using the Mpeg2Dec3.dll that you backed up.
OK, I just found your thread (http://forum.doom9.org/showthread.php?s=&threadid=57665) in the AviSynth Forum. There are some big guns trying to help out, and there may be a problem with Mpeg2Dec3.dll.
If there really is something wrong with that 59th frame, then you can cut it out with something like this (I'm assuming that the first frame is numbered as 0):
Trim1=Trim(0,57)
Trim2=Trim(59,0)
Trim1+Trim2
Add that at the bottom of the .avs. To replace the bad frame with a copy of the previous frame (to maintain audio synch), try this instead:
Freezeframe(57,58,57)
I'll see if I can get Wilbert to help out, as he's way better at this stuff than I. And I'll be backing up the R1 Gangs Of New York in the next couple of days (good movie), and I'll let you know if I have problems.
Wilbert
21st July 2003, 12:24
Avisynth Open Failure:
Script Error: there is no function named "mpeg2source".
LoadPlugin("mpegdecoder.dll") # include correct path
mpegsource("movie.vob") # include correct name + path
Just edit the script manually and replace mpeg2dec3.dll with mpegdecoder.dll.
1) It happens at random places implying that it is _not_ a bad frame problem.
2) Could you post an entire script which causes the crashes?
Angelus
21st July 2003, 19:51
When I edit the script like you said, it encodes the credits (which is only like 58 frames) and then when it starts to encode the movie it fails and says:
Oops VirtualDub has crashed...
A stray breakpoint occurred in module 'divx'...
...while compressing frame 1 from 04220000 to 010b2ac0 (VideoSequenceCompressor.cpp:373)...
...while running thread "Processing" (thread.cpp:90).
And Windows gives a hint that its a Divx hardware crash:
Thank you for submitting an error report. The Online Crash Analysis service has processed and analyzed this report and has determined that this crash event was likely caused by: DivX™ Codec
I'm using the Divx Kauehi Codec... Anyways here's my .avs script:
PLUGINS
SetWorkingDir("C:\Tony\GORDIA~1\")
LoadPlugin("mpegdecoder.dll")
LoadPlugin("decomb.dll")
LoadPlugin("dgbob.dll")
LoadPlugin("Convolution3d.dll")
LoadPlugin("FluxSmooth.dll")
LoadPlugin("TomsMoComp.dll")
LoadPlugin("VSFilter.dll")
LoadPlugin("SimpleResize.dll")
SOURCE
mpegsource("K:\gangs of ny 1\Gangs Of NY CD 1.d2v")
TRIM
trim(0,122009)
IVTC
Telecide(guide=1).Decimate(5)
or use
IVTC(44,11,95)
GreedyHMA(1,0,4,0,0,0,0,0)
DEINTERLACING (1)
FieldDeinterlace()
FieldDeinterlace(blend=false)
TomsMoComp(1,5,1)
CROPPING
crop(14,58,694,360)
DEINTERLACING (2)
SeparateFields().SelectEven()
or maybe
DGBob(order=1,single=true)
DEINTERLACING (3) - special requests
GreedyHMA(1,0,0,0,0,0,0,0)
Telecide()
SeparateFields()
SUBTITLES
VobSub("FileName")
RESIZING
LanczosResize(512,224)
DENOISING: choose one combination (or none)
1) little noise
Temporalsoften(2,3,3,mode=2,scenechange=6)
mergechroma(blur(1.3))
FluxSmooth(5,7)
2) medium noise
Temporalsoften(3,5,5,mode=2,scenechange=10)
Convolution3d("moviehq")
FluxSmooth(7,7)
3) heavy noise
Temporalsoften(4,8,8,mode=2,scenechange=10)
Convolution3d("movielq")
FluxSmooth(10,15)
BORDERS
AddBorders(left,top,right,bottom)
COMPRESSIBILITY CHECK
!!!!Snip Size now has to be 14 for use in GKnot!
SelectRangeEvery(280,14)
FOOL CCEnc
ResampleAudio(44100)
Wilbert
21st July 2003, 19:58
1) Use a normal codec (not an experimental one).
2) I would like to see your script without the "#" lines.
3)
SOURCE
mpegsource("K:\gangs of ny 1\Gangs Of NY CD 1.d2v")
mpegsource wants to have vob files (not the d2v file). See the corresponding documentation.
Angelus
21st July 2003, 21:34
Sorry about that, here's the script:
SetWorkingDir("C:\Tony\GORDIA~1\")
LoadPlugin("mpegdecoder.dll")
mpegsource("K:\gangs of ny 1\VTS_01_1 FIX.VOB + K:\gangs of ny 1\VTS_01_2.VOB + K:\gangs of ny 1\VTS_01_3.VOB + K:\gangs of ny 1\VTS_01_4.VOB + K:\gangs of ny 1\VTS_01_5.VOB")
trim(0,122009)
crop(14,58,694,360)
LanczosResize(512,224)
I tried that with the mpegdecoder.dll and it went thru the credits, created a d2v file but still froze on that frame 59, even though as you can see I used the VOB file that had the bad frame(s) taken out. I used the Divx 5.05 instead of the other codec as well.
Wilbert
21st July 2003, 22:12
Hmm,
To rule out memory problems, you can try lowering your bus speed from 133MHz to 125MHz. But if this would be the problem, you should also have it with other movies.
Does it always happen in the second pass?
What happens if you take only the first (say) 75 frames (using vobsplit), and encode that (using the same script)?
Angelus
21st July 2003, 23:33
I just found something out so I'll explain it and see if it makes sense. I used VOBSplit and took the 1st 132 frames out of the movie (the first problem frame for me was 69). My first time I tried encoding it using the default mpeg2dec3.dll the credits encoded fine (and credits started on frame 110 of 132). Then when the "movie" part tried encoding, it froze on frame 23 and failed.
I ran it a second time, this time having the credits starting at frame 20 with 1 pass-quality based encoding with Divx. This time everything worked fine and encoded completely.
I tried the 1-pass quality based for the "movie" part in the first trial above( "movie" frames 0-109, "credits" from 110-132) and both parts encoded completly, even the movie part which froze the first time.
I dont know if this helps at all but it seems that if I use the 1-pass, quality based option in Divx 5.05 the encoding will work. Is it because it doesn't go thru every frame when its encoding? Thanks!
Angelus
21st July 2003, 23:35
By the way, for the "Movie" part, I was using the Multi-pass, nth pass with 2 passes for the encoding.
buzzby
22nd July 2003, 01:34
This isn't a hitek reply like the other but if it is freezing on different frames have you tryed playing the movie in different software.
Some of my stuff which i know is 100% fine freezes if the cd drives get interupted by somthing else. If your comp is doing lots of other stuff as well, running kazza. Then this might cause you probs as you have disk access which stalls can delay the process.
Have you scanned the movies in VDub with the detect bad frames option. Get it to replace any bad frames with blank ones and you should get better playback.
Also try removing the codec and reinstalling it might help if it is producing bad frames aslo do same with GKnot
Hope this helps
Buzz
Angelus
22nd July 2003, 02:07
I scanned the first VOB file which should contain some bad frames cause it causes VDubMod to freeze but 0 bad frames were found :angry:
I dont usually have anything running while im encoding, so I don't think that would be a problem either. Thanks tho cause I never knew there was that feature in VDub!
Angelus
22nd July 2003, 02:20
I just tried encoding the original d2v file with the Xvid codec rather than Divx and it seemed like it was working...it was up into the thousands of frames without any freezing. So perhaps this should be talked about in the Divx forum instead?
Angelus
23rd July 2003, 02:03
I just had a breakthrough!!! I installed the Divx 5.0.2 codec in place of the 5.0.5 version and the movie encoded smoothly (I didn't finish the encoding yet but it made it past the trouble frames without incident). I set the codec on 2-pass, second pass. So maybe there is something wrong with the newer version of the codec? If so, either I or preferably one of the GKnot developers should mention this. I hope that this makes some sense!
Thanks,
Angelus
Angelus
27th July 2003, 15:26
I tried to do a whole encode and it gave me a virtualdub crash due to the DivX codec :angry: I still are unable to encode gangs of new york, and I really have no clue as to what I can do. I've tried uninstalling the codec, tried different codecs, uninstalled and re-installed GKnot to no avail. Any other possibilities that may help with the encoding?
manono
27th July 2003, 18:01
Hi-
Have you tried to encode outside of GKnot, that is, directly in VDubMod? Try this. Use GKnot for doing your cropping, resizing, .avs generation, and getting the bitrate or filesize (depending if DivX5 or XviD). Then open VDubMod, load the .avs, choose your codec, and fill in your usual settings and run the 2 passes separately. This might help determine if it's a GKnot specific problem, or something else.
Here's a link to some settings to try for XviD:
http://forum.doom9.org/showthread.php?s=&threadid=53136
And have a look at Snowbeach's guide to which they link. I encoded Gangs Of New York with none of the problems you're having. I'm still not convinced that this isn't a hardware/overheating problem, though.
One thing you might try to prove you're not overheating. Take the case cover off of your computer. Then take a table fan and blow it directly onto the CPU while the encoding is going on. I know-it sounds silly. But if you get through the encode, it might give you something to think about.
Angelus
27th July 2003, 19:55
I tried to encode it manually in VDub with the new Divx Manihi Codec and it froze at frame 209 and 211 i think on the 2 times i tried to encode it. When I tried to encode using Xvid, it gave me a "Video compression error: an unknown error occured(may be corrupt data) error code 100."
So i dunno wat else to do, ill try doing that using divx 5.02 and 5.05 and see if it makes a difference.
And do you think that it would cause so much heat if it freezes on the 211th frame? I've encoded entire movies without problems b4 and I don't think my P4 would be overclocking...
manono
28th July 2003, 05:50
OK, if you don't believe it's the heat (something you haven't proven yet), then you can test your CPU with Prime95 (http://www.mersenne.org/freesoft.htm). If you get no errors after running it overnight, then you can test your memory with MemTest86 (http://www.memtest86.com/). My guess is that Prime95 will show errors almost immediately. Just a guess, though.
Angelus
28th July 2003, 17:48
Hi I ran that Prime 95 test for 4 1/2 hours and it came back with no errors or warnings. I'll try that MemTest86 and see, but I don't think my memory is the cause either.
Angelus
15th August 2003, 13:37
I've just encoded "old School" using the Xvid codec. The movies is alright quality, but when the people move in the movie, there's bluriness when they move around their bodies. Anyways, I tried to encode the same movie with Divx 5.05 and again it froze after like the 2200th frame. Divx works fine for me for most movies, but some it just wont encode at all. Has anyone heard anything relating to this?
On another note, I tried running Xvid again to get better quality (it ran for almost 10 1/2 hours!) and when it finished i ended up getting a file of about 100 mb and really no video. The sound plays ok i think but the screen is just a green streak of lines. For my xvid settings i used 2 pass - 1st pass, mpeg for the quant type, 2 for VHQ mode, and 2 for max b frames. I found these settings on a link i found in the xvid forums...but why would i get a messed up file after this? Thanks!
Angelus
15th August 2003, 14:21
I should mention too that I tried encoding another movie, gangs of new york, using dr divx and it too failed. So it def. has to do with Divx encoding on my computer...
jggimi
15th August 2003, 23:00
...For my xvid settings i used 2 pass - 1st pass, mpeg for the quant type, 2 for VHQ mode, and 2 for max b frames. I found these settings on a link i found in the xvid forums...but why would i get a messed up file after this? ...Just a guess: It was only the first pass, and you didn't do a second pass.
Angelus
16th August 2003, 00:07
oops you were right :D I had 2 pass-1st pass for the 2nd pass as well. I'll run it again tonite and it should work now. Thanks!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.