Log in

View Full Version : 720*576 25 fps interlaced to 50 fps 720*288 ?


Der_Vogel
10th April 2002, 21:18
Hi !

I captured a video which contains very fast motion. Deinterlacing methods like blending fields together (area based) and discarding one Field (this is what smart deinterlacer does in this case) don't look very good.
And i would like to keep the smooth motion.

I don't know how to take the two fields of an interlaced frame apart to get two seperate frames.

Can anyone tell me how to convert a 720*576 interlaced video at 25 fps to 720*288 at 50 fps?

thanks for your help...

Zhnujm
10th April 2002, 21:36
if your file is mjpeg you can use virtualdub. select extended open option when you load the file and check the "split interlaced frames into 2 fields" box.

Der_Vogel
10th April 2002, 23:01
Thanks for your fast answer!
My first file was huffyuv. But I tried Mjpeg now and it worked :)

Is there any possibility to do this with other codecs?

movmasty
10th April 2002, 23:13
and when you have your 50 fps 720x288,what do you think to do Der_Vogel ?

avih
10th April 2002, 23:27
you can use avisynth to do that with any codec. keep in mind that the audio will pass along with the video only if it's pcm.

u should use something like this: (i don't have the script anymore but it shouldn't be far from this):

#---- script start ----
clip=avifile("<yourfile>")
clip.separatefields
#or if you should swap fields: clip.complementparity.separatefields
#---- script end ------

then it opens in vdub the same as when u use extended open with mjpeg.

-avi

ps, i might have syntax errors here, check avisynth guide for the exact commands. i might have also swapped separatefields with complementparity. try both options.

Zhnujm
11th April 2002, 21:10
i think he wants a perfect "deinterlaced" video, movmasty ;)

Der_Vogel
11th April 2002, 22:20
@ movmasty
I wanted to keep the smooth motion of the video when watching on PC.
And I don't have to mess up with deinterlacing (as zhnujm already said) :)

For an optimal result i could resize to 720*576 at 50 fps an shift every second frame by one line but that would need a very high bitrate when encoding to divx. So I'm going to run some tests which resolution/bitrate im going to use.


@ avih
Thanks for your hint !!
Your script works perfectly (only "avifile" should be "avisource")

movmasty
11th April 2002, 23:20
@Der_Vogel & Zhnujm
-dont think that taking only one field is a better way to deinterlace,
is like resize keeping every other line,
using fields like frames would be even worst,
sure worst than discarding one field(hey, at 25fps motion is very smooth)

capturing at 720x288 and then resizingsay,at 640x480, is interesting,
since doing the resizing well could fix the bad resizing of discarding one field.

but are you capturing or just converting a dvd?
and will you make divx or svcd??

avih
11th April 2002, 23:34
np :) you're welcome.

if u want an even better result with avisynth, u can use it's bob feature (separate_filds+double height+shift one line for every other field) like this:

clip.bob
or clip.complementparity.bob

that's all.

also, bob can resize vertically while 'bob'ing
like 'bob(0.3,0.3,240)' will do bicubic(?) resize (of height only) using params 0.3,0.3, to vert size 240
(again, i don't have the scripts, just recovered from hd crash, maybe it's only single '0.3' and maybe u should swap the params order)

even more, if u want to always bob+resize to half v-size, regardless of the absolute size, u can use:

bob(0.3,0.3,clip.height/2)

u can find many interesting things in avisynth manual (which i haven't read for quite a while now) :)

avi

avih
11th April 2002, 23:47
and another thing.

50fps deinterlaces gives much better experience than 25fps (when the source is truely interlaced)

i've been playing with interlaced when i encoded a vhs video to xvid. i used separate filds in avisynth script, and in vdub used deinterlace (don't remember the exact name) which resize the video to full height again and incorporating data from current and previous fields. final result was very nice full height 50fps, deinterlaced :)

and another thing i tried: i'm using my pc as a vcr, and wanted to capture once, playback once in 50fps, without any re-encoding... because watching rally races in 50fps is so much better than @25fps :) i also didn't want this file to be huge, so i didn't use huffyuv or mjpeg.

this is what i did:
i captured interlaced with res: 320x480 (x=320, y=480).
then i used avisynth script with separate fields or with bob+resize vert by 2 (as demonstrated in my prev post). and played the avs file using zoom player. and it played 50fps :)

i couldn't capture larger res since my duron 800 was more than 90% most of the time, but it worked :)

capture @25fps interlaced once, play @50fps deinterlaced without 'offline' processing of the source clip. just 'online realtime' with avisynth :)

avi
i captured

movmasty
12th April 2002, 03:12
ok, but how all the world knows i dont like high frame rates :o

Zhnujm
12th April 2002, 15:20
imho the field splitting produces the best output for an interlaced source. its completely non-destructive , you wont loose any information .
only problem: you need a high bitrate and a fast pc for full-res playback. :(
but when i read avih´s comment it must be possible to do this during playback with a avisynth script. i think the bitrate shouldnt be a problem then. i think i try this.

Zhnujm
12th April 2002, 16:01
just remember that avisynth only supports pcm audio. too bad.
would be nice if a player support field splitting and resizing on the fly, but maybe thats not so easy as i think...

skyline
18th April 2002, 04:35
Yes, I find deinterlacing annoys me with it's jerkyness too.

Currently, I capture DV 720x576 then avisynth bob to 720x288x25 then resize to 352x288 & compress to xvid. This results in nice smooth PC playback.
What I would like to be able to do is put this xvid back to DV tape sometimes (whilst maintaining smooth motion). How do I do this? I thought weave would be the answer but that has no effect on frame based source clip. How do I combine the progressive 352x288x50 to 720x576x25 interlaced?
I also am of the understanding that each field will have to be offset by one line when reinterlacing. how?

avih
18th April 2002, 09:38
>"Currently, I capture DV 720x576 then avisynth bob to 720x288x25..."

are u sure it's x25?? avisynth's bob doubles the framerate, i would expect it to be x50...

use 'assumeFieldBased' such that 'weave' works. or some other combination with 'assume<xxx>'

make sure u resize to full dv field res (720x288?) before weaving, and that u use 'complement parity' if needed.

skyline
18th April 2002, 12:46
>>"Currently, I capture DV 720x576 then avisynth bob to 720x288x25..."

>are u sure it's x25?? avisynth's bob doubles the framerate, i would expect it to be x50...

I apologise. The whole reason I included the framerate was so that I could make it clear that it was 50fps. Yet I ended up typing 25! Go figure...
Anyhow, All is well now that I included AssumeFieldBased ;)

Many thanks Avih!!

avih
18th April 2002, 13:05
np skyline.
i heartly recommend spending 20 mins reading the avisynth guide and reference before starting using it. it's a good and very usefull read :)

http://www.videotools.net/uk/index.php (from the 'toolbar')
or
http://math.berkeley.edu/~benrg/avisynth.html
(links at the bottom of the page).

cheers
avi

chaumurky
6th September 2002, 04:27
I recently have been trying the same thing with avs files but with the purpose of displaying back to a TV as 50field PAL and it works like a charm. I only wish that there was a way of displaying live video that way. All capture software I know of displays full res 25fps without the option of half res 50fps. Does anyone know of a way to achieve this?

Guest
6th September 2002, 07:04
There are better ways to bob than the simple one described above. See Smart Bob at my website. For an even smarter bob, see Gunnar Thalen's deinterlace--smooth. Both of these intelligently combine lines from two fields in non-moving areas to retain full vertical resolution in those areas.

The downside to bobbing is flutter. Gunnar tries to solve that, with some success.

chaumurky
6th September 2002, 08:07
I only need half res anyway as, like I said, I am playng out to the TV which is half res/two field. Another question though, is there a player that allows bob/field shift filter integration without having to create an avs file for each clip? If there is, then I can always capture full frame interlaced and output true PAL to my TV. I can't speak for everyone else but personally, tempoal resolution is equally important as spatial - movement is so much smoother and on a TV full res is wasted. Maybe there is a discussion group somebody knows of that deals with this specific subject?

ronnylov
6th September 2002, 12:13
I asked a similar question in the avisynth forum a while ago:
http://forum.doom9.org/showthread.php?s=&threadid=30887

It was also discussed here:
http://forum.doom9.org/showthread.php?s=&threadid=32386

avih
6th September 2002, 15:34
Originally posted by chaumurky
I only need half res anyway as, like I said, I am playng out to the TV which is half res/two field. Another question though, is there a player that allows bob/field shift filter integration without having to create an avs file for each clip? If there is, then I can always capture full frame interlaced and output true PAL to my TV. I can't speak for everyone else but personally, tempoal resolution is equally important as spatial - movement is so much smoother and on a TV full res is wasted. Maybe there is a discussion group somebody knows of that deals with this specific subject?

fdshow has some perliminary support for this. it will probably be usable in the next release.