Log in

View Full Version : Unusual avisynth vhs effect script problem


Nic-154
19th June 2015, 17:45
Hiya, i have this problem on that virtualdubmod thinks i have forced yuv2 on it but i dont have, maybe some of you know a better soloution? i used format factory to convert the video, im useing this variation of the vhs script, someone is building on it

i do type in the files name of the avi i want, but then crashes.

https://www.youtube.com/watch?v=ny1nVXibozs you can download his package in the description.

raffriff42
19th June 2015, 20:34
If you want help with Avisynth scripts, please: post your actual script. Don't make people get a 290 MB Mega download (https://mega.co.nz/#!bUtXhDBR!gKtnvxoyCKpZXNxZve1TmCtd__gwNzZDL0-6WrWjt5k)
:script:

And if you want help with VirtualdubMod errors, go to the Options menu, select Show Log, then right-click in the Log window, Copy to Clipboard. Then paste the log into your forum post. If you are using Virtualdub, it's under the View menu, Log.
:logfile:

EDIT now that the download has completed, I see it's basically the same as this script [YouTube] (https://www.youtube.com/watch?v=osUvH8PRk3g), [Mediafire, 40 MB] (http://www.mediafire.com/download/8crcc3pe23ezcem/AVISynth+VHS+Effect+v13.3.3.zip), but it includes VirtualDub 1.9.11, Avisynth 2.58, DiVX, XViD, and something called "npp.6.6.7" along with "DyVision Video Tape Emulator DEMO" and 190 MB of sample videos.

Nic-154
19th June 2015, 21:13
you mean like copying the whole script as how i have it currently?

raffriff42
19th June 2015, 21:16
Yes, exactly as you have it please.

Nic-154
19th June 2015, 21:43
#AviSynth Editing Script File - Made for AVISynth v2.58 (Might or might not work on other versions.)

#Drag this file into VirtualDub window.
#Commands in CAPITALS have notes/tips below.

#Please read the "README - TUTORIAL" document included in the 14 package of VHS effect with AVISynth

#If AVISOURCE below gives an error, use DirectShowSource or better yet, convert it into H.264/AVC or MPEG-4/ASP instead.
#Important! The video must contain an Audio stream, unless you want to use custom audio!

#== VIDEO INPUT ==#

#SOURCEVIDEO: Your raw footage in AVI format (It should be encoded in H.263, H.264/AVC or MPEG-4/ASP)
#Note: You can omit file path if it is in the same folder as this file.

SOURCEVIDEO=AVISOURCE("PatiMat.avi").bilinearresize(392,480)


loss=imagesource("mask\hsync_%03d.bmp",end=127).assumefps(2500,100).loop(1000)

#ADDBORDERS of (32,20,32,20) is between title safe and action safe.
#use (8,0,8,0) for full image area. (4:3 Aspect Ratio source)
#use (8,80,8,80) for widescreen. (16:9 Aspect Ratio source)
original=converttorgb32(sourcevideo).LEVELS(0,1,255,4,200).ADDBORDERS(8,80,8,80).changefps(2500,100)
originalaudio=killvideo(sourcevideo)


#== GREYSCALE ==#

grey1=greyscale(original).bilinearresize(288,480).blur(-1,1).bicubicresize(400,480)
grey2=pointresize(grey1,800,480).crop(0,0,799,480).addborders(1,0,0,0).bilinearresize(400,480)

hsyncloss1=mergeARGB(showgreen(loss),showblue(loss),showblue(loss),showblue(loss)).pointresize(400,480)
hsyncloss2=invert(hsyncloss1,"A")
greysync1=layer(grey1,hsyncloss1)
greysync2=layer(grey2,hsyncloss2)
grey=overlay(greysync1,greysync2,mode="add",opacity=1).converttoyv12


#== COLOR ==#

#ADDBORDERS: How off-set is the chroma channel from luma (X,Y,0,0) X=Horizontally, Y=Vertically (Both Even Number)
colorinputu=original.bilinearresize(100,480).blur(1,0).bilinearresize(400,480).ADDBORDERS(4,2,0,0)

#For PAL - SECAM colour (No Tinting, removes blue tint)
colorinputv=colorinputu


colorlossu=mergeARGB(showred(loss),showblue(loss),showblue(loss),showblue(loss)).pointresize(400,480)
colorlossv=trim(colorlossu,32,0)

coloru=layer(colorinputu,colorlossu).converttoyv12
colorv=layer(colorinputv,colorlossv).converttoyv12
color=mergechroma(coloru,colorv,0.5).coloryuv(gain_y=-256, cont_u=128, cont_v=128)


#== AUDIO ==#

#You can disable the options by putting # at the beginning of the commands below.
#If you want to use VHS sound please read the README - TUTORIAL document.

#Important! If you want to keep the audio untouched, use this instead:
#vidaudio=originalaudio


#For External audio, in case you can do an 70s mono or 80s Hi-fi tape effect, which can be more realistic, IMPORTANT! Use 11025 for mono and 22500 for Hi-fi (VHS pre-Hi-fi had sample rate from 100Hz to 10kHz, Hi-fi improved this with 10Hz to 20kHz)
#vidaudio=wavsource("").resampleaudio(22500)

#Use this to extract the original audio [VirtualDub: File -> Save WAV...]
#RETURN original


#== FINALIZING ==#

player=BLANKCLIP(length=60, color=$2222DD, fps=25.00, CHANNELS=1, AUDIO_RATE=22500).converttoyv12
#BLANKCLIP: Important! Set CHANNELS to 2 if your audio us stereo or keep it at 1 CHANNEL if your audio is mono.
#BLANKCLIP: Important! Change AUDIO_RATE to 22500 for stereo or 11025 if you use mono.


#Use this if you use External Audio
finalaudio=vidaudio


noise=avisource("noise-preprocess.avi").bilinearresize(400,480).loop(300)
finalsignal=overlay(grey, color, mode="add", opacity=1)
finalvideo=overlay(finalsignal, noise, mode="add", opacity=0.6).LEVELS(40,1,255,0,255).bilinearresize(640,480)
final=audiodub(finalvideo,finalaudio)


#== OUTPUT ==#
player+final


#If you don't want an OSD then disable these commands.
Subtitle("> JOUER",48,24,10,160,"VCR OSD MONO",36,$DDDDDD)
Subtitle(" LP SECAM",48,60,70,161,"VCR OSD MONO",36,$DDDDDD)
#SUBTITLE(" [HI-FI]",48,24,180,330,"VCR OSD MONO",36,$DDDDDD)
#SUBTITLE in caps: Disable it if you use mono audio.


#== PREVIEWING ==#

#SELECTEVERY(3 ,0,2)
#SELECTEVERY(3,0)
#SELECTEVEN

#SELECTEVEN or SELECTEVERY: Enable if you want a smooth VirtualDub preview if it is freezing periodically. DISABLE before saving as AVI!

raffriff42
19th June 2015, 21:56
SOURCEVIDEO=AVISOURCE("PatiMat.avi")Make sure "PatiMat.avi" exists in the same folder with the script. Or else, specify the complete file path (for example, "C:\Video\PatiMat.avi")


Subtitle(" LP SECAM",48,60,70,161,"VCR OSD MONO",36,$DDDDDD)Did you install (https://www.google.com/search?q=windows+install+font) the VCR OSD MONO font, included with the download?


(if you still have a problem, please remember to post your log file)

Nic-154
19th June 2015, 22:03
Yeah i did remember to install that and remember to put the video in the same folder with the script, but the program manages to crash before i can get to the log.

raffriff42
20th June 2015, 01:46
To make the problem as simple as possible, try adding the following 3 lines to your script at the very beginning: AVISOURCE("PatiMat.avi")
Info
__END__...and open it in VirtualdubMod. Can you see your video? If not, try changing "AVISOURCE" to "DirectShowSource" - does that make any difference?

Nic-154
20th June 2015, 02:20
you mean at the top of the script?

didnt help really, i stil get that force yuy2, it sems to say down in the line at virtualdubmod that it cant decompres it, do i need a specific converter for that? and i mean video converter.

raffriff42
20th June 2015, 02:38
If it crashes with no log, how do "get that force yuy2" :confused:

Nic-154
20th June 2015, 02:46
thats why its so unuseall, it loads fine for somereason in the log but crashes, im thinking its the converter i use, do you use any specific one for avisynth?

raffriff42
20th June 2015, 02:54
If VirtualDubMod can't decompress it, first try "DirectShowSource" instead of "AviSource."
If you can play the video normally in Media Player, DirectShowSource should open the file in Avisynth.

You might try VirtualDub 1.10.4 (https://sourceforge.net/projects/virtualdub/) - VirtualDubMod is over ten years old!

raffriff42
20th June 2015, 02:59
Is Avisynth installed correctly?
http://avisynth.nl/index.php/First_script

Nic-154
20th June 2015, 03:03
i used the following version of avisynth included in the folder wich said 258
and how is it possible to open it in normal virtualdub?

raffriff42
20th June 2015, 07:14
I'm not sure what you mean. Dragging the script into VirtualDub should "just work" if Avisynth has been installed correctly, assuming (as the page I linked mentions) you don't have codec configuration issues (if you do, here's a little help (http://www.codecguide.com/faq_playback_issues.htm))

Before continuing, you must be able to load this script successfully (meaning you can see the result without crashing or error messages) Versionand once that is working, tryAVISOURCE("C:\Video\example.avi") ## (replace with your actual video path)

Only after testing both these scripts successfully should you try this VHS Effect script.

This is a fairly advanced script. I feel that anyone trying to use it needs some basic Avisynth knowledge. To get that knowledge, I would suggest starting like I did: by going to the Avisynth wiki (http://avisynth.nl/index.php/Main_Page) and working through (reading and understanding) these 3 topics: Your first script (http://avisynth.nl/index.php/First_script), Getting started (http://avisynth.nl/index.php/Getting_started) and Script examples (http://avisynth.nl/index.php/Script_examples).

foxyshadis
20th June 2015, 08:38
I'm going to go out on a limb and guess that PatiMat.avi is YUY2, or that the avi decompressor you have installed for it is forcing YUY2 (maybe an old version of divx or some other codec?). You probably have some serious codec pack issues that will take a long time to recover from, but a good start is removing all codecs and starting fresh with nothing but LAV Filters and FFDshow-Tryouts. Unless you really, really have to, don't even try to compress anything in VirtualDub (let alone VDMod), use it just for testing and use Handbrake, MediaCoder, or MeGUI to do the actual encoding. That'll simplify things quite a bit and give you much higher quality compression.

A lot of people use difficult workflows that are 10 years out of date, just because they don't keep up. You don't have to join them just for the sake of a tutorial.

Nic-154
20th June 2015, 14:50
i do have solid video proof on that it worked before and that was virtualdubmod doing the job
https://www.youtube.com/watch?v=-846F5UO3zI thats from my channel.

Nic-154
20th June 2015, 21:56
Im pleased to say i got the vhs script working, i just dont have to use the pal emulation but the ntsc script.