VideoHelp Forum
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 78
Thread
  1. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    I have a problem that I have some acceptable quality mpeg videos, but I noticed if you convert the videos to HD or FullHD in Sony Vegas, it becomes blurry. The text in the beginning becomes blurry, and the video itself later is blurry. Much more annyoing to watch than the original. I have attached both the original and the result.

    Can you help how I could upscale this? The tools I have at the moment: Avisynth 2,6, Vidcoder, MeGUI, and I have the x264.exe.
    Image Attached Files
    Quote Quote  
  2. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    There's a lot of jitter in your original mpg and upscaling it amplifies the jitter so i say it's best not to upscale it.
    I think,therefore i am a hamster.
    Quote Quote  
  3. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by johns0 View Post
    There's a lot of jitter in your original mpg and upscaling it amplifies the jitter so i say it's best not to upscale it.
    I need to upscale it to be able to upload it to Youtube. If I don't do that the end result will be blurry, as usual on Youtube in case of SD videos, even when watched in small window.
    Quote Quote  
  4. Something like this?

    Code:
    LWLibavVideoSource("Gambala cut2.mpg", cache=false, prefer_hw=2) 
    
    ColorMatrix(mode="rec.601->rec.709")
    Crop(10,0,-6,-0)
    QTGMC()
    Dehalo_alpha(rx=2.0, ry=1.0, darkstr=2.0, brightstr=2.0)
    SMDegrain(thsad=1000, tr=3, prefilter=4)
    
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720)
    aWarpSharp2(depth=5)
    CAS(0.5)
    
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1920, fheight=1080)
    aWarpSharp2(depth=5)
    CAS(0.5)
    
    prefetch(8)
    Tweak the settings to your liking.
    Image Attached Files
    Quote Quote  
  5. You have vegas set to blend deinterlace, that's a big reason it's so blurry
    Quote Quote  
  6. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by poisondeathray View Post
    You have vegas set to blend deinterlace, that's a big reason it's so blurry

    If I change to Interpolate fields, the outcome is blurry and jagged, if I leave it on None, the result is very good, the text is sharp, it looks like properly upscaled, as if watching the original but in big dimensions, however the interlacing lines are there at certain moments.
    Quote Quote  
  7. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post
    Something like this?

    Code:
    LWLibavVideoSource("Gambala cut2.mpg", cache=false, prefer_hw=2) 
    
    ColorMatrix(mode="rec.601->rec.709")
    Crop(10,0,-6,-0)
    QTGMC()
    Dehalo_alpha(rx=2.0, ry=1.0, darkstr=2.0, brightstr=2.0)
    SMDegrain(thsad=1000, tr=3, prefilter=4)
    
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720)
    aWarpSharp2(depth=5)
    CAS(0.5)
    
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1920, fheight=1080)
    aWarpSharp2(depth=5)
    CAS(0.5)
    
    prefetch(8)
    Tweak the settings to your liking.
    How do you use this script? You load it to AVSPmod, save to .d2v and add that to x264.exe, right?

    I also noticed that your video lacks the letter box, but why? The original is not that aspect ratio. The image looks good, though.
    Last edited by Bencuri; 23rd Apr 2024 at 18:11.
    Quote Quote  
  8. You can open the script directly with x264.exe. The original is obviously anamorphic16:9.
    Quote Quote  
  9. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post
    You can open the script directly with x264.exe. The original is obviously anamorphic16:9.
    Sorry, I messed up the process with the steps from an older project, where I needed to use Dgmpgdec. I confused that with AVSPMod. I remember now the latter is to check the script, the other is for making the d2v file.

    But when I do so to test the script, I get some errors:

    1. "LWLibavVideoSource does not have a named argument "prefer_hw"

    2. "There is no function named KNLMEANSCL" -SMDegrain.avsi- -> this one is installed in the plugin folders though, so it strange to report an error
    Quote Quote  
  10. Originally Posted by Bencuri View Post
    1. "LWLibavVideoSource does not have a named argument "prefer_hw"
    Must be a version difference. Just remove that argument. Or use Mpeg2Source() rather than LWlibavVideoSource().

    Originally Posted by Bencuri View Post
    2. "There is no function named KNLMEANSCL" -SMDegrain.avsi- -> this one is installed in the plugin folders though, so it strange to report an error
    Make sure you have the MSVC 2019 redistributable package:
    https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170
    Quote Quote  
  11. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by Bencuri View Post
    1. "LWLibavVideoSource does not have a named argument "prefer_hw"
    Must be a version difference. Just remove that argument. Or use Mpeg2Source() rather than LWlibavVideoSource().

    Originally Posted by Bencuri View Post
    2. "There is no function named KNLMEANSCL" -SMDegrain.avsi- -> this one is installed in the plugin folders though, so it strange to report an error
    Make sure you have the MSVC 2019 redistributable package:
    https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170
    Installed the latest one but no difference.

    I noticed that there is a new version of SMDegrain available, too, however after I installed it, AVSPMod didn't even start. It reported an Avisynth error.

    I have Windows 7 anyway maybe that causes the issues?
    Quote Quote  
  12. I'm using version v4.5.0d.
    Quote Quote  
  13. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post
    I'm using version v4.5.0d.
    That is the version that I tried but makes AVSPMod to report Avisynth error when starting up.
    Quote Quote  
  14. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    By the way I noticed Vidcoder is also capable of doing a decent upscaling. Not as pristine as yours, but stays sharp, even when uploading to Youtube. The only problem is: both the original and the Vidcoder version is darkened by Youtube. For example all the details on the black suits on the people are gone, they look dark. When I upload your version it does not happen. Maybe is because the color code is incorrect in the Vidcoder version?
    Quote Quote  
  15. Make sure Vidcoder is set to output limited range rec.709.
    Quote Quote  
  16. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post
    Make sure Vidcoder is set to output limited range rec.709.
    I was busy recently but I am back. So the problem with Vidcoder is that I do not see any option to set the color code. But there is a parameters field on one of the panels, I guess to add special commands. However, I do not find any guide that describes the syntax and what to write there. The official guide lacks this information. If any of you knows what command to use I would be glad to learn about the method.

    Secondly, I thought it over and it would be good to have this video in the pristine version that you created. It would deserve to be converted in such a professional way. So I wondered how I could solve this issue with SMDegrain. I checked the Avisyth version, but it is 2.6.0 in my case, and that seems to be the latest available, so I guess that is not the cause of the issues. I also noticed that AVSPMod has a newer version, I downloaded it, but the same problem applies. Something wrong with SMDegrain. This is the error message:

    Image
    [Attachment 78624 - Click to enlarge]


    From the Microsoft addon, I installed this one (direct link): https://aka.ms/vs/17/release/vc_redist.x64.exe

    I have Windows 7 64 bit SP1. I wonder if it is compatibile at all with the SMDegrain version you use. As I said when I install the newest version of SMDegrain that you have, AVSPMod does't even open the script but reports Avisynth error, this one:

    Image
    [Attachment 78625 - Click to enlarge]


    In the Code on GITHUB, this is line 212: if (!isBool(LFR)) {
    But I am not sure if it is the same in my file becuase I copy pasted the content of the code to my SMDegrain.avsi. When I click download RAW file on GITHUB, the resulting code in the file is a mess, so I copy pasted instead. But notepad doesn't show line number.
    Last edited by Bencuri; 25th Apr 2024 at 10:15.
    Quote Quote  
  17. I'm using AviSynth+ version 3.7.3, 64 bit and 32 bit (both are installed).

    Version script:
    Code:
    Version()
    Image
    [Attachment 78626 - Click to enlarge]


    Color range options may be in the encoder (x264, x265, whatever) settings.

    KNLMeansCL: http://avisynth.nl/index.php/KNLMeansCL
    Quote Quote  
  18. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post

    Color range options may be in the encoder (x264, x265, whatever) settings.
    Unfortunately not. The manual says Vidcoder is based on Handbrake, but when I add the color code command of Handbrake it ignores that and the color code in the end is still 609.


    However I managed to advance now, I am at the very end of the script now, only Prefetch is causing issues. Which plugin contains that? I do not find.
    Quote Quote  
  19. Prefetch() is only for AviSynth+ multithreading. AviSynth MT uses SetMtMode() instead. Older versions of AviSynth don't support multithreading.
    Quote Quote  
  20. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post
    Prefetch() is only for AviSynth+ multithreading. AviSynth MT uses SetMtMode() instead. Older versions of AviSynth don't support multithreading.
    What value should I write at Prefetch for this processor?:
    https://ark.intel.com/content/www/us/en/ark/products/67355/intel-core-i5-3210m-process...-ghz-rpga.html
    Quote Quote  
  21. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    What value should I write at Prefetch for this processor?
    Your thread count; 4.

    Code is:

    Prefetch(4)
    Quote Quote  
  22. The optimal value depends on the particular script. But 4 is probably right for your CPU and that script. Just test a short encode with a few different values.
    Quote Quote  
  23. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post
    The optimal value depends on the particular script. But 4 is probably right for your CPU and that script. Just test a short encode with a few different values.
    If I install Avisynth+ besides the old Avisynth 2.6.0, will they clash, or they can be present parallelly and will work?
    Quote Quote  
  24. By the way, the darkstr and lightstr values for dehalong are too strong. Try 1.5. I had been playing with the values and forgot to lower them when I posted.
    Quote Quote  
  25. Originally Posted by Bencuri View Post
    If I install Avisynth+ besides the old Avisynth 2.6.0, will they clash, or they can be present parallelly and will work?
    I don't think that will work.
    Quote Quote  
  26. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by Bencuri View Post
    If I install Avisynth+ besides the old Avisynth 2.6.0, will they clash, or they can be present parallelly and will work?
    I don't think that will work.

    Removed the old Avisynth, installet Avisynth x64 to ProgramFiles(x86) -> that was the default folder the installer selected. Downloaded AVSPMod x64. This is the error message now:

    Image
    [Attachment 78631 - Click to enlarge]


    Line 1 is:
    Code:
    LWLibavVideoSource("Gambala cut2.mpg", cache=false)
    I have replaced LSMASHSource.dll with the x64 version. But I get the same error message.
    Quote Quote  
  27. The 64 bit LSMASHSource.dll should be in AviSynth+'s plugins64+ folder. It will autoload from there. Ie, you won't need to include LoadPlugin(...LSMASHShource.dll) in your scripts).
    Quote Quote  
  28. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Originally Posted by jagabo View Post
    The 64 bit LSMASHSource.dll should be in AviSynth+'s plugins64+ folder. It will autoload from there. Ie, you won't need to include LoadPlugin(...LSMASHShource.dll) in your scripts).
    It was avstp.dll. Not even mentioned in line 1, but after completely rebuilding my plugin folder with 100% 64 bit plugins, now your script works, having Avisynth+ installed. I can see the preview now.

    I have 2 more questios:

    1. As mentioned this is my processor: https://ark.intel.com/content/www/us/en/ark/products/67355/intel-core-i5-3210m-process...-ghz-rpga.html My GPU is Intel HD4000. Knowing this, can you suggest a parameter list for this setup? I still don't understand which parameters to choose for an optimal time/quality balance for this computer. I have x264.exe as mentioned, but I saw there is x265 already, don't mind downloading that, so if you can suggest something, recommend whichever version of the encoder you think is better in this case.

    2. Usually this computer converts slowly, but Sony Vegas is an exception. In Vegas you can choose the MainConcept AVC codec, that is slow as usual, but if you choose Sony AVC, it is same quality but fast. Even with this computer. The resorce usage setting is: Automatic. So theoretically it can use the GPU as well. I don't know if it is faster because of that indeed. But I wondered that besides the Prefetch command in the Avisynth script, can you do something else to be able to mimic the fast conversion capabilites of Vegas in Avisynth? Any commands that can make the process similarly fast?
    Quote Quote  
  29. Member
    Join Date
    Apr 2012
    Location
    Hungary
    Search PM
    Sorry, but still another question in connection with the script code:

    I did not notice the output is 50p. How can you make it stay 25p? 50p is fine but personally I prefer 25p for such old stuff.
    Quote Quote  
  30. You can change QTGMC() to QTGMC(FPSDivisor=2) to get 25p. But you will lose half the motion because your source is 25i (50 different fields per second), not 25p.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!