PDA

View Full Version : Format conversion (50i/50p/24p/25p) tests



2Bdecided
2007 October 5th, 12:33
I'm in the process of uploading these, and will add more next week.

I took a 50i clip.

I deinterlaced it to 50p here:
http://hv20.info/yopu/50p_from_50i_using_mcbob.m1v

I converted it to 24p with motion blur here:
http://hv20.info/yopu/24p_from_50i_using_mcbob_mvflowfps600_ts10_se25.m1 v


Also, I recorded a native 25p clip for comparison here:
http://hv20.info/yopu/25p.m1v


Processing was via AVIsynth. The conversion isn't perfect, but it's interesting. 50i>50p is certainly very useful.

All files are MPEG-1 video. You can't hit all the rates I want to try in MPEG-2.

(Obviously exposure on the footage could have been better, but the sun was too low and bright to see anything on the LCD viewfinder! I was concentrating on trying to get more or less the same shot in 50i and 25p, handheld!)

Cheers,
David.

2Bdecided
2007 October 8th, 09:32
Here is snapshot from the 50p version...

http://www.david.robinson.org/pics/50i_to_50p_to_1280x720.jpg

That's resized to 1280x720, and sharpened a little.


Here are some full-res examples...

50i>50p:
http://www.david.robinson.org/pics/50i_to_50p_to_1920x1080.jpg

50i>24p:
http://www.david.robinson.org/pics/50i_to_24p_to_1920x1080.jpg

real 25p for comparison with the above:
http://www.david.robinson.org/pics/25p_to_1920x1080.jpg


If anyone's interested, the raw HV20 source files are here:

http://www.hv20.info/yopu/HVD.2007-10-05_09-25-13_50i_pan.m2t (frames 167-322)

http://www.hv20.info/yopu/HVD.2007-10-05_09-24-40_25p_pan.m2t (frames 120-275)

Cheers,
David.

2Bdecided
2007 October 8th, 10:19
Finally, far from perfect, here's 50i to 60p:

http://hv20.info/yopu/60p_from_50i_using_mcbob_mvflowfps.m1v

You can re-interlaced this to 60i if you want. It's rare to see a standards conversion this good from free software, though there are some issues when an object passes behind another object.

There is a better, slower mode, using mvflowfps2 in AVIsynth, but I can't get it to work.

Cheers,
David.

lordtangent
2007 November 5th, 17:53
Show us the code man!

McGoal
2007 December 17th, 23:07
I would love to use avsynth to extract stills from the video. Please post an example of the acutal script. Thanks

2Bdecided
2008 February 7th, 11:58
My code is nothing special - the hard part is getting all the filters needed for mcbob, and mcbob itself (from Didée at doom9) is very clever. I use the older EEDI2 based version.

Here is a (complete?) guide to grabbing progressive frame captures from interlaced content using AVIsynth, mcbob, and VirtualDub(Mod):

Step 0

Pre-requisites...

AVIsynth is here:
http://sourceforge.net/project/showfiles.php?group_id=57023
(2.5.7 is fine. explanation: http://avisynth.org/mediawiki/Main_Page)
For serious AVIsynth script editing, download AVSedit from the same page. Otherwise just use Wordpad (built in to windows).

VirtualDubMod is here:
http://sourceforge.net/project/showfiles.php?group_id=65889
(1.5.10.2 build 2542 is the latest. explanation: http://virtualdubmod.sourceforge.net/)

A YV12 codec is not normally necessary, but if you get an error specifically saying that YV12 can't be decoded, get one from here:
http://www.free-codecs.com/download/Helix_YUV_Codecs.htm

You must have DGindex to create the d2v files to load into AVIsynth to index the .m2t files:
http://neuron2.net/dgmpgdec/dgmpgdec.html


Step 1

Save the following link as MCBob_v03c.avsi in your AVIsynth plugins folder. The "i" at the end of the filename extension (avsi instead of avs) makes it autoload. It doesn't have the "i" by default, so remember to add it! Make sure you can see filename extensions in windows (My computer > Tools > Folder Options > Files and Folders > (don't) Hide Extensions for known file types).

