VideoHelp Forum




+ Reply to Thread
Page 2 of 3
FirstFirst 1 2 3 LastLast
Results 31 to 60 of 76
  1. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    maybe i've to use this?
    Code:
    video = Mpeg2Source("10-08-12 - IRIBTV4.d2v")
    audio = FFAudioSource("10-08-12 - IRIBTV4.mpg", track=-1, cache=True, cachefile="", adjustdelay=-1, utf8=False, varprefix="")
    m = AudioDub(video, audio)
    TFM(m)
    Stab(m, range=1,dxmax=4,dymax=4)
    Quote Quote  
  2. Member
    Join Date
    Dec 2005
    Location
    Finland
    Search Comp PM
    Originally Posted by hamidi2 View Post
    i use this script:
    Code:
    Mpeg2Source("10-08-12 - IRIBTV4.d2v")
    TFM()
    Stab(range=1,dxmax=4,dymax=4)
    video = Mpeg2Source("10-08-12 - IRIBTV4.d2v")
    audio = FFAudioSource("10-08-12 - IRIBTV4.mpg", track=-1, cache=True, cachefile="", adjustdelay=-1, utf8=False, varprefix="")
    AudioDub(video, audio)
    and get vibration back
    An AviSynth script always has an implicit variable called "last". So what happens here is you load your video, apply some processing to it, but then you load the video (and audio) again, and lose the earlier result.

    What you did in your later message again fixed the situation, as now TFM() and Stab() are applied to the result of AudioDub(). You can also apply filters directly to a clip like this (green text):

    Code:
    video = Mpeg2Source("10-08-12 - IRIBTV4.d2v").TFM().Stab(range=1,dxmax=4,dymax=4)
    
    audio = FFAudioSource("10-08-12 - IRIBTV4.mpg", track=-1, cache=True, cachefile="", adjustdelay=-1, utf8=False, varprefix="")
    
    AudioDub(video, audio)
    To illustrate how the "last" variable works, I have added it in grey text here (you would not normally type it in your script, but you can):

    Code:
    last = Mpeg2Source("10-08-12 - IRIBTV4.d2v")
    
    audio = FFAudioSource("10-08-12 - IRIBTV4.mpg", track=-1, cache=True, cachefile="", adjustdelay=-1, utf8=False, varprefix="")
    
    last = AudioDub(last, audio)
    
    return last
    Quote Quote  
  3. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    got it. thank u very much. u did a favor in helping me and if u didn't i couldn't resolve the problem.
    today, i setup conversion with your guides and come to work. night, i will check the result and will inform what happened.
    Quote Quote  
  4. Originally Posted by hamidi2 View Post
    maybe i've to use this?
    Code:
    video = Mpeg2Source("10-08-12 - IRIBTV4.d2v")
    audio = FFAudioSource("10-08-12 - IRIBTV4.mpg", track=-1, cache=True, cachefile="", adjustdelay=-1, utf8=False, varprefix="")
    m = AudioDub(video, audio)
    TFM(m)
    Stab(m, range=1,dxmax=4,dymax=4)
    In the last three lines you join audio and video to create a stream called m. You then apply TFM() to m. You then throw away the result of TFM() and create a new video from m using Stab(). Remember, when you don't specify a stream by name the name "last" is used. So those last three lines are equivalent to:

    Code:
    m = AudioDub(video, audio)
    last = TFM(m)
    last = Stab(m, range=1,dxmax=4,dymax=4)
    What you really want is:

    Code:
    m = AudioDub(video, audio)
    m = TFM(m)
    m = Stab(m, range=1,dxmax=4,dymax=4)
    return(m)
    or using the implied "last":

    Code:
    AudioDub(video, audio)
    TFM()
    Stab(range=1,dxmax=4,dymax=4)
    # implied return(last) at the end of the script
    So your full script should look like:

    Code:
    video = Mpeg2Source("10-08-12 - IRIBTV4.d2v")
    audio = FFAudioSource("10-08-12 - IRIBTV4.mpg", track=-1, cache=True, cachefile="", adjustdelay=-1, utf8=False, varprefix="")
    AudioDub(video, audio)
    TFM()
    Stab(range=1,dxmax=4,dymax=4)
    Quote Quote  
  5. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    yes, i used the same script and vibration eliminated. thx
    now, when i look at the result you got and the result i got, i see a great difference in quality between them. to visualize, i've included three snapshots, one of yours, one of mine and one of the original mpg. how could you reach this quality? the original video as well as my conversion has many noises which are eliminated in your conversion. i referred to the script you sent and found some other filters like Sharpen. but the parameters seem to be set by a professional. so i come here again to ask how can i make such a soft and smooth output?
    Image Attached Thumbnails Click image for larger version

