View Single Post
Old 8th September 2017, 18:14   #5  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Quote:
Originally Posted by ogrgkyle View Post
Here's my script. The .mpg was copied from a DVD.

video = FFmpegSource2("F:\mymovie.mpg")
TFM(video, order = 1)
TDecimate(video)
video = BicubicResize(video, 640, 480)
return video

This outputs the video, but it is still telecined and it is still 30i. Why won't it work to detelecine? Thanks.
It's because the first and second last lines update the definition of "Video" and the last line tells AVisynth to return the latest definition of Video.

This would work:

video = FFmpegSource2("F:\mymovie.mpg")
video = TFM(video, order = 1)
video = TDecimate(video)
video = BicubicResize(video, 640, 480)
return video

But when a filter expects a clip as the first argument it's automatically taken from the "last" variable. "Video=" also becomes obsolete and the way manono suggested to do it is all that's required.

FFmpegSource2("F:\mymovie.mpg")
TFM(order = 1)
TDecimate()
BicubicResize(640, 480)

The special variable "last" passes the output of one filter to the input of the next and while you could add
return last
to the end of a script it's not necessary as it's automatically assumed.
http://avisynth.nl/index.php/Runtime..._and_functions

If you must use FFmpegSource2 it's generally a good idea for DVD sources to include rffmode=1 like so:
FFmpegSource2("F:\mymovie.mpg", rffmode=1)
So ffms2 will obey any repeat field flags. Without it, it ignores them and the output can be unexpected.

As manono said though, for mpeg/DVD sources, DGIndex/MPEG2Source is a better option.

PS If the source is a 4:3 DVD and you're not cropping, resizing to 656x480 would usually be a better choice. For 4:3 DVDs, only 704 of the width contributes to an exact 4:3 resolution. If you want exactly 4:3, you probably should do this:

Crop(8, 0, -8, 0)
BicubicResize(640, 480)

Last edited by hello_hello; 9th September 2017 at 02:23.
hello_hello is offline   Reply With Quote