Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Betacam/betacam Sp Effect For Virtualdub?
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
RealDUB
Posted: Apr 2 2014, 11:58 PM


Member


Group: Members
Posts: 10
Member No.: 37844
Joined: 2-April 14



Hi all,
new to the forums, I'm looking for an effect/filter in Virtualdub that can simulate visual characteristics of a Betacam or Betacam SP tape,
typically showing its analog nature like artefacts such as dot crawl. I've came across ukimenustah's Realistic VHS Effect -
https://www.youtube.com/watch?v=osUvH8PRk3g, but I want something more closer to Betacam.

Thanks in advance,
RealDUB
 
     Top
raffriff42
Posted: Apr 3 2014, 03:05 AM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



I wasn't aware of "ukimenustah's Realistic VHS Effect" and had to google a bit -
AVISynth: Realistic VHS Effect Mar 3, 13 +Tutorial (youtube)
http://www.mediafire.com/download/8crcc3pe...ect+v13.3.3.zip
(huh, 20MB download...uses prebaked noise sources. Good looking result though)

Here's an NTSC emulator... (C source code, very old web page)
http://people.ece.cornell.edu/land/OldStud...gchen/proj.html

Other than that I could not find either an NTSC encoder or emulator in software. I assume PAL encoders are hard to find too. They are all in hardware, but the good news is: the hardware is cheap. Maybe get a TV-out card with analog composite output and capture it with a separate TV-in card??
 
     Top
RealDUB
Posted: Apr 3 2014, 09:32 AM


Member


Group: Members
Posts: 10
Member No.: 37844
Joined: 2-April 14



Hi raffriff42,
thanks for replying, I haven't thought of using an NTSC simulator but I'll
have a go at that, I've been suggested to use the real hardware and recapture
with a capture card, anyway thanks again for your suggestion.
 
     Top
raffriff42
Posted: Apr 3 2014, 05:56 PM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



Here is an NTSC encoder block diagram. Here is a basic drawing of a composite NTSC video signal. Emulating it is doable in software, but with difficulty.

The MAME arcade emulator supposedly does dot crawl emulation.
QUOTE
Ryan Holtz and Bat Country Entertainment implemented experimental HLSL post-processing support on Direct3D 9 targets...
* Many tunable effects including: Scanlines, defocus, linear deconvergence, radial deconvergence, pincushion, RGB colorspace convolution, YIQ colorspace convolution, saturation, simulated dot crawl, simulated chroma subsampling, aperture masking, and more.
Maybe study their source code?