http://home.arcor.de/dhanselmann/_stuff/MCBob_v03c.avs
(explanation: http://forum.doom9.org/showthread.php?t=124676)


Step 2: download these plugins and put them in your AVIsynth plugins folder...

http://avisynth.org.ru/mvtools/mvtools-v1.9.2.zip
(explanation: http://avisynth.org.ru/mvtools/mvtools.html)

http://manao4.free.fr/masktools-v2.0a32.zip
(explanation: http://manao4.free.fr/mt_masktools.html)

http://web.missouri.edu/~kes25c/EEDI2v092.zip
(explanation: http://web.missouri.edu/~kes25c/)

http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar
(explanation: http://home.pages.at/kassandro/RemoveGrain/)
(don't use RepairSSE2.dll - it's buggy - use standard Repair.dll even if you have an SSE2 CPU. EDIT: Note the .zip archive with the same name at the same location is an older version that doesn't work with mcbob! Get the .rar linked above)

http://home.arcor.de/kassandro/ReduceFlicker/ReduceFlicker.zip
(explanation: http://home.arcor.de/kassandro/ReduceFlicker/ReduceFlicker.htm)

http://www.avisynth.org/tsp/medianblur084.zip
(no explanation: http://www.avisynth.org/tsp/)

Important: some plugins come with multiple versions, depending on your processor (SSE2 etc) - if in doubt, use the basic version - it'll work an all processors (but slower than the appropriate one).


Step 3:

Load a .m2t file into DGindex, save a d2v project (also demuxes the audio), and then create this AVIsynth script using a text editor...


video=mpeg2source("HDV.2007-12-02 16-11-55 115.d2v")
audio=mpasource("HDV.2007-12-02 16-11-55 115 MPA PID 814 DELAY 0ms.mpa")
audiodub(video,audio)

mcbob()


Obviously replace my file names with yours! Save the result as test.avs

run VirtualDubMod and drop test.avs onto it. Click Options > Display Input Video (make sure it's selected).

Now you can step through your video with the controls at the bottom, or jump to a specific frame by using Edit > Goto.

When you find the frame you want, click Video > Copy Source Frame to Clipboard and paste it into a paint package (e.g. Paint!) or Video > Snapshot source frame (which saves it to disk).


Step 4:

If mcbob is too slow (highly likely), or you don't even want to try it, forget all of steps 1-3 and grab Yadif instead...

http://avisynth.org.ru/yadif/yadif09.zip
(explanation: http://avisynth.org.ru/yadif/yadif.html)

Don’t put this in the AVIsynth plugins folder because this one cannot autoload from there - create a new folder (e.g. C:\Program Files\AviSynth 2.5\selected plugins\) and put it in there.

For Yadif, you need this script...



Load_Stdcall_plugin("C:\Program Files\AviSynth 2.5\selected plugins\yadif.dll")

video=mpeg2source("HDV.2007-12-02 16-11-55 115.d2v")
audio=mpasource("HDV.2007-12-02 16-11-55 115 MPA PID 814 DELAY 0ms.mpa")
audiodub(video,audio)

yadif(mode=1)


Use it in VirtualDubMod as explained for the previous one.



An alternative to saving images from VirtualDub(Mod) is ImageWriter within AVIsynth...
http://avisynth.org/mediawiki/ImageWriter
I don't suggest using it for single images - it's more useful for dumping an entire video to disc as a series of images.



Finally, if you don't trust VirtualDubMod's YV12>RGB conversion (and it may not give the range you want, so I don't always use it!), add...
ConverttoRGB(matrix="pc.709")
...or...
ConverttoRGB(matrix="Rec709")
...to the end of your script, as explained here: http://avisynth.org/mediawiki/Convert
...and VirtualDubMod will receive RGB straight from AVIsynth with the range you select in the converttoRGB command.


Hope this helps. Any problems, please post and I'll try and correct any mistakes!

Cheers,
David.

Marc-Alexandre Drapeau
2011 October 30th, 11:33
Wow, I was just reading this thread (http://www.hv20.com/showthread.php?3406-AviSynth-can-it-convert-normal-60i-HDV-to-24P) and I found a link to this one: great info in it! I'm actually surprised by the look/motion and quality of the 50i to 24p conversion you did! It doesn't seems much like a conversion but actually looks just as good as a real native 24p. Interesting little tutorial on how to achieve it.
I just thought I should write about it so others could read it too. There's a lot of usefull infos in it.