Name:	vlcsnap-2015-10-26-23h07m41s065.png
Views:	198
Size:	376.4 KB
ID:	34235  

    Click image for larger version

Name:	vlcsnap-2015-10-26-23h07m57s875.png
Views:	215
Size:	362.4 KB
ID:	34236  

    Click image for larger version

Name:	vlcsnap-2015-10-26-23h08m09s795.png
Views:	208
Size:	625.0 KB
ID:	34237  

    Quote Quote  
  6. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    sure, but i probably don't need all of it. since i've to get involve with many plugins if i want to use the whole script, i prefer to use only the filter which caused the noises away.
    Quote Quote  
  7. Unfortunately, many of the steps removed some noise and smoothed out edges. The major noise reduction was from TemporalDegrain().

    Code:
    Mpeg2Source("D:\Downloads\sample.d2v", CPU2="ooooxx", Info=3)
    CPU2="ooooxx" reduces DCT ringing artifacts -- noise at high contrast edges created by MPEG encoding.

    Code:
    QTGMC(preset="fast")
    QTGMC reduces noise a little and smooths edges. Most of the other filters require the progressive frames from QTGMC or some other deinterlacer.

    Code:
    dehalo_alpha(rx=3, ry=1)
    Removes oversharpening halos and a little noise.

    Code:
    TemporalDegrain(SAD1=200, SAD2=150, Sigma=8)
    Major noise reduction.

    Code:
    Spline36Resize(width/2, height)
    Smooths edges, sharpens horizontally.

    Code:
    TurnLeft()
    nnedi3(dh=true)
    TurnRight()
    Restores frame size, keeping sharp edges.

    Code:
    aWarpSharp(depth=5)
    Smooths and sharpens edges.

    Code:
    Sharpen(0.2, 0.2)
    Sharpens everything a little.
    Quote Quote  
  8. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    thanks jagabo
    so u mean that it's better that i keep the whole script as is and don't alter or reduce any part?
    u mean that all the parameters are at their optimized values and i may use this script for all of my other conversions too? (unless Crop which is clip specific)
    i certainly don't know what values are the best, like SAD1, SAD2 & Sigma, since don't know what's the effect of these parameters, and if i change for example 0.2 for Sharpen will get it better or not.
    so please let me know whether these values and functions and the whole script should be fixed and this in the whole should be selected or they're dependent to the clip and should change?
    Last edited by hamidi2; 27th Oct 2015 at 00:52.
    Quote Quote  
  9. You first have to deinterlace the video. This video is film based so TFM() would normally work well. But the shaking makes it less effective, giving a blurry picture. QTGMC() will work much better -- it will give a sharper result. TemporalDegrain() is the major noise reduction filter I used. The arguments control how much noise reduction it performs. Bigger values give more noise reduction, smaller values less. I usually change them proportionally. So if you double SAD1 also double SAD2 and Sigma. It is motion compensated so you can use it before or after Stab().

    So start with:

    Code:
    QTGMC(preset="fast")
    TemporalDegrain(SAD1=200, SAD2=150, Sigma=8)
    Stab()
    You may find that good enough. If not, try some of the other filters I used. I gave you those descriptions so you have an idea what each filter does. In general with AviSynth filters bigger values give a stronger effect. Most filters come with documentation that spells out what each setting does and gives the default values.

    There are many other noise reduction filters you can try. See the list at avisynth.nl:

    http://avisynth.nl/index.php/External_filters#Denoisers

    Examine the scripts with VirtualDub or some other editor that lets you step frame by frame through the video. Change filter parameters one at a time to see what effect they have. You can use multiple instances of VirtualDub to view two scripts side by side. Or you can use Interleave() or StackHorizontal() two compare two different filter chains. Use VirtualDub's zoom option to enlarge details. Or use a screen magnifier like Windows built in Magnifier to zoom into detail.

    You should still encode short segments to see how they look in motion. Sometimes filters that look great when you examine still frames show terrible artifacts at normal playback speed. Don't filter an entire movie when you're experimenting. Use a short segment with a mix of still shots and motion shots, bright and dark scenes. You'll get much faster feedback. Use Trim() to select a section to experiment with. For example Trim(1000, 2000) will give you only frames 1000 through 2000, ignoring the rest of the video.
    Quote Quote  
  10. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    good notes, thx
    in brief, i need to have lots of experience to see what is really good and get familiar with what filters should be used when i watch a video.
    Quote Quote  
  11. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    i tried the original script. i added required plugins until i get:
    Code:
    RemoveGrain: invalid mode 20
    (QTGMC-3.33.avsi, line 764)
    (QTGMC-3.33.avsi, line 790)
    (QTGMC-3.33.avsi, line 614)
    couldn't resolve it.
    Quote Quote  
  12. I think you need a newer version of RemoveGrain. I see the AviSynth.nl page has four versions. Try 1.0b. I'm pretty sure that's the version I have. 1.0pre may work too.
    Quote Quote  
  13. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    thx resolved
    i wonder why u didn't include TFM in the script
    Quote Quote  
  14. If you use QTGMC() you don't need TFM(). As I pointed out earlier, TFM() didn't work well with this video because of the shaking.
    Quote Quote  
  15. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    ok
    now everything is ok and i began to convert the whole video with the script. i changed the Crop script into:
    Code:
    Crop(32,0,-10,-48)
    so that MPlayer delogo filter of Avidemux may have enough black space above the logo to perform a better delogo and crop the 56 black lines after applying this filter in the Avidemux.
    now it seems that the output i get from AvsPmod is a bit different from what i see in Avidemux. i don't know what's the problem. maybe the avsproxy_gui or the Avidemux itself. the colors alter to worse. it seems that the red element in them reduces. i'm depicting it by presenting a snapshot of both.
    Image Attached Thumbnails Click image for larger version

