Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
7th March 2023, 18:53 | #1 | Link | ||
Registered User
Join Date: Feb 2015
Posts: 31
|
AviSynth+ Doubling the video lenght?
Hi,
I've been using an AviSynth+ script without any errors for 2 years. However, since February 2023, it has been increasing the video length a lot. For example, a 2-hour video is being delivered as a 4-hour video. Interestingly enough, I have noticed that this problem of doubling the video length does not occur in videos shorter than 1 hour. I "guess" that it's not the AviSynth+ script that's causing the issue, but rather a Windows update on my Windows 10. I'm using LSMASHVideoSource to open the file in AviSynth+. Please, Does someone know why it is happening? Have you faced a similar problem? More details about my PC features, Windows data, and AviSynth+ Script are available below: Quote:
Quote:
AviSynth+ SCRIPT THAT I'M USING: Code:
SetMemoryMax(1024) SetFilterMTMode("MT_SERIALIZED", 3) Loadplugin("m:\temp2\mvtools2.dll") LoadPlugin("m:\temp2\CNR2_x64.dll") LoadPlugin("M:\Temp2\LSMASHSource.dll") LoadPlugin("M:\Temp2\RgTools.dll") LoadPlugin("M:\Temp2\MPEG2DecPlus64.dll") Import("M:\Temp2\Zs_RF_Shared.avsi") Import("M:\Temp2\LSFMod.avsi") Import("M:\Temp2\SetMTMode.avsi") ####Source=mpeg2source("D:\Paulo Medeiros Junior 19-7-18\dvd\17 dvd e 09 8mm.d2v") ####Source=AVISource("D:\Bolshoi\Lote 02\L02-18 4capt V7800LGPANSVHDMI c TBC Ok.avi") ####Source=DirectShowSource("D:\Valdir Steglich 21.2.22\08 Valdir vhs V17JVCES10 Ok.m2t") v = LSMASHVideoSource("D:\Bolshoi\Lote 02\L02-45 2capt V19LGPANSVHDMI.mp4", track=0, threads=0, seek_mode=0, \ seek_threshold=10, dr=False, fpsnum=0, fpsden=1, \ format="YUV420P8", decoder="", prefer_hw=0, ff_loglevel=0) a = LSmashAudioSource("D:\Bolshoi\Lote 02\L02-45 2capt V19LGPANSVHDMI.mp4") Source=AudioDub(v,a) #Source=DirectShowSource("E:\Carol 18.11.20 - Fazer\03 CA V17JVCES10.mp4", fps = 25, ConvertFPS = True ) #.Crop(0,0-0,-30,true) # para AVI encapsulado AVI Xvid da Avermidia #Source=DirectShowSource ("E:\Pricilla 3.9.20 - Fazer CM\01 PR V17JVCES10.mp4", fps = 25, ConvertFPS = True ) ##Source=DirectShowSource("E:\Decio 1.3.21 - Fazer\02 Decio 6 capt VPAN2JVCES10DV.avi") SetFilterMTMode("DEFAULT_MT_MODE", 2) #Conditionalmedian(source,mthres=16,mwidth=7,mheight=5,mp=11,interlaced=true) #ConditionalDenoise(source,mthres=16,mwidth=7,mheight=5,mp=11,p1=24,p2=12,interlaced=true) #bob(0,0.5) chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS output=MDegrain2i2(chroma,8,2,0) stackhorizontal(source,output) return output #------------------------------- function MDegrain2i2(clip source, int "blksize", int "overlap", int "dct") { Vshift=0 # 2 lines per bobbed-field per tape generation (PAL); original=2; copy=4 etc Hshift=0 # determine experimentally overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker fields=source.SeparateFields() # separate by fields #This line gets rid of vertical chroma halo. Don't use unless you have the problem #fields=MergeChroma(fields,crop(fields,Hshift,Vshift,0,0).addborders(0,0,Hshift,Vshift)) super = fields.MSuper(pel=2, sharp=1) backward_vec2 = super.MAnalyse(isb = true, delta = 2, blksize=blksize, overlap=overlap, dct=dct) forward_vec2 = super.MAnalyse(isb = false, delta = 2, blksize=blksize, overlap=overlap, dct=dct) backward_vec4 = super.MAnalyse(isb = true, delta = 4, blksize=blksize, overlap=overlap, dct=dct) forward_vec4 = super.MAnalyse(isb = false, delta = 4, blksize=blksize, overlap=overlap, dct=dct) #Increase thSAD for more denoising. Won't do much beyone about 1500 MDegrain2(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=1500) Prefetch(16) Weave() } Thank you so much! Last edited by NLPguy; 7th March 2023 at 18:57. |
||
7th March 2023, 20:07 | #2 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,691
|
The only slightly odd thing I see is the fpsnum=0 setting when you open the video. I'm not sure what that does.
If you put the output video into MediaInfo, what fps does it report? Is everything playing in slow motion? Or, is it playing at normal speed and the video repeats twice? What application are you using to read the AVISynth script, and how does that application save the video? That may be where the problem is. |
8th March 2023, 01:48 | #3 | Link | ||||
Registered User
Join Date: Feb 2015
Posts: 31
|
Hi john,
Quote:
Quote:
After the video's real-time ends, it starts duplicating without any audio. And yes, it repeats twice. Quote:
Logarith Lossless Codec V1.3.27 64 bits, but the same thing happens with MagicYUV lossless V.1.2rev2 64 bits. MediaInfo: Quote:
|
||||
8th March 2023, 10:04 | #4 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
|
mediainfo sees your file which has been encoded 2 days ago as MPEG-4AVC in VFR with AAC, no Largarith nor MagicYUV.
Is that your source ? A sample of the source would be helpful. What happens if you try LWLibavVideoSource and reduce the script to only Code:
v=LWLibavVideoSource("D:\Bolshoi\Lote 02\L02-45 2capt V19LGPANSVHDMI.mp4") a=LWLibavAudioSource("D:\Bolshoi\Lote 02\L02-45 2capt V19LGPANSVHDMI.mp4") AudioDub(v,a)
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 8th March 2023 at 10:13. |
10th March 2023, 16:03 | #5 | Link | ||
Registered User
Join Date: Feb 2015
Posts: 31
|
Quote:
Hi Emulgator, When I run the script in 30,000 it works with the old LSMASHSource.dll version of 07/20/2020 but with the new version of 02/19/2023, it does not work. Unfortunately, I have to use 60,000 as my various VHS tapes are very oxidized and they have many horizontal lines. Moreover, I'm using 60,000 because the tracking of the image has better quality and especially because the speed of the video images is fast. I mean, the videos show people moving a lot cause they are all about ballerinas dancing in dance events. Thanks in advance for your help! Code:
v = LWLibavVideoSource("D:\Bolshoi\Lote 02\L02-23 3capt V7800LGPANSVHDMI.mp4", format="YUV420P8", fpsnum=0) #\ cache=true, cachefile="source.lwi" seek_mode=0, seek_threshold=10, #\ dr=false, fpsnum=0, fpsden=1, repeat=false, dominance=0) #\ format="YUV420P8", decoder="", prefer_hw=0, ff_loglevel=0) a = LWLibavAudioSource("D:\Bolshoi\Lote 02\L02-23 3capt V7800LGPANSVHDMI.mp4", stream_index=-1, cache=true, \av_sync=false, layout="", rate=0, decoder="") AudioDub(v,a) Below, it is the Mediainfo details of the last video: Quote:
Last edited by NLPguy; 10th March 2023 at 16:10. |
||
10th March 2023, 18:50 | #6 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
|
If VHS capturing: There are lots of guides here.
I suggest to take the source VHS tape framerate as-is, matching the settings of capturing device to the source video system. If you force non-matching settings, you will capture wrong. If Brazil, then extra consideration. I remember Brazil using the hybrid PAL-M (PAL color carrier, but NTSC frame properties) so I am expecting 29.97i fps (525 timing lines, 480 picture lines). Level were different too, I remeber to have seen elevated black pedestal and white at lower levels. If capture device has no setting "PAL-M" then you would capture in setting "NTSC", and correct levels later in Avisynth. If the result is for archival and to be kept interlaced, encode as 4:2:2 and you are done. If the result is for playback on progressive OLED/LCD screens: You may want to use QTGMC. This gives your desired 59.94 fps progressive frames, these you may encode as you wish.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 10th March 2023 at 19:04. |
Thread Tools | Search this Thread |
Display Modes | |
|
|