Log in

View Full Version : Avisynth last frame encoding


Delta2
12th April 2006, 20:46
hi,

When I build a CCE template ECL the lastest lines are about the last frame of an AVI to encode.

like this:


[file]
name=H:\movies\movie.avi
stream_no=0
encode_first=0
encode_last=120000


Is there a way to force AVISYNTH to encode until the last frame ?

Don't know why, but some movies where cut of ...about 1 minute less...or something like that

thank you

Lil' Jer
13th April 2006, 00:53
First of all avisynth doesn't "encode" anything it just serves the frames to the encoding application. Secondly ,what is your script?

Delta2
16th April 2006, 21:13
thanks for your reply,

I know that AVISYNTH doesn't encode anything, but somehow CCE cuts/truncate the length of the movie

here is the script I use :

DirectShowSource("ongbak_2.avi", fps=25, convertfps=true)
Lanczos4Resize(720,536)
AddBorders(0,20,0,20)
ConvertToyv12()
Tweak(hue=1,sat=0.7,bright=0,cont=0.8)

I must use DirectShowSource because AviSource makes my CCE to crash, this script is generic for all my conversions

I use AVISYNTH version 2.56

thanks

IanB
17th April 2006, 06:47
What format/codec is the file "ongbak_2.avi"? There are a few DirectShow codecs that blatantly lie about the length of the streams. The next 2.57 release (due soon) will have a "framecount" option in D.S.S. to override this problem.

Add an Info() to the end of your script to see how many frames Avisynth is being told there are. Is this how many you were expecting?

Also a general comment on your script. Move the AddBorders to the end of the script. It will be slightly more efficient because the ConvertToYV12 and the Tweak will not have to process the letterbox area.

Delta2
20th April 2006, 11:27
frame size 640x240, 25FPS
lenght 7534
Decompressor XviD MPEG-4 Codec

Audio sampling rate 48000Hz
Compression Fraunhofer IIS MPEG Layer-3 Codec

The problem is that sometimes when I use AVISYNTH's directshowsource with CCE, either or CCE doesn't encode until the end it just quits or there are missing frames.

I changed this line :

DirectShowSource("ongbak_2.avi", fps=25, convertfps=true)

to

DirectShowSource("ongbak_2.avi").Cache

it seems to work, but does DSS really recognize the Cache method ? i.e., is there really a CACH function ? it doens't give me script errors, but I want to know more about the Cach function

IanB
22nd April 2006, 03:49
length 7534Is this how many (frames) you were expecting?

Is your .AVI a standard XVid with MP3 audio? (Yes or No)


What error do you get when you use AviSource()? (Exact text please!) If you have to set Audio=False to make it work try the latest 2.57 alpha it has an explicit fix for the Fraunhoffer MP3 problem.


Cache instances are automatically inserted between all filter instances. You should NEVER add cache to your scripts! (you will just get 3 caches in a row making things slower and wasting resources)

The Cache() verb is only intended for the use of filter authors to be able to specify unusual filter chains inside their pluggin.

Delta2
23rd April 2006, 13:16
Yes, that's the frames I'm expecting

Before I start the encoding with CCE..I change audio to PCM Uncompressed Format with VirtualDub

The error I get with CCE and with AviSource is this :

CCTSPT.EXE Application ERROR

The instruction at "0x0f0792a4" referenced memory at "00f0a3e10". The memory could not be "read"

Click on OK to terminate the program

======

Altough I get my movie, that error is annoying

My script is this :

AviSource("C:\FILIPE1\movie.avi")
Lanczos4Resize(720,428)
ConvertToyv12()
Tweak(hue=1,sat=0.7,bright=0,cont=0.8)
AddBorders(0,74,0,74)

The last lines of TEMPLATE.ECL, looks like :

[file]
name=C:\FILIPE1\script.avs
stream_no=0
encode_first=0
encode_last=7534

===

Therefore I must use DirectShowSource, but even so...some times CCE exits without encode the entire movie...just exits/quit
without any error message

Maybe this is only with my computer

IanB
23rd April 2006, 15:37
@Delta2,

Looks like you have a bug.

1. What version of CCE are you using?

2. What version of XVid are you using?

3. What Windows version are you using?

4. What CPU and memory are you using?

5. Is VirtualDub able to completely and correctly encode your .avs scripts to some arbitary format?

Please try the latest Avisynth 2.5.7 Alpha 3 version.

Check with the CCE forum to see if this is a known CCE problem.

Lastly as CCE is a commercial product, hit their support staff up for some help, this is why you pay for software, so you can get help when it breaks.