View Single Post
Old 2nd August 2009, 09:27   #3  |  Link
D'zzy
paint it red
 
D'zzy's Avatar
 
Join Date: Jul 2009
Posts: 19
Thanks for your patient explanation, 10L23r.

1. Animeivtc must be great and I will definitely try it later. But this time I'd go step by step so that I'd understand things better.

2. I don't do audio at this stage, but plan to mux the audio with video through mkvmerge. So, no worries I think. (as long as I can keep the video timing intact.)

I followed your advice and used this (fps needs to be added I think):

Code:
__TIVTC_etc.___
function imageimport (clip c, string "filename")
{
frame=imagesource(filename,end=0,fps=c.framerate).converttoyv12()
return frame
}

trim(0,903)++imageimport("904.png")++imageimport("905.png")++imageimport("906.png")++imageimport("907.png")++imageimport("908.png")++imageimport("909.png")++imageimport("910.png")++imageimport("911.png")++trim(912,0)

DegrainMedian()
deen()
LimitedSharpenFaster()
At the first try with VDub, it crashes. But I didn't just give up. I opened up Process Explorer to monitor the total memory usage, the memory is at a high level even when I closed the video in VDub. I have VDub, AvsP and many tabs open in my web browser. I determined to close some tabs and close AvsP too(it takes 100+MB memory...), and the script runs well in VDub. The memory goes up about 500 MB (I put SetMemoryMax(512) at the top so maybe it's just fully 512MB)

Then I thought, imagesplice2("Solution 1.1") SHOULD do the job just the same! why? because imagesource() provides a range, and out of common sense :wink: , I believe it imports image sequence in a similar manner as in the code above. So I tried imagesplice2 again... (also followed by DegrainMedian() deen() and LSF, loaded in VDub)

Guess what?! The memory usage is just the same(about 512) (the memory growing curve may or may not be the same... the final top memory is.)
It even amazes me further: imagesplice("Solution 1.0") works the same. -- The same top memory as NO image replacement at all!

Oops! It fails again! All three solutions! In VDub, that is. If I comment out all image replacement stuff, VDub then plays it.
On the other hand, AvsP can preview it and also play it through external player (windows media player 6.4.9.1126).
What is wrong with VDub? I just quit VDub then restarted VDub, it played well(replace frame in the script with 10L23r's method). After a while, I tried again, it was fine at first, then I seek to a new frame, it told me about the memory leak again... After another while, I loaded the script using imagesplice2, it plays well again! Very, very strange

Anyway... basically I believe imagesplice2("%03d.png",904,8) to be equal to the slightly long chain in the code above. My PC has a memory of 2GB, so I don't doubt its capability. AvsP's preview and play function works fine in both cases. Maybe I should just leave VDub alone? Or, I should use a different method for frame replacing? :?

What I'm concerned about is, since I'm gonna feed x264.exe with this avs script, will it crash as VDub do?

Oops! It happens for the first time with AvsP (when seeking):
Quote:
Traceback (most recent call last):
File "AvsP.pyo", line 6291, in OnSliderReleased
File "AvsP.pyo", line 8925, in ShowVideoFrame
File "AvsP.pyo", line 9467, in PaintAVIFrame
File "pyavs.pyo", line 322, in DrawFrame
File "pyavs.pyo", line 301, in _GetFrame
File "avisynth.pyo", line 277, in GetFrame
WindowsError: exception: access violation reading 0x027ED004
Although it's just once... and recovered soon with no restart... :?

3. AvsP is a nice Editor. I have been using it for several days, but never tried the preview/play function because of VDub. Now I'm using it!

About the color again(in AvsP):
a.. When previewing in AvsP, the picture color looks right to me.
b.. When playing, the color is off (darker) just like I decribed in my first post. The external player is windows media player 6.4.9.1126.
Quesion is: which is the same color as finally encoded?

4. >> Confusion about framerate <<

By adding info() to the end of the script, it shows(never changes):
Frames Per Second: 24.1665 (32510000/1345253)
But I'm using TIVTC in VFR mode, the resulting video should be VFR. How does avisynth treat VFR material?
For example, if I do the frame replacing with imagesplice2 for frames 904-911, would that "c.framerate" be accurate? I mean, is it the framerate read from frame 903, or is it from the average (like with info()) or something? Or they are the same for avisynth?
In the timecodes file generated by tdecimate, there're two values of framerate, 23.976024 and occasional 17.982018. How come info() tells me it's 24.1665?
Since I'm gonna add dedup to the script too, this has to be made clear in case I'd mess it all up.

5. Cropping.
The source has 2 black lines on the left/right side so I have to crop them. I did it in DGIndex so the .d2v file contains "Clipping=8,8,0,0". This should be OK?

Has anybody played with the samples already? Gimme some news!

Last edited by D'zzy; 2nd August 2009 at 13:30.
D'zzy is offline   Reply With Quote