I have the script (listed below) which is proposed elsewhere on this forum for smooth conversion of 50p/HD to MPEG2.
I have the script ready and loaded in Virtualdub. But I am confused - how do I get MPEG2 as output? Because I do not have mpeg2 as an output option in Virtualdub.
Thanks.
# IResize by Gavino and IanB and mod by A.SONY to use Custom resizer and Extra resizer parameters may be passed via res_params. like this IResize(240,480,res_params=",src_left=5")
function IResize(clip c, int NewWidth, int NewHeight, string "resifilter", string "res_params") {
resifilter = default ( resifilter, "Spline36resize" )
res_params = default(res_params, "")
c
SeparateFields()
Shift = (GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)
v2=last
SelectEven(v2)
E = Eval(resifilter + "(NewWidth, NewHeight/2, src_top=Shift" + res_params + ")")
Ec = Eval(resifilter + "(NewWidth, NewHeight/2, src_top=2*Shift" + res_params + ")")
SelectOdd(v2)
O = Eval(resifilter + "(NewWidth, NewHeight/2, src_top=-Shift" + res_params + ")")
Oc = Eval(resifilter + "(NewWidth, NewHeight/2, src_top=-2*shift" + res_params + ")")
Interleave(E, O)
IsYV12() ? MergeChroma(Interleave(Ec, Oc)) : Last
Weave()
}
IResize(720,576)
LoadPlugin("ColorMatrix.dll")
ColorMatrix(mode="Rec.709->Rec.601",clamp=0)
AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 16 of 16
Thread
-
-
Open the script with an MPEG2 encoder like HcEnc, HcGUI.
It makes no sense to use IResize here. It's for resizing interlaced video -- but your source is progressive. Just resize with a "normal" resizer like Spline36Resize(), BicubicResize(), whatever works best for your material. If you find the picture flickers a little too much on playback add a small vertical blur with Blur(0.0, 0.5) or something like that. Or use a less sharp resizer like BilinearResize(). -
Thanks for that. But I am still confused. I have stripped down the code to bare minimum:
LoadPlugin("ColorMatrix.dll")
ColorMatrix(mode="Rec.709->Rec.601",clamp=0)
AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
and fed it through HEnc and it comes up with error:
"invalid aruments to function colourmatrix..."
...and where do I specify the input file?
Sorry, I am novice starting out. -
You need a source filter. Something like LWlibavVideoSource("filename.mp4") (included in the LSMASH package). But you said earlier you had successfully opened the script with VirtualDub -- so it must have had a source filter at some point. Having no source is the cause of the ColorMatrix error.
-
Thanks jagabo. I ended with the following script which works now. But results are not very good. Although I have lost the artifacts the pic is still jittery/stuttery - gives a headache just watching it.
AviSource("L:\test\waltest.avi")
ConvertToYV12(matrix="PC.709")
Spline36Resize(720,576)
Blur(0,1.0)
LoadPlugin("ColorMatrix.dll")
ColorMatrix(mode="Rec.709->Rec.601",clamp=0)
AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() -
Upload a small sample of your source and the resulting MPG video. I suspect your source is encoded 50p but the underlying video is not 50p.
-
your video source is progressive (50p/HD) so you dont need this in script:
AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() - -
I have removed that line and it looks much better. Although there is a small amount of stutter, it is much more stable than before.
Only if I can ever make it buttery smooth. Motion interpolation? -
If it's for MPEG2 for DVD - you need it interlaced - "50p" will not work . You would need to add the line back
If there is stutter there, there is probably stutter in the source. It depends what you mean exactly by "stutter". Upload a sample of the source -
Also, how are you watching the video? If it's not being deinterlaced properly on playback it will not be smooth. If you're watching it on a 60 Hz computer monitor it will not be smooth. If your computer is underpowered it may not not be smooth. If it's really 50p content, properly encoded and authored to a PAL DVD, and properly played on a PAL TV it should be smooth.
-
Ultimate target is a Sony TV (at claimed 100Hz).
But if we are taking 50p (real) footage and reducing it to 25i - are we not throwing away half of the frames, thus introducing stutter? -
-
For better analysis upload a clip from your source. 10 or 15 seconds should be enough
-
I am attaching 2 clips. The first is straight out of camera original clip (50p). The 2nd one DVD_YDXJ0001 is the converted one through HENC/avisyn/AVStoDVD.
You can clearly see the converted clip has a lot of stutter. -
Your MPG clip is 25p, not 25i.
Code:LWLibavVideoSource("YDXJ0001.MP4") BilinearResize(720,576) AssumeTFF() SeparateFields().SelectEvery(4,0,3).Weave()
-
I don't know your encoding tools, but your output is 25p progressive rather than 25i, means you threw 50% of the time resolution away.
Use this simple script
Code:DirectShowSource("YDXJ0001.MP4") #or a source filter of your choice bicubicresize(720,576) separatefields().selectevery(4,0,3).weave() #for TFF
Edit: ooops, jagabo was faster
Similar Threads
-
How can I achieve this smooth transition?????????
By brandon_768 in forum EditingReplies: 6Last Post: 21st Nov 2016, 18:52 -
Encoding for smooth playback on TV
By Nossty in forum Video ConversionReplies: 5Last Post: 2nd Sep 2016, 22:25 -
Smooth Subtitle
By ashkan_vpm2 in forum SubtitleReplies: 13Last Post: 31st Jul 2015, 08:50 -
How to get smooth MotionFlow using MPC-HC?
By Siamak in forum Software PlayingReplies: 12Last Post: 20th Jun 2015, 07:23 -
why this MP4 is not smooth during play?
By marcorocchini in forum Newbie / General discussionsReplies: 22Last Post: 2nd Apr 2015, 15:33