It's been a while since I've even seen Betacam dot crawl (I saw a lot of it in the 90's when I was a video engineer), so I would need some sample footage to work with, but it seems like one might be able to emulate it in Avisynth by adding fake dot crawl of some kind at hard chroma transitions.
 
     Top
RealDUB
Posted: Apr 3 2014, 09:39 PM


Member


Group: Members
Posts: 10
Member No.: 37844
Joined: 2-April 14



I've seen a lot of NTSC simulation on emulators for the NES and SNES as well,
but it's just that people view such artifacts as annoyances these days, I'll
don't want the effect too strong, just at a level where it gives the "analog"
feel but doesn't become a distraction.
 
     Top
raffriff42
Posted: Apr 4 2014, 01:06 AM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



QUOTE
it seems like one might be able to emulate it in Avisynth by adding fake dot crawl of some kind at hard chroma transitions.

Done! cool.gif
Avisynth dot crawl effect (make your video ugly on purpose) (doom9.org)
Try it with the "mild" preset
 
     Top
RealDUB
Posted: Apr 4 2014, 02:58 AM


Member


Group: Members
Posts: 10
Member No.: 37844
Joined: 2-April 14



Thanks raffriff42!
I actually founded a very old script that simulates specifically Betacam SP's dot crawl
for Apple Shake (http://www.creativecrash.com/shake/downloads/macros/filters-effects/c/betacam)
which is long gone for Windows, but I could only import the source video into Shake as
an image sequence, which is a lot of images to process,
trying your script later.
 
     Top
RealDUB
Posted: Apr 5 2014, 07:43 AM


Member


Group: Members
Posts: 10
Member No.: 37844
Joined: 2-April 14



I'm having some issues with your script, most likely that I'm not using it right,
I'm trying to go through the script by myself, making sure the plugins and other
files are in their correct places, but I get a few errors like missing functions
(e.g. "ConvertToY8", "_uumod"), could you please give me some guidance?
Thanks.
 
     Top
raffriff42
Posted: Apr 5 2014, 01:14 PM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



Your "ConvertToY8" error tells me you are running Avisynth version 2.58, where I am on version 2.60 (I didn't consider that people still use 2.58; this has been fixed)

The "_uumod" error was simply my fault for not including the function. (it's included below; sorry about that)

That post assumed the reader was an expert and took some shortcuts; here is a more complete explanation. These instructions were tested on a fresh virtual machine running Avisynth 2.58. So assuming you have Avisynth version 2.58 or 2.60 installed, here is what you do:

* get AddGrainC-1.7.0.7z @
http://forum.doom9.org/showthread.php?t=111849
** extract the file to a temporary folder
** copy AddGrainC.dll to your plugins folder: "<avisynth install folder>\plugins"
(found in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\AviSynth)
** you don't need the other files in AddGrainC-1.7.0.7z

* get masktools-v2.0a48.zip @ http://manao4.free.fr/
** extract the file to a temporary folder
** copy mt_masktools-25.dll (for avisynth 2.58)
** or mt_masktools-26.dll (for avisynth 2.60) to your plugins folder
** you don't need the other files in masktools-v2.0a48.zip

* delete both "LoadPlugin(...)" lines; they aren't needed if you placed your DLL's in the plugins folder as above. They have been "commented out" (prefixed w/ "#") in the original post.

* you need a video source: if your video is AVI, you need something like
CODE
# << Last = YV12, mod-8 >> (existing comment; add the following below or above)
AviSource("path to your video")

* if your video is not AVI, you need to use this:
CODE
# << Last = YV12, mod-8 >> (existing comment; add the following below or above)
DirectShowSource("path to your video")

* copy the image file (checkerboard-1x1x64.png) to your script folder.

* copy the following code to the end of your script if you don't see it there already (the original post has been updated)
CODE
##################################
function _uumod(int m, float f, bool "subtract")
{
   mult = Default(subtract, true) ? -1 : 1
   fsgn = Sign(f)
   i = Abs(Round(f))
   return fsgn * Max(0, i + mult * (i % m))
}

##################################
## hackish workaround for avs 2.58
function ConvertToY8(clip C)
{
   try {
       return C.ConvertToY8("Rec601")
   } catch (e) {
       return C.ConvertToYV12.Tweak(sat=0)
   }
}

##################################
## hackish workaround for avs 2.58
function ConvertToYV24(clip C)
{
   try {
       return C.ConvertToYV24("Rec601")
   } catch (e) {
       return C.ConvertToRGB24
   }
}
If you get other errors, please post the exact error. You can get it by going to VirtualDub's View menu, Log; right-click, Copy.

This post has been edited by raffriff42 on Apr 5 2014, 05:48 PM
 
     Top
RealDUB
Posted: Apr 5 2014, 11:46 PM


Member


Group: Members
Posts: 10
Member No.: 37844
Joined: 2-April 14



Thanks for clearing this up, I stayed on AviSynth 2.58 due to compatibility
issues with ukimenustah's effect, which didn't work with AviSynth 2.60
probably due to incorrect installation on my part. I was able to load the
64bit versions of the plugin and not the 32bit version, is it because I'm
using the 64bit version of Virtualdub?
 
     Top
raffriff42
Posted: Apr 6 2014, 12:06 AM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



I only tested on 32 bit. You can install both versions AFAIK.
Which plugin, masktools? It supports both 64 and 32 bit.

I prefer to keep most of my plugins in some other folder besides "Plugins" and load them explicitly with LoadPlugin("path"); this avoids loading unused plugins and possible compatibility issues.

If AddGrain is giving you trouble, bypass it by adding a do-nothing function
CODE
function AddGrain(clip C, float "var", float "hcorr", float "vcorr") {  
   return C
}
...you won't get the noise feature, but you didn't ask for that anyway tongue.gif
 
     Top
RealDUB
Posted: Apr 6 2014, 11:06 AM


Member


Group: Members
Posts: 10
Member No.: 37844
Joined: 2-April 14



Thanks for taking your time to work on this.
I'll let you know if I have problems in future, cheers.


EDIT:plugins and code are working fine, thanks.
I realized that the "dots" stop "crawling" after 1000 frames for a 29.97fps video,
did I miss out something?
 
     Top
raffriff42
Posted: Apr 6 2014, 12:41 PM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



QUOTE (RealDUB @ Apr 6 2014, 11:06 AM)
plugins and code are working fine, thanks.
I realized that the "dots" stop "crawling" after 1000 frames...

Great, thanks for your follow up.
Re: 1000 frames, oops. Make this change:
dotsrc=ImageSource("checkerboard-1x1x64.png", fps=Framerate).Loop
 
     Top
RealDUB
Posted: Apr 6 2014, 12:49 PM


Member


Group: Members
Posts: 10
Member No.: 37844
Joined: 2-April 14



Cool, confirmed working. Thanks again.
I've PMed you the Betacam script, it looks a lot
simpler compared to your code, probably because
it was aimed at simulating just Betacam and not VHS.

I imagine that the rainbowing artifact is very hard to
simulate, not sure if it's common on Betacam...
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
13 replies since Apr 2 2014, 11:58 PM Track this topic | Email this topic | Print this topic

<< Back to General Discussion