PDA

View Full Version : Frame Serving to TMPGEnc using SelectRangeEvery


DobraGolonka
27th June 2004, 16:24
Hi

I have a strange problem using SelectRangeEvery when Frame Serving from an AVISynth script to TMPGEnc, and searching previous posts doesn't resolve my problem.

When opening an AVI file in VirtualDub, and checking File Information, it informs me that it is 25fps and has 73023 frames.

If I then use SelectRangeEvery(clip, 1500, 150) within an AVISynth script, and again open within VirtualDub, File Information now reports 7350 frames, which you would expect.

However, if I then open the same script from TMPGEnc, it reports 73023 frames, and not the scaled-down version, leaving me no alternative but to Frame Serve from VirtualDub to TMPGEnc, which is not ideal.

Has anyone seen this before, and got the answer?

Many thanks

iradic
27th June 2004, 18:43
take a look here:
http://forum.doom9.org/showthread.php?s=&threadid=78764

i had same problem with helix producer ... and it seems avs script was problematic... look at second post with changed avs script...

hope it helps...

stickboy
27th June 2004, 20:26
DobraGolonka, please post your script.

DobraGolonka
28th June 2004, 06:31
Hi

My script is simply as follows:

clip = AVISource("C:\Temp\Video\avi_file.avi")

SelectRangeEvery(clip, 1500, 150)

As you can see, I am already explicity using the 'clip' parameter within the SelectRangeEvery.

Regards

DG

stickboy
28th June 2004, 08:41
Any other information you can provide?

What version of AviSynth?

What version of TMPGEnc?

What are the properties of the AVI file? Codec? Frame size? Audio sampling rate? Audio bitrate? Number of audio channels?

Is that the exact script? Copy and paste, don't retype.

Can you reproduce the problem if you substitute an equivalent BlankClip call for AVISource?

DobraGolonka
28th June 2004, 10:24
Hi

Versions are: AVISynth 2.5 & TMPGEnc 2.59.47.155

That is the script verbatim.

It doesn't matter what source AVI file I use (differing Frame Rates, Audio Channels, Bit Rates etc), the same problem occurs.

Can you reproduce the problem if you substitute an equivalent BlankClip call for AVISource?

Can you give me an example of how to do this, and I will try.

Many thanks

DG

stickboy
28th June 2004, 10:34
Originally posted by DobraGolonka
Versions are: AVISynth 2.5 & TMPGEnc 2.59.47.155Could you try using a more recent version of TMPGEnc? 2.59 is over a year old.

Maybe try AviSynth 2.54 or 2.55 alpha too...It doesn't matter what source AVI file I use (differing Frame Rates, Audio Channels, Bit Rates etc), the same problem occurs.What about codec?

Please give as much information you can. Even if it seems like it happens with all AVI files, it could be a problem only with the AVI files you've tried it with. I can't reproduce your problem, and you're not giving any specific details to work with.Can you give me an example of how to do this, and I will try.Instead of AVISource("foo.avi"), you simply use BlankClip(). You can specify width, height, framerate, length, etc.BlankClip(pixel_type="yuy2", width=720, height=480, fps=25.0, length=73023)
SelectRangeEvery(1500, 150)

DobraGolonka
28th June 2004, 21:43
Hi Stickboy

Firstly, many thanks for your continuing help :)

I think I have managed to narrow down the problem somewhat, and all roads seem to lead to TMPGEnc.

I copied your mini script:


BlankClip(pixel_type="yuy2", width=720, height=480, fps=25.0, length=73023)
SelectRangeEvery(1500, 150)


and loading this into VDub, File Information reports the length as 7350 frames - exactly what you would expect.

I have now installed TMPGEnc v2.521, and loading the same .avs file, the following is happening:

Choosing Setting/Advanced/Source Range etc, the End Frame is being reported as 7349 - so that part is correct. But after choosing Start on the main screen, the number of frames being reported is 73023, and the 'Remaining Time' field bears this out as though the entire clip is being encoded.

Due you have any further thoughts on this?

Regards

DG

DobraGolonka
28th June 2004, 23:39
Hi Stickboy

I think I may have found the problem (and some sort of an answer) in the following post:

http://www.kvcd.net/forum/viewtopic.php?t=1772,

It does seem that there is a problem within TMPGEnc, but I am intrigued that you are not experiencing the same issue - maybe it is an environmental problem? And due to the scarcity of articles on the 'Net, it doesn't appear to be very common - I've only been searching for the last 6 hours!

Anyway, the suggestion of setting the End Frame from within Source Range does do the trick, but it is a horrible fudge for an automated procedure!

Regards

DG

stickboy
29th June 2004, 06:24
Okay, I can reproduce the problem now. I had been using TMPGEnc's Source Range filter to get the frame number of the last frame, but when I actually start an encode, you're right, the frame count is bogus.

Bizarre.

stickboy
29th June 2004, 06:45
Nevermind, I think I had TMPGEnc's fps setting misconfigured. (When you start an encode, the framecount given by the progress bar is the number of frames that will be in the output MPEG file, not in the input. If the output fps doesn't match the input fps, the numbers will be wrong.)

But seeing as how SelectRangeEvery doesn't appear to alter the clip's fps, I don't how that could be your problem.

DobraGolonka
29th June 2004, 12:37
I don't think it can be a FPS issue at all - it just seems that TMPGEnc doesn't like having an AVS script containing SelectRangeEvery thrown at it :(

Setting the EndFrame from within Source Range does do the trick, and the correct number of frames are encoded/reported, but just using 'Start' doesn't - maybe this suggests some kind of initialisation problem within TMPGEnc - ie a bug!

Anyway, I do at least have a work-around, and maybe I will report this to the TMPGEnc team. It might even get fixed one day!

Many thanks for all your help.

Regards

DG