Log in

View Full Version : changing 25fps interlaced to 25fps progressive


adom
6th January 2013, 05:32
this is video from my old camera:
Duration : 26s 440ms
Bit rate mode : Variable
Bit rate : 16.0 Mbps
Maximum bit rate : 16.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
I want to take out one field, resize it horizontally to half of its original size (1920 / 2 = 960 pixels) and make a PROGRESSIVE movie out of this at 25fps.

My code looks like this:
DirectShowSource("inputVideo.ts", audio=false)
assumeTFF().separateFields().selectEvery(4,0).assumeFrameBased()
crop(16, 6, 1888, 528).spline64Resize(944,528)

and my question is why I have to use SELECTEVERY(4, 0) ?
if I use SELECTEVEN then frames in output movie get duplicated (but it worked in avisynth 2.5 only after installing 2.6 I had to use SELECTEVERY(4, 0))

And last question:
am I doing this right way or not?

Thanks.

lansing
6th January 2013, 19:44
directshowsource may have frame accuracy issues. I would suggest that you mux the ts into mkv, and load it with ffvideosource()

adom
7th January 2013, 22:02
thanks for replay but ffvideosource() hasn't changed anything :(

it makes me wonder if I do it correctly. This is how I understand following commands:
assumeTFF().separateFields().selectEven().assumeFrameBased()
assumeTFF() - that's because SCAN ORDER in mediaInfo is TFF
separateFields() - so I get each field
selectEven() - takes even fields
assumeFrameBased() - changes fields into frames

and that worked with avisynth 2.5 - now I need to use selectEvery(4,0) to get the same result - I just don't get it.

eta:
swapping last to commands makes no difference
assumeTFF().separateFields().assumeFrameBased().selectEven()

IanB
7th January 2013, 22:21
Put an Info() after your Source statement. Something else has changed, like your source filter is now returning double rate video. Yes DirectShow can do deinterlacing all by itself. Render your file in GraphEdit to see what default DirectShow graph is now being created.

adom
7th January 2013, 22:45
using directShowSource() info gives what follows (info is placed directly after DSSource):

frame: 980 of 11784
time: 00:00:19:600 of 00:03:55:680
colorSpace: YV12
Width:1920 pixels, height:1080 pixels
Frames per second: 50.0000 (50/1)
Field Based (separated) video: NO
Parity: Bottom Field First
Video Pitch: 1920 bytes
has audio: no


using FFVideoSource() info gives what follows (info is placed directly after FFVSource):

frame: 980 of 11778
time: 00:00:19:600 of [/b]00:03:55:512[/b]
colorSpace: YV12
Width:1920 pixels, height:1080 pixels
Frames per second: 50.0100 (50060/1001)
Field Based (separated) video: NO
Parity: Top Field First
Video Pitch: 1920 bytes
has audio: no


Monogram GraphStudio:
inputFile.ts -> LAV Splitter -> LAV Video Decoder -> Video Renderer
audio goes to ACM Wrapper -> Default DirectSound Device

I just realized that before I updated avisynth I had enabled LAV (earlier I used coreAVC - but uninstalled it). Can this couse the problem?

Edit:
yes, it can. Now I have AVSplitter and coreAVC decoder and everything is like it was before:)

frame: 980 of 5887
time: 00:00:19:600 of 00:03:55:480
colorSpace: YV12
Width:1920 pixels, height:1080 pixels
Frames per second: 25.0000 (25/1)
Field Based (separated) video: NO
Parity: Bottom Field First
Video Pitch: 1920 bytes
has audio: no


Thanks for the tip!

and last question:
selectEven() should be at the and or second from the end or: makes no different ?

IanB
8th January 2013, 21:50
and last question:
selectEven() should be at the end or second from the end or: makes no difference ?
Makes no difference.