digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Command to go to an exact frame or second:msecond ? (http://www.digitalfaq.com/archives/avisynth/9382-avisynth-command-exact.html)

Fluffbutt 04-29-2004 01:49 AM

Avisynth: Command to go to an exact frame or second:msecond ?
 
Is there a command to go to an exact frame or second:msecond in avisynth? Maybe sampler?

I've been looking for a tool to do screenshots from dvd/mpg. I know players and media player classic and such do screen shots, but I was looking for something that resizes too.

I came up with (pseudocode)

LoadPlugin("C:\AviSynth 254\plugins\MPEG2Dec3dg.dll")#load specific plugin, stops errors
mpeg2source("E:\movie\movie.d2v")
#resize
SeekFrame (5000)
#SeekTime(25:125)
BicubicResize(2048,1430)
#and then some way to save the frame
#probably just screenshot in Mpc.

Fluffbutt 04-29-2004 03:29 AM

Wow I found the frame answer anyway.

OneFrame.avs:

LoadPlugin("C:\Avisynth\plugins\MPEG2Dec3dg.dll")
mpeg2source("E:\movie\Test.d2v")
Frames=framecount()
FreezeFrame(0,Frames,5000) #removes all frames from 0 to end
#replaces them with frame No. 5000
BicubicResize(2048,1430)
#resize HUGE


Then just open the avs in MediaPlayerClassic and hit F5 (screenshot), a few secs later and a 11MB bmp is in the folder, picture quality is good, better than photoshops resize!!

Just need to seek in MPC for the frame numbers (ctrl-G is goto frame or time)

anyone know how to set avisynth to a time offset?

Peter1234 04-29-2004 09:25 PM

I have not tried this, but I assume
Frames=(seconds from start)*(fps)
will work.

Prodater64 04-29-2004 09:58 PM

Quote:

Originally Posted by Peter1234
I have not tried this, but I assume
Frames=(seconds from start)*(fps)
will work.

Not in this way, but:
Quote:

LoadPlugin("C:\Avisynth\plugins\MPEG2Dec3dg.dll")
mpeg2source("E:\movie\Test.d2v")
Frames=framecount()
fps=Framerate()
Freeze=fps*[seconds from start]
FreezeFrame(0,Frames,Freeze) #removes all frames from 0 to end
#replaces them with frame = Freeze Results
BicubicResize(2048,1430)
#resize HUGE
[seconds from start]: You must to set this value (without brackets).


All times are GMT -5. The time now is 11:52 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.