EvilAsh25

EvilAsh25_sample_avisynth

Jun 1st, 2016
873
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ######################
  2. # Updated 5/17/2017
  3. # This is meant to be a starter script for using MPC-HC to capture with a PEXHDCAP
  4. # I currently use PEXHDCAP driver 1.1.0.140.7 with these settings: http://i.imgur.com/DG4RlHH.jpg
  5. # The Video Proc Amp tab: http://i.imgur.com/L6xdn9a.jpg
  6. ######################
  7. # Google Search for these plugins, you only need them for the PEXHDCAP.
  8. LoadPlugin("C:\avisynth\ColorMatrix.dll")
  9. LoadPlugin("C:\avisynth\ChromaShift.dll")
  10. #
  11. ######################
  12. # This function is used to fix the capturing from specifically the PEXHDCAP
  13. # You can tweak the levels a bit if you want to change the look.
  14. ######################
  15. function colorcorrection(clip c)
  16. {
  17. c
  18. # Fix the Chroma Shift that is caused by the PEXHDCAP
  19. ChromaShift(U=-2)
  20. ConvertToYV24()
  21. #Fix the Luma, it is off by 1 pixel
  22. MergeLuma(Crop(1,0,width-1,height).AddBorders(0,0,1,0))
  23. # Convert back so we are working in the correct colorspace
  24. ConvertToYUY2(matrix="Rec.709")
  25. # Adjust Gamma to more closely match a CRT TV and clamp the color levels to what the PEXHDCAP captures (16-235)
  26. Levels(0, 0.82, 255, 16, 235, coring=false)
  27. # Convert to the SD colorspace, the PEXHDCAP captures in the HD colorspace
  28. ColorMatrix(mode="Rec.709->Rec.601")
  29. }
  30. #
  31. ######################
  32. # This is the basic capture function for 240p material, it crops, resizes, and does a couple of minor adjustments.
  33. # cx = cropping px from the left side
  34. # cy = cropping px from the top
  35. # cw = width of game, used for cropping right side
  36. # w = final width to size to
  37. # s = amount to sharpen horizontally
  38. ######################
  39. function capture(clip c, float cx, float cy, int cw, int w, float s)
  40. {
  41. c
  42. h=2
  43. # Crop and Resize to the correct height (224*2)
  44. PointResize(cw, h*224 , cx, cy*h/2, cw, 224)
  45. #
  46. # Resize to the final Width
  47. BicubicResize(w, Height)
  48. # These can be adjusted to your liking, look them up on the Avisynth Wiki
  49. #Tweak(sat=1.05)
  50. Sharpen(s, 0.0)
  51. #
  52. }
  53. ######################
  54. # This function is for capturing 240p video (usually NES, SNES, Genesis) from a S-Video source (GV-USB2 etc..)
  55. # cx = cropping px from the left side
  56. # cy = cropping px from the top
  57. # cw = width of game, used for cropping right side
  58. # w = final width to size to
  59. # s = amount to sharpen horizontally
  60. ######################
  61. function captureSVID240(clip c, float cx, float cy, int cw, int w, float s)
  62. {
  63. c
  64. # Separate Fields, this creates 60fps video with half height
  65. ComplementParity.SeparateFields()
  66. # Double the Height to get back to original
  67. PointResize(Width, Height*2)
  68. # Crop and resize
  69. PointResize(cw, 448 , cx, cy, cw, 448)
  70. # Set the width
  71. BicubicResize(w, Height)
  72. # These can be adjusted to your liking, look them up on the Avisynth Wiki
  73. #Tweak(sat=1.05)
  74. Sharpen(s, 0.0)
  75. }
  76. #
  77. ######################
  78. # This is the main area where you adjust things.
  79. # Generally I copy/paste a new function then adjust cropping for that new game.
  80. # These functions assume the final game height is 448px.
  81. #####################
  82. #
  83. # Only use this with a PEXHDCAP
  84. colorcorrection()
  85. #
  86. # These functions are for a PEXHDCAP
  87. capture(33, 8, 644, 586, 0.3) #SNES
  88. #capture(60, 7, 622, 586, 0.3) #DW
  89. #capture(30, 8, 660, 586, 0.3) #SM64
  90. #capture(40, 12, 640, 586, 0.3) #LoZ
  91. #capture(40, 8, 640, 586, 0.3) #Z2
  92. #
  93. # Use this function if you have a GV-USB2 or Dazzle
  94. #captureSVID240(42, 16, 640, 586, 0.3) #SNES (ALTTP)
Add Comment
Please, Sign In to add comment