VideoHelp Forum
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 71
Thread
  1. Hi i cant seem to deinterlace this DVD properly, any help/guidance would be kindly appreciated. After deinterlacing I would like to convert it to 24fps

    https://easyupload.io/y2yag4
    Quote Quote  
  2. The standard inverse telecine is 29.97 to 23.976 fps.
    Quote Quote  
  3. Originally Posted by ProWo View Post
    The standard inverse telecine is 29.97 to 23.976 fps.
    I have tried many different modes on Hybrid to deinterlace it but they all still show up with interlaced at places.

    I haven't tried the frame conversion yet as can't fix the deinterlaced first.
    Quote Quote  
  4. Check this out.
    All done in two steps.
    Image Attached Files
    Quote Quote  
  5. Looks to me like a poorly converted PAL -> NTSC source, so

    Code:
    ffms2("VTS_01_1.VOB", cache=false)
    AssumeTFF()
    yadifmod2(mode=1) #or a bobber of your choice
    sRestore(frate=25.0)
    Image Attached Files
    Last edited by Sharc; 29th Sep 2023 at 12:46. Reason: File attached
    Quote Quote  
  6. Sharc is right. That type of conversion is very common.

    Code:
    Mpeg2Source("VTS_01_1.d2v", CPU2="ooooxx", Info=3) 
    QTGMC() # to 59.94p
    SRestore() #discard blended frames, to 25p
    Crop(10,58,-6,-58)
    Image Attached Files
    Quote Quote  
  7. Thanks guys. Really appreciate this as I have alot of these dvds done by same company and they all messed up exactly like the sample.

    I'm trying to open the vob on avisynth for 1st time and i cant open it on avsPmod.

    this is what i get:

    Image
    [Attachment 74084 - Click to enlarge]
    Quote Quote  
  8. You have to build the index file with DgIndex. You also need to have the MPEG2Source filter.

    http://avisynth.nl/index.php/DGDecode

    That includes both.

    Newer builds of MPEG2Source don't include the CPU2 filters. Just delete that argument.

    Code:
    Mpeg2Source("VTS_01_1.d2v", Info=3)
    Quote Quote  
  9. Newer builds of MPEG2Source don't include the CPU2 filters. Just delete that argument.
    Okay followed your step and it finally opens up now.

    # to 59.94p
    #discard blended frames, to 25p
    I don't know how to do these above quotes. I've tried googling it up and finding answers before asking here again but I cant figure it out. Sorry guys, I'm trying to learn as much as possible!
    Quote Quote  
  10. Those are just comments telling you what those two filters are doing. QTGMC converts the 29.97 fps interlaced video to 59.94 fps progressive. Then SRestore() converts that 59.94 fps progressive to 25 fps progressive by removing the blended frames.
    Quote Quote  
  11. Originally Posted by jagabo View Post
    Those are just comments telling you what those two filters are doing. QTGMC converts the 29.97 fps interlaced video to 59.94 fps progressive. Then SRestore() converts that 59.94 fps progressive to 25 fps progressive by removing the blended frames.
    Oh I understand now. Thanks Jagabo.

    okay i want to add the audio to this too. Also how can i keep the original aspect ratio of 2.35 ?
    and do I convert it to 24fps after its been converted to 25fps ?
    Quote Quote  
  12. Originally Posted by Akuma786 View Post
    okay i want to add the audio to this too.
    The running of the video hasn't changed so you can keep the original audio tracks (mux them when you encode the new video, or as a separate step in MkvToolnix). If you want to edit and/or re-encode the audio you can include it in your script and use an encoder that support video and audio:

    Code:
    a = LWlibavAudioSource("VTS_01_1.VOB", stream_index=2) # get audio (decompressed to PCM)
    v = Mpeg2Source("VTS_01_1.d2v", Info=3) # get video
    AudioDub(v,a) # join audio and video together
    QTGMC() # to 59.94p
    SRestore() #discard blended frames, to 25p
    Crop(10,58,-6,-58)
    Originally Posted by Akuma786 View Post
    Also how can i keep the original aspect ratio of 2.35 ?
    I specified the sampling aspect ratio when I encoded. This makes the player resize to a 2.35:1 aspect ration during playback. If you have a player that doesn't respond to SAR flags you can resize to a 2.35:1 frame size and encode as square pixel (SAR=1:1):

    Code:
    a = LWlibavAudioSource("VTS_01_1.VOB", stream_index=2) # get audio (decompressed to PCM)
    v = Mpeg2Source("VTS_01_1.d2v", Info=3) # get video
    AudioDub(v,a) # join audio and video together
    QTGMC() # to 59.94p
    SRestore() #discard blended frames, to 25p
    Crop(10,58,-6,-58) # after this cropping you have a 704x364 frame
    Spline36Resize(856, 364) # 364 * 2.35 = 855.4, round up to 856 for a mod 8 width
    Originally Posted by Akuma786 View Post
    and do I convert it to 24fps after its been converted to 25fps ?
    You can slow the video with AssumeFPS(). That will require slowing the audio too. AssumeFPS() can slow the audio as well as the video but it does so by changing the sampling rate. You'll probably want to convert the resulting sampling rate to a standard rate (ie, back to 48,000 Hz) using SSRC():

    Code:
    a = LWlibavAudioSource("VTS_01_1.VOB", stream_index=2) # get audio (decompressed to PCM)
    v = Mpeg2Source("VTS_01_1.d2v", Info=3) # get video
    AudioDub(v,a) # join audio and video together
    QTGMC() # to 59.94p
    SRestore() #discard blended frames, to 25p
    Crop(10,58,-6,-58) # after this cropping you have a 704x364 frame
    Spline36Resize(856, 364) # 364 * 2.35 = 855.4, round up to 856 for a mod 8 width
    AssumeFPS(24000, 1000, sync-audio=true) # audio sample rate reduced from 48000 to 46080 (lossless)
    SSRC(48000) # convert audio to 48000 Hz samples
    Quote Quote  
  13. Last script above encoded with ffmpeg batch file:

    Code:
    Start /b /low "ffmpeg" "G:\program files\ffmpeg64\bin\ffmpeg.exe" -y -benchmark -init_hw_device qsv=hw -filter_hw_device hw -v verbose ^
        -i %1 ^
        -c:v libx264 -preset slow -crf 18 -g 50 ^
        -colorspace smpte170m -color_trc smpte170m -color_primaries smpte170m -color_range tv ^
        -acodec ac3 -ab 256K ^
        "%~dpn1.avc.mkv"
    Image Attached Files
    Quote Quote  
  14. Originally Posted by jagabo View Post
    Originally Posted by Akuma786 View Post
    okay i want to add the audio to this too.
    The running of the video hasn't changed so you can keep the original audio tracks (mux them when you encode the new video, or as a separate step in MkvToolnix). If you want to edit and/or re-encode the audio you can include it in your script and use an encoder that support video and audio:

    Code:
    a = LWlibavAudioSource("VTS_01_1.VOB", stream_index=2) # get audio (decompressed to PCM)
    v = Mpeg2Source("VTS_01_1.d2v", Info=3) # get video
    AudioDub(v,a) # join audio and video together
    QTGMC() # to 59.94p
    SRestore() #discard blended frames, to 25p
    Crop(10,58,-6,-58)
    Originally Posted by Akuma786 View Post
    Also how can i keep the original aspect ratio of 2.35 ?
    I specified the sampling aspect ratio when I encoded. This makes the player resize to a 2.35:1 aspect ration during playback. If you have a player that doesn't respond to SAR flags you can resize to a 2.35:1 frame size and encode as square pixel (SAR=1:1):

    Code:
    a = LWlibavAudioSource("VTS_01_1.VOB", stream_index=2) # get audio (decompressed to PCM)
    v = Mpeg2Source("VTS_01_1.d2v", Info=3) # get video
    AudioDub(v,a) # join audio and video together
    QTGMC() # to 59.94p
    SRestore() #discard blended frames, to 25p
    Crop(10,58,-6,-58) # after this cropping you have a 704x364 frame
    Spline36Resize(856, 364) # 364 * 2.35 = 855.4, round up to 856 for a mod 8 width
    Originally Posted by Akuma786 View Post
    and do I convert it to 24fps after its been converted to 25fps ?
    You can slow the video with AssumeFPS(). That will require slowing the audio too. AssumeFPS() can slow the audio as well as the video but it does so by changing the sampling rate. You'll probably want to convert the resulting sampling rate to a standard rate (ie, back to 48,000 Hz) using SSRC():

    Code:
    a = LWlibavAudioSource("VTS_01_1.VOB", stream_index=2) # get audio (decompressed to PCM)
    v = Mpeg2Source("VTS_01_1.d2v", Info=3) # get video
    AudioDub(v,a) # join audio and video together
    QTGMC() # to 59.94p
    SRestore() #discard blended frames, to 25p
    Crop(10,58,-6,-58) # after this cropping you have a 704x364 frame
    Spline36Resize(856, 364) # 364 * 2.35 = 855.4, round up to 856 for a mod 8 width
    AssumeFPS(24000, 1000, sync-audio=true) # audio sample rate reduced from 48000 to 46080 (lossless)
    SSRC(48000) # convert audio to 48000 Hz samples
    Thank you so much jagabo.

    I've tried your code all working except the audio is incomplete for the whole duration of dvd. Im guessing it's because I've only added 1 vob file for line 1:
    a = LWlibavAudioSource("D:\DVD'S\THE_LOOT\VIDEO_TS\VTS _01_1.VOB", stream_index=2) # get audio (decompressed to PCM)

    Also the dvd has 3 audio tracks. How can I keep all 3 ?
    Last edited by Akuma786; 29th Sep 2023 at 19:29.
    Quote Quote  
  15. File Type: mkv VTS_01_1.VOB.avc.mkv (27.04 MB, 2 views)
    This looks awesome.
    Quote Quote  
  16. Originally Posted by Akuma786 View Post
    Also how can i keep the original aspect ratio of 2.35 ?
    By the way, instead of cropping the black borders off and resizing to square pixels you could leave the black borders intact (i.e. as on DVD) and watch it as 16:9. Every player I know of can play video as 16:9.
    Last edited by Sharc; 30th Sep 2023 at 02:50.
    Quote Quote  
  17. Originally Posted by Sharc View Post
    Originally Posted by Akuma786 View Post
    Also how can i keep the original aspect ratio of 2.35 ?
    By the way, instead of cropping the black borders off and resizing to square pixels you could leave the black borders intact (i.e. as on DVD) and watch it as 16:9. Every player I know of can play video as 16:9.
    Oh yeah your right. Thanks

    Virtualdub keeps crashing after few minutes into rendering. I cant seem to get this issue fixed. No matter what scripts I use it will crash at some point.

    Its same thing Processing thread has not cycled for 30 seconds. Possible livelock.
    Image
    [Attachment 74104 - Click to enlarge]


    Also CPU usage is only 25% when running script on virtualdub 2.
    Last edited by Akuma786; 30th Sep 2023 at 04:45.
    Quote Quote  
  18. Chkdsk X: /f
    (where X is the drive letter, where your videos are stored)
    Quote Quote  
  19. Originally Posted by ProWo View Post
    Chkdsk X: /f
    (where X is the drive letter, where your videos are stored)
    This is what i get after running it:
    Image
    [Attachment 74110 - Click to enlarge]
    Quote Quote  
  20. Originally Posted by Akuma786 View Post
    Originally Posted by ProWo View Post
    Chkdsk X: /f
    (where X is the drive letter, where your videos are stored)
    This is what i get after running it:
    Image
    [Attachment 74110 - Click to enlarge]
    All ok
    Quote Quote  
  21. I've tried everything so far but can't get avisynth to complete anything 100%.

    Can the scripts be run on any other software besides virtualdub 2?
    Quote Quote  
  22. Originally Posted by Akuma786 View Post
    File Type: mkv VTS_01_1.VOB.avc.mkv (27.04 MB, 2 views)
    This looks awesome.
    I forgot that I had modified the script from which that file was made. It included some other noise reduction and sharpening. So you won't get exactly the same thing when you render the earlier script.

    Originally Posted by Akuma786 View Post
    I've tried your code all working except the audio is incomplete for the whole duration of dvd. Im guessing it's because I've only added 1 vob file for line 1:
    a = LWlibavAudioSource("D:\DVD'S\THE_LOOT\VIDEO_TS\VTS _01_1.VOB", stream_index=2) # get audio (decompressed to PCM)
    Yes. Instead of importing audio from the VOB file you can import from the AC3 file(s) that DgIndex produced. That will include the audio for the full VOB sequence it indexed.

    Originally Posted by Akuma786 View Post
    Also the dvd has 3 audio tracks. How can I keep all 3 ?
    I don't know how to do this all at once. You could just modify the script to open one of the audio files then render it. Then repeat for the next audio file. Etc. Then finally mux all three audio files with the video.

    Originally Posted by Akuma786 View Post
    Virtualdub keeps crashing after few minutes into rendering. I cant seem to get this issue fixed. No matter what scripts I use it will crash at some point.
    Does it always happen at the same point with a given script? That might indicate a problem with the source. If it happens a different times that might indicate an overheating problem.

    Originally Posted by Akuma786 View Post
    Also CPU usage is only 25% when running script on virtualdub 2.
    By default AviSynth+ runs single threaded. To use more threads add Prefetch(N) to the end of your script. Where N is the number of threads to use. Try the number of cores your CPU has.
    Quote Quote  
  23. Does it always happen at the same point with a given script? That might indicate a problem with the source. If it happens a different times that might indicate an overheating problem.
    At different times always.

    By default AviSynth+ runs single threaded. To use more threads add Prefetch(N) to the end of your script. Where N is the number of threads to use. Try the number of cores your CPU has.
    I will try this now. Thanks
    Quote Quote  
  24. Some other things you can try to diagnose the lockup:

    Instead of encoding try File -> Run Video Analysis Pass. That will read through the entire script without encoding anything. If that locks up it indicates an AviSynth problem, not an encoding problem.

    Try different audio and video codecs in VirtualDub. Or different encoding programs like the x264 CLI encoder or ffmpeg. See post #13 for an example using ffmpeg.

    Monitor your CPU temperatures with Core Temp while encoding; to make sure your CPU isn't overheating.

    https://www.alcpu.com/CoreTemp/
    Quote Quote  
  25. Instead of encoding try File -> Run Video Analysis Pass. That will read through the entire script without encoding anything. If that locks up it indicates an AviSynth problem, not an encoding problem.
    Tried this, it crashes with same fault showing up.
    Quote Quote  
  26. Or different encoding programs like the x264 CLI encoder or ffmpeg. See post #13 for an example using ffmpeg.
    My knowledge of FFMPEG is also very weak. This is what i tried copying your code into command prompt:
    Image
    [Attachment 74112 - Click to enlarge]
    Quote Quote  
  27. Oops, get rid of the qsv options on the first line: "-init_hw_device qsv=hw -filter_hw_device hw". And maybe "-hwaccel dxva2" too.

    Note that command line is supposed to go in a batch file. Then you drag/drop an AVS script onto the batch file to encode that script.

    Originally Posted by Akuma786 View Post
    Instead of encoding try File -> Run Video Analysis Pass. That will read through the entire script without encoding anything. If that locks up it indicates an AviSynth problem, not an encoding problem.
    Tried this, it crashes with same fault showing up.
    That means the problem in in AviSynth, not the encoding program.
    Quote Quote  
  28. Your next step would be to try removing parts of the script until you find what's causing the lockup. The most likely culprits would probably be QTGMC and SRestore.
    Quote Quote  
  29. One culprit for hanging with QTGMC is an old avstp.dll version . If you don't have it in your plugins directory , that' s not the answer. If you do, replace with 1.0.4.1
    https://github.com/pinterf/AVSTP/releases

    Another culprit is old mvtools2 version. Update to newest one if you haven't already
    https://github.com/pinterf/mvtools/releases
    Quote Quote  
  30. Originally Posted by poisondeathray View Post
    One culprit for hanging with QTGMC is an old avstp.dll version . If you don't have it in your plugins directory , that' s not the answer. If you do, replace with 1.0.4.1
    https://github.com/pinterf/AVSTP/releases

    Another culprit is old mvtools2 version. Update to newest one if you haven't already
    https://github.com/pinterf/mvtools/releases
    This has fixed the issue I was having with Avisynth. I'm now able to export the script without any issues. Thank you so much guys for all your help.

    I forgot that I had modified the script from which that file was made. It included some other noise reduction and sharpening. So you won't get exactly the same thing when you render the earlier script.
    @Jagabo - Can i have this part of the script too please. I really like the quality of the picture on your sample.
    Quote Quote  



Similar Threads

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