Name:	940806-avidemux.jpg
Views:	239
Size:	94.5 KB
ID:	34247  

    Click image for larger version

Name:	940806-avspmod.jpg
Views:	164
Size:	93.1 KB
ID:	34248  

    Quote Quote  
  16. The Avspmod image is showing the correct colors. The AviDemux image has a ~9 degree hue rotation, gamma and brightness changes. I see the same problem when viewing the original ts file in AviDemux. This appears to be simply a display problem in AviDemux. It doesn't effect its video processing.
    Quote Quote  
  17. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    you mean if the output generated by avidemux be played by vlc or something, it will have the color appeared in avspmod?
    Quote Quote  
  18. Originally Posted by hamidi2 View Post
    you mean if the output generated by avidemux be played by vlc or something, it will have the color appeared in avspmod?
    Yes. Try your short sample.

    I saw this as a fix:

    http://forum.doom9.org/showthread.php?t=137661

    But the version I'm using doesn't seem to have that option.
    Last edited by jagabo; 28th Oct 2015 at 11:00.
    Quote Quote  
  19. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    thanks for the link. i checked Video display of my avidemux and found that it doesn't contain SDL. i use version 2.5.6, since 2.6 is not yet complete.
    besides, i checked the output. you may wonder that they're different, not as much, but differ. it seems that my colors are whiter.
    in the following, i present three pics. one is the result of my processes, caused by avsproxy_gui and avidemux with the original script. one is the output you sent to me with the script. and one is the original input video.
    all snapshots got by vlc, not screenshot of avspmod or something.
    Image Attached Thumbnails Click image for larger version

Name:	940806-original.png
Views:	195
Size:	661.1 KB
ID:	34257  

    Click image for larger version

Name:	940806-your-output.png
Views:	190
Size:	370.6 KB
ID:	34258  

    Click image for larger version

Name:	940806-my-output.png
Views:	191
Size:	334.5 KB
ID:	34259  

    Quote Quote  
  20. The last image has gone through a PC to TV levels adjustment. You can do that in AviSynth with ColorYUV(levels="PC->TV"). But that isn't necessary for this video. I don't know where in your processing that incorrect levels adjustment was made. I'm not familiar with using AvsProxy with AviSynth. You might be able to work around the problem by adding ConvertToRGB() at the end of your AviSynth script.

    <edit>

    I installed AviDemux 2.5.6 and use AvsProxy to feed the AVS script to AviDemux and encoded with MPEG4 AVC. I didn't get any change in levels. What codec are you using?
    Last edited by jagabo; 28th Oct 2015 at 20:38.
    Quote Quote  
  21. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    x264
    Quote Quote  
  22. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    also please let me know the method you used to convert src mpg file into mkv while u didn't have avsproxy. what software read the avs script and fed to what software to convert?
    Quote Quote  
  23. I don't know if this will help... on the Output2 tab of AviDemux's x264 configuration dialog make sure that Full Range Samples is selected.

    I usually use the x264 cli encoder via a batch file to encode. I just drag/drop an AVS script onto the batch file. The batch file looks like:

    Code:
    start /b /low x264.exe --preset=slow --tune=film --crf=18 --sar=1:1 --output %1.mkv %1
    @pause >nul
    "start /b /low" starts the program at low priority so it doesn't hog up CPU time. You need to specify the full path to x264.exe if it's not in Windows' search path. I put a copy of x264.exe in C:\Windows so I don't have to specify the full path. I edit the encoding parameters to suit the particular video. You can also put the batch file in your Send To folder. Then you can right click on any AVS script and select Send To -> (name of batch file). But it's a little harder to edit the batch file in your Send To folder. This does not include audio. Pause is there so the cli windows stays open when encoding is done -- so I can see the log:

    Click image for larger version

Name:	cli.png
Views:	146
Size:	35.5 KB
ID:	34262

    You can find info about most of the parameters here:
    https://en.wikibooks.org/wiki/MeGUI/x264_Settings
    Quote Quote  
  24. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    thx 4 the info about x264 and how 2 use it. I think it's not applicable in this case, since all filters are not in the scripts and i use delogo and crop again in avidemux. I'm going 2 use ConvertToRGB and hope it will resolve the problem.
    Quote Quote  
  25. There are delogo filters for AviSynth too. And for VirtualDub.

    I tried ConvertToRGB with AviProxy and it rejected it.
    Quote Quote  
  26. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    I searched for delogo for avisynth b4. But could'nt work with it. As i remember parameters were not as easy to set.
    Quote Quote  
  27. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    I tried ConvertToRGB() and it didn't work here too. It suggests to use ConvertToYV12() instead. I tried it and the colors didn't change.
    Quote Quote  
  28. The video was already YV12 throughout the entire script.

    Try using no filters in AviDemux, just compress the video. Do you get the same levels changes? Maybe the delogo filter (or some other filter) is causing the problem. Look to see if there are PC vs. TV levels settings.

    I tried AviDemux's delogo filter here and got no levels changes.

    Another possibility is that you just have a playback issue -- ie, the player is using different levels for that file for some reason.
    Last edited by jagabo; 30th Oct 2015 at 06:08.
    Quote Quote  
  29. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    i use vlc to play the video. going to check avidemux with no filter...
    u mean the original snapshot has true colors?
    ...
    i did conversion without use of avsproxy directly from mpg to mkv by avidemux. it seems that vlc when snapshots from an mkv file it changes its colors and when snapshots from an mpg file it doesn't. the following is the image i got from this mkv:
    Image Attached Thumbnails Click image for larger version

Name:	940808 - original converted to mkv by avidemux with no filter.png
Views:	263
Size:	420.3 KB
ID:	34264  

    Last edited by hamidi2; 30th Oct 2015 at 09:46.
    Quote Quote  



Similar Threads

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