VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 51 of 51
Thread
  1. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Originally Posted by jagabo View Post
    Remember you can return the state of processing or any stream at some intermediate point in the script to check the filtering:

    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    SetFilterMTMode("QTGMC", 2)
    v = AVISource("F:\Video Clip.avi")
    vid1 = v.trim(0,119200).AssumeTFF().AssumeFPS(25).QTGMC(preset="Slow", matchpreset="Slow", matchpreset2="Slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true)
    vid2 = v.trim(119201,120637).AssumeTFF().AssumeFPS(25).TFM(pp=0).ChangeFPS(50)
    vid3 = v.trim(120638,132580).AssumeTFF().AssumeFPS(25).QTGMC(preset="Slow", matchpreset="Slow", matchpreset2="Slow", sourcematch=3, Lossless=2, TR2=2, EdiThreads=2, border=true)
    vid1 ++ vid2 ++ vid3
    return(vid1) # or vid2, vid3, or last (the output of vid1++vid2++vid3)
    Trim(0,132580)
    Prefetch(5)
    Well that's interesting! return(vid1) plays as normal, but vid2 and vid3 just displays the last frame of the video, so that explains the silence.. as that last frame that plays for another 44 minutes is mute. Very strange.

    Originally Posted by poisondeathray View Post
    for yadifmod2 you need to specify the actual arguments - it would be yadifmod2(order=1, mode=1) because the arguments are in different position (yadif is mode, order; but yadifmod2 is order, field, mode) . So yadifmod2(1,1) is actually order=1,field=1,mode=0 , which is single rate

    Check each of vid1, vid2 and vid3 individually, and separately as jagabo suggested. I think you're mixing up frame numbers

    What is the fps and framecount of "Video clip.avi" as read by AVISource ?

    AVISource("F:\Video Clip.avi")
    info()
    Ah i see, that's sorted it now. Playing back in MPC-HC sync is fine, still goes mute at the moment TFM was applied and stays like that, as before.
    Quote Quote  
  2. If you play

    AVISource("F:\Video Clip.avi")
    TFM()

    Is it "mute?"


    Something is wrong with your vid2 and vid3, perhaps the frame number references, or the video itself - maybe seek problems with AVISource . What kind of AVI is it ? What does mediainfo say about it ?

    (And a 10x speedup for AVS classic MT x86 , vs. AVS+ MT x64 is "not typical" ; likely there were other issues, such as memory bottlenecks, caching, page file . In the absence of bottlenecks you might expect ~20-50% faster . Still faster, but not 1000% faster)
    Quote Quote  
  3. My guess is he derived the trim values looking at a QTGMC'd version of the video (which has twice as many frames). But the trims are made on the source video. So all the trims after the first are beyond the end of the source video. Hence the single frame, the last frame of the video. That is why I asked how many frames there are in v.
    Quote Quote  
  4. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Originally Posted by poisondeathray View Post
    If you play

    AVISource("F:\Video Clip.avi")
    TFM()

    Is it "mute?"


    Something is wrong with your vid2 and vid3, perhaps the frame number references, or the video itself - maybe seek problems with AVISource . What kind of AVI is it ? What does mediainfo say about it ?

    (And a 10x speedup for AVS classic MT x86 , vs. AVS+ MT x64 is "not typical" ; likely there were other issues, such as memory bottlenecks, caching, page file . In the absence of bottlenecks you might expect ~20-50% faster . Still faster, but not 1000% faster)
    It's not mute, but the sound is failing to keep up with the video, going very stuttery, almost like it might be a problem with the video itself. The original source is MP4 but i converted it to Lagarith Lossless AVI in Virtualdub to get the video to load properly in Avisynth. Though it always renders and plays fine with just QTGMC on, but still had to trim out the frozen frame problem at the end. Perhaps i'd get better results without decompressing the video and loading the original MP4, i just got used to using AVISource i guess, as it seemed easier to work with. Having played the AVI file back it plays twice as fast whilst the sound plays normal before the video stops midway through and sound continues.. so that's what has been causing all the issues i think.

    Tried loading the original MP4 using LSmash, and no more end of frame problem, the video ends where it should, but all sound is mute now. How do i enable the audio?

    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    v = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4")
    LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    vid1 = v.trim(0,119200).AssumeTFF().AssumeFPS(25).yadifmod2(order=1, mode=1) 
    vid2 = v.trim(119201,120637).AssumeTFF().AssumeFPS(25).TFM(pp=0).ChangeFPS(50)
    vid3 = v.trim(120638,132580).AssumeTFF().AssumeFPS(25).yadifmod2(order=1, mode=1) 
    vid1 ++ vid2 ++ vid3
    Prefetch(5)
    Quote Quote  
  5. You can use AudioDub()

    eg.
    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    vid = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4")
    aud = LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    v = AudioDub(vid,aud)
    vid1 = v.trim(0,119200).AssumeTFF().AssumeFPS(25).yadifmod2(order=1, mode=1) 
    vid2 = v.trim(119201,120637).AssumeTFF().AssumeFPS(25).TFM(pp=0).ChangeFPS(50)
    vid3 = v.trim(120638,132580).AssumeTFF().AssumeFPS(25).yadifmod2(order=1, mode=1) 
    vid1 ++ vid2 ++ vid3
    Prefetch(5)
    Quote Quote  
  6. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Originally Posted by poisondeathray View Post
    You can use AudioDub()

    eg.
    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    vid = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4")
    aud = LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    v = AudioDub(vid,aud)
    vid1 = v.trim(0,119200).AssumeTFF().AssumeFPS(25).yadifmod2(order=1, mode=1) 
    vid2 = v.trim(119201,120637).AssumeTFF().AssumeFPS(25).TFM(pp=0).ChangeFPS(50)
    vid3 = v.trim(120638,132580).AssumeTFF().AssumeFPS(25).yadifmod2(order=1, mode=1) 
    vid1 ++ vid2 ++ vid3
    Prefetch(5)
    Playing it back, but sound is going out of sync.
    Quote Quote  
  7. Does original go out of sync ? Ignore what it looks like

    Code:
    vid = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4")
    aud = LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    AudioDub(vid,aud)
    Quote Quote  
  8. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    The video is playing very speedy now, but sound is playing at normal speed.
    Quote Quote  
  9. We already know that LSMASHVideoSource() misinterprets the field rate as the frame rate. Just add .AssumeFPS(25) at the end of the first line.
    Quote Quote  
  10. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Originally Posted by jagabo View Post
    We already know that LSMASHVideoSource() misinterprets the field rate as the frame rate. Just add .AssumeFPS(25) at the end of the first line.
    Thanks, playing normally now. I'll render it all and see how it turns out.
    Quote Quote  
  11. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    The video rendered all 44 minutes, but then just froze on the batch file, so never finalised itself, thus no encoded file at the end.
    Quote Quote  
  12. I don't know why your encoding locked up but... 44 minutes at 25 fps is 66000 frames. As I suspected, your trim numbers are all wrong.
    Quote Quote  
  13. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Your right, i'll need to amend the trims, as AvsPmod is now reporting 265162 frames.
    Quote Quote  
  14. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Well the encode keeps freezing up at frame 133293, which i assume is the maximum number of frames of the video (accounting for becoming 50 progressive frames to emulate the smooth playback of simultaneous interlaced fields) No idea were to put the trims to apply the TFM, as it corresponds far beyond the number of frames in the AvsPmod preview, about frame 238180.

    Curiously AvsPmod reports it being 1 hour and 28 minutes long, when the video is only 44 minutes long.
    Last edited by Master Tape; 22nd Jan 2020 at 10:38.
    Quote Quote  
  15. Is the original video ok as decoded by Lsmash? Check return v . Seek in mpchc or avspmod. Check the framecount

    Code:
    vid = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4").AssumeFPS(25)
    aud = LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    AudioDub(vid,aud)
    Are you using current lsmash version ? some older versions might have problems
    https://github.com/HolyWu/L-SMASH-Works/releases


    You can see the frame numbers in avspmod in the status bar (current and total). Check each part individually for framecount. Seek to each part individually. You don't have to waste time encoding anything (preview in avspmod or mpchc) . If the script is ok, then maybe something else is wrong like the encoder (I doubt it)

    Do a new set of trims. Add the Trims afterwards @50fps so you know exactly what you're getting

    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    vid = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4").AssumeFPS(25)
    aud = LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    v = AudioDub(vid,aud)
    vid1 = v.yadifmod2(order=1, mode=1) 
    vid2 = v.TFM(pp=0).ChangeFPS(50)
    vid1.trim(start1,end1) ++ vid2.trim(start2,end2) ++ vid3.trim(start3,end3)
    Prefetch(5)
    "vid1" is double rate deinterlaced version .
    "vid2" is a TFM version then duplicated frames .

    use return vid1 to get the reference frame numbers for your trims for start1,end1 , start3, end3 (replace those with the actual values)
    use return vid2 to get the reference frame numbers for your trims for start2,end2 (replace those with the actual values)

    If it's ok in avspmod or mpchc, change yadifmod2 with qtgmc and encode
    Quote Quote  
  16. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Originally Posted by poisondeathray View Post
    Is the original video ok as decoded by Lsmash? Check return v . Seek in mpchc or avspmod. Check the framecount

    Code:
    vid = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4").AssumeFPS(25)
    aud = LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    AudioDub(vid,aud)
    Total framecount is 13305.

    Are you using current lsmash version ? some older versions might have problems
    https://github.com/HolyWu/L-SMASH-Works/releases
    Have updated to most recent version.

    You can see the frame numbers in avspmod in the status bar (current and total). Check each part individually for framecount. Seek to each part individually. You don't have to waste time encoding anything (preview in avspmod or mpchc) . If the script is ok, then maybe something else is wrong like the encoder (I doubt it)

    Do a new set of trims. Add the Trims afterwards @50fps so you know exactly what you're getting

    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    vid = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4").AssumeFPS(25)
    aud = LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    v = AudioDub(vid,aud)
    vid1 = v.yadifmod2(order=1, mode=1) 
    vid2 = v.TFM(pp=0).ChangeFPS(50)
    vid1.trim(start1,end1) ++ vid2.trim(start2,end2) ++ vid3.trim(start3,end3)
    Prefetch(5)
    "vid1" is double rate deinterlaced version .
    "vid2" is a TFM version then duplicated frames .

    use return vid1 to get the reference frame numbers for your trims for start1,end1 , start3, end3 (replace those with the actual values)
    use return vid2 to get the reference frame numbers for your trims for start2,end2 (replace those with the actual values)

    If it's ok in avspmod or mpchc, change yadifmod2 with qtgmc and encode
    Ok used "vid1" then "vid2" to note the reference frames, then added them via the trims. But now getting a "I don't know what "vid3" means" error.

    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    vid = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4").AssumeFPS(25)
    aud = LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    v = AudioDub(vid,aud)
    vid1 = v.yadifmod2(order=1, mode=1) 
    vid2 = v.TFM(pp=0).ChangeFPS(50)
    vid1.trim(0,237937) ++ vid2.trim(238285,240660) ++ vid3.trim(240710,264590)
    Prefetch(5)
    Shouldn't it be vid1, vid2 then back to vid1 in the trims? Since there's no vid3 in the initial deinterlaced lines.
    Quote Quote  
  17. Yes,
    vid1.trim(0,237937) ++ vid2.trim(238285,240660) ++ vid1.trim(240710,264590)
    Quote Quote  
  18. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Video is out of sync with audio. There must be some sort of glitch being caused somehow. The audio plays for it's actual duration, but somehow the video plays for 1 hour 28 minutes, without looking too abnormal. Very odd.
    Quote Quote  
  19. Is that with QTGMC ? or yadifmod2 ? Slow hardware can cause the preview to go out of sync, but if script is ok, encode should be ok

    what about vid1 and vid2 each separately ? out of sync ? What about with each with the trims ?
    Quote Quote  
  20. Originally Posted by Master Tape View Post
    Originally Posted by poisondeathray View Post
    Is the original video ok as decoded by Lsmash? Check return v . Seek in mpchc or avspmod. Check the framecount

    Code:
    vid = LSMASHVideoSource("F:\HDD\New Volume\150914-2138.mp4").AssumeFPS(25)
    aud = LSMASHAudioSource("F:\HDD\New Volume\150914-2138.mp4")
    AudioDub(vid,aud)
    Total framecount is 13305.
    Typo ? 13305 frames @ 25 FPS would be 8 minutes +

    Was that mp4 the original , original source? What does mediainfo (view=>text) say about it ?
    Quote Quote  
  21. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Originally Posted by poisondeathray View Post
    Is that with QTGMC ? or yadifmod2 ? Slow hardware can cause the preview to go out of sync, but if script is ok, encode should be ok

    what about vid1 and vid2 each separately ? out of sync ? What about with each with the trims ?
    I think it's a problem with LSMASH, switched back to AVISource and it came out fine. Now i remember why i stopped using LSMASH in the first place, it never plays nice with Avisynth, more trouble than it's worth.
    Quote Quote  



Similar Threads