View Full Version : BilinearResize is truncating
raschko
16th February 2007, 00:01
For a while I have been using ffmpeg to render out clips in software I've developed for video.
After running into AVISYNTH I was ecstatic about its NLA capabilities!
Although, when using BilinearResize after importing a clip..the rendering engine stalls (ffmpeg)..
and the compiled video is truncated; missing a few frames at the animations end. (although can still be viewed in media player)
My Question is if it's my error in scripting, or that I should find another rendering engine aside from ffmpeg.
Here is a sample script:
mImage = imagesource("some image url",0,450,29.5)
mImage = animate(mImage,0,450,"Crop",50,0,492,328, 0,0,492,328)
mImage = BicubicResize(mImage,720,480,0,0.75)
return mImage
Thank you.
gzarkadas
16th February 2007, 00:45
What is the width and height of your image? maybe the scrolling you request from Animate() results in actually requesting a varying frame size?
raschko
16th February 2007, 01:05
We are looking at a grand total of 576x409 72dpi .jpg
Truncating since I wind up missing a few seconds of the animation.
Should of posted that in the first message. *bonks head*
gzarkadas
16th February 2007, 01:25
If I understand it right, you mean that you actually supplied less images to ImageSource() than the 451 specified at the script? (because otherwise and since frame size is large enough, the script is correct).
raschko
16th February 2007, 01:40
Well I've just scratched the surface of Avisynth.
So my understanding at the moment was in order to incorporate a singe image do the following:
imagesource("some image",0,450,29.5)
which should make one image last for 450 frames at 29.5 frames a second.
To answer your question the frame is large enough;
So since the script is correct..it seems that it might be a compiler issue.
FFmpeg binary (http://arrozcru.no-ip.org/ffmpeg_builds/)
Pookie
16th February 2007, 09:50
I'll bet Avisynth isn't happy about your 409 pixel height of the source image.
raschko
16th February 2007, 20:30
Could be.
I Have been mixing two source images together with a crossfade (as of late yesterday)..but both are around the same dimensions.
I'll try working with a rather large one and see if any changes occur with synths output.
gzarkadas
16th February 2007, 21:14
Try to use virtualdub as a rendering engine to see if the script output is that you intended. If not, it is something in your script's settings that causes this behaviour. If yes, then it is ffmpeg that doesn't like the script's output.
raschko
17th February 2007, 00:01
Well I ran QuEnc to see any differences, and there seems to be a compatibility issue with ffmpeg.
Mostly the reason for using ffmpeg was a command line app that would export flash video as well as a vob/mpeg2 for dvds.
Also the addition that it runs silently without a task bar button or program window.
Pookie
17th February 2007, 01:45
Try the Celtic_Druid builds .
http://tirnanog.fate.jp/mirror/ffmpeg/
You'll probably need Pthreads for this build
http://sourceware.mirrors.tds.net/pub/sourceware.org/pthreads-win32/dll-latest/lib/pthreadGC2.dll
raschko
17th February 2007, 04:50
Try the Celtic_Druid builds .
http://tirnanog.fate.jp/mirror/ffmpeg/
You'll probably need Pthreads for this build
http://sourceware.mirrors.tds.net/pub/sourceware.org/pthreads-win32/dll-latest/lib/pthreadGC2.dll
No luck.
but quenc seems to be working..would rather not have a gui though.
Will still be looking for alternatives!! *smile*
foxyshadis
17th February 2007, 05:41
Maybe the problem is just because the whole script is in RGB. Try putting a ConvertToYV12() at the end (with a crop to make the width and height even), then ffmpeg might be more understanding.
I assume your script is edited, since it's a syntax error as is, would you be willing to post a full version (with paths censored if you must)?
raschko
17th February 2007, 16:35
Yes the script has changed slightly, but why apply another crop if the clip has already been resized to the desired dimensions?
Or am I missing something: the docs are a little aloof, well for me anyway.:stupid:
mFst = ImageSource("***\For forum\0.jpg",0,450,29.97).fadein(90)
mFst = animate(mFst,0,450,"crop",0,350,576,384, 0,0,576,384)
mFst = BicubicResize(mFst,720,480,0,0.75)
mLst = ImageSource("***\For forum\1.jpg",0,450,29.97).fadeout(90)
mLst = animate(mLst,0,450,"crop",0,0,576,384, 0,405,576,384)
mLst = BicubicResize(mLst,720,480,0,0.75)
mFst = dissolve(mFst,mLst,90)
mLst = 0
mFst = ConvertToYV12(mFst,interlaced=true)
#Crop????
return mFst
raschko
24th February 2007, 23:14
HA! Got it working!
The programming interface I am using is director.
and as such there is an extension to run command line applications.
This xtra is truncating the result somewhere during the render process. (after perusing the returned values)
So have switch to running a bat file..and everything seems to be in order.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.