Log in

View Full Version : Convert 1080i50 to 1080i60 using avisynth


henryperu77
19th July 2012, 03:36
I have a tv .ts stream that looks progressive and runs at 25fps but mediainfo says its interlaced.. i wanted to convert it to 29.97i using avisynth

yadif(mode=1)
ChangeFPS(59.94)
separatefields().selectevery(4,0,3).weave()

But with that the interlaced lines are noticeable... it is possible to do a pulldown on h264 streams like dgpulldown on mpg2 ??

http://www.afterdawn.com/guides/archive/convert_pal_to_ntsc_page_5.cfm

thanks for any help!

sneaker_ger
19th July 2012, 06:28
I have a tv .ts stream that looks progressive and runs at 25fps but mediainfo says its interlaced..

If it looks progressive, chances are it is. Don't use yadif then.

i wanted to convert it to 29.97i using avisynth[...]But with that the interlaced lines are noticeable...

When you output interlaced, of course you'll get interlacing. :confused:

it is possible to do a pulldown on h264 streams like dgpulldown on mpg2 ??

Supposedly h264info can do it, but I never tested it. It's probably unreliable.

spawnbsd
19th July 2012, 07:49
I have a tv .ts stream that looks progressive and runs at 25fps but mediainfo says its interlaced.. i wanted to convert it to 29.97i using avisynth


Here is a script I used to convert some high quality 1080i50 captures to 1080i60 to feed a broadcast encoder in the lab. The source was a 30mbps MPEG2 transport stream capture, that I then converted with ffmpeg to an FFV1 avi file. I don't claim the script to be optimal, but it gave very good results. When viewed on an STB outputting 1080i60, no one realized the source was PAL.


avisource("1080i50_source.avi")
LeakKernelBob(order=1)#50p
super = MSuper(pel=2)
backward_vec = MAnalyse(super, isb = true,overlap=4, blksize=16,search=3,searchparam=4)
forward_vec = MAnalyse(super, isb = false,overlap=4, blksize=16,search=3,searchparam=4)
backward_vec = super.MRecalculate(backward_vec, overlap=2, blksize=8,search=3,searchparam=4)
forward_vec = super.MRecalculate(forward_vec, overlap=2, blksize=8,search=3,searchparam=4)
MFlowFps(super, backward_vec, forward_vec, num=60000, den=1001, ml=100)#59.94p
DoubleWeave().SelectEvery(4,1)#59.94i, TFF here

Blue_MiSfit
19th July 2012, 09:14
Look at the source video carefully to determine if it's actually interlaced, or just progressive content coded as interlaced. Both are possible.

How are you loading the content into AviSynth? If it's via DirectShowSource, some decoder may be deinterlacing the footage. I'd suggest using DGIndex if it's MPEG-2, or ffms2 otherwise.

henryperu77
19th July 2012, 23:01
I used DGIndexNV , what is ffms2?

dgsource("sipan.dgi")

So what should i do if its progressive content coded as interlaced? i didn't know that was possible on a HDTV stream..
I want to author this on blu-ray and i know that 1080i50 is not really compatible with all blur-ay players specially the Sony ones
I uploaded a sample

http://www.mediafire.com/download.php?99zrhqbur8z3hwf

henryperu77
19th July 2012, 23:10
Thanks i definetly try this with soccer matches, that ones are pure interlaced :D and should work great with mvtools

Here is a script I used to convert some high quality 1080i50 captures to 1080i60 to feed a broadcast encoder in the lab. The source was a 30mbps MPEG2 transport stream capture, that I then converted with ffmpeg to an FFV1 avi file. I don't claim the script to be optimal, but it gave very good results. When viewed on an STB outputting 1080i60, no one realized the source was PAL.


avisource("1080i50_source.avi")
LeakKernelBob(order=1)#50p
super = MSuper(pel=2)
backward_vec = MAnalyse(super, isb = true,overlap=4, blksize=16,search=3,searchparam=4)
forward_vec = MAnalyse(super, isb = false,overlap=4, blksize=16,search=3,searchparam=4)
backward_vec = super.MRecalculate(backward_vec, overlap=2, blksize=8,search=3,searchparam=4)
forward_vec = super.MRecalculate(forward_vec, overlap=2, blksize=8,search=3,searchparam=4)
MFlowFps(super, backward_vec, forward_vec, num=60000, den=1001, ml=100)#59.94p
DoubleWeave().SelectEvery(4,1)#59.94i, TFF here

nm
20th July 2012, 06:59
So what should i do if its progressive content coded as interlaced? i didn't know that was possible on a HDTV stream..
That's quite common in 1080i50 broadcasts. In your sample the encoder (or some part of the input pipeline) has not even adapted to the progressive content, so there's slight combing in the video. Zoom in to see it.

25p to 30p or 60i conversion is difficult. I'd convert this to 24p by slowing down the audio and encoding the video as progressive. Deinterlacing might be a good idea to get rid of the combing and to maximize compression, but you'd probably need QTGMC to keep all the detail intact.

henryperu77
20th July 2012, 07:21
This .TS is from a russian TV , but i recorded the same program long time ago from Directv Latinoamerica but in SD (NTSC 30fps) and the audio fits perfectly on the 1080i50 , i didnt need to slowdown the audio. In some way the video was converted from from PAL to NTSC (Its from SPAIN) without audio modification.. is strange.. I tried to convert it to 24fps but i didnt really like the result, because the movements wasn't smooth , looks like when you deinterlace a pure interlaced video.

nm
20th July 2012, 16:46
This .TS is from a russian TV , but i recorded the same program long time ago from Directv Latinoamerica but in SD (NTSC 30fps) and the audio fits perfectly on the 1080i50 , i didnt need to slowdown the audio.

That can be expected from a normal 25p/50i to 60i conversion. I bet the NTSC-rate video had visible conversion artifacts that are avoided in 25p to 24p conversion, which is lossless except for the re-encoding (required by Blu-ray specs) and the slower playback rate.

I tried to convert it to 24fps but i didnt really like the result, because the movements wasn't smooth , looks like when you deinterlace a pure interlaced video.

You converted incorrectly by dropping frames. The whole point of switching the framerate to 24p is to keep motion smooth. If you insist on converting to 30p or 60i, you need to either duplicate fields, which causes stuttering, or interpolate new frames, which is difficult to do perfectly. Here are some suggestions for the latter: http://forum.doom9.org/showthread.php?t=164791

henryperu77
20th July 2012, 16:52
So hows the best mode to convert from 25 to 24 coz i tried assumefps, changefps and convertfps .. but it didnt really give me a smooth motion.. infact it has some jumps

nm
20th July 2012, 17:25
So hows the best mode to convert from 25 to 24 coz i tried assumefps, changefps and convertfps .. but it didnt really give me a smooth motion.. infact it has some jumps

AssumeFPS should do it. Does the converted output have the same number of frames as the source, without duplicates or drops if you play the video frame-by-frame?


How did you play the video? For example on a PC monitor, the standard 60 Hz display refresh rate will cause slight judder on 24p playback. If your display happens to have a 50 Hz refresh rate, judder is even more pronounced. In any case, make sure that the display refresh rate is a multiple of the video framerate.

There's also the difference between 24 fps and 24000/1001 fps (=23.976 fps). If the display refresh rate is one of these and the video is the other, playback will stutter 1 or 2 times in a minute.

Do other 24p videos play smoothly?

kolak
25th July 2012, 17:36
If your 25p source is smooth than in case of assumefps "converted" 24p file will be as smooth- if you have any jumps etc you're either using wrong preview or have these jumps in your source. There is no magic.
24p (not 23.976p) is very rare in broadcast, so make sure you have proper 24p chain, so preview does not introduce problems.