+ Reply to Thread
Results 31 to 60 of 67
-
In the sample video I did this and it joined the talking segment and wrestling segment into 1 video without problem so how is it putting the pieces back together incorrectly?:
Code:trim(0, 465). Tweak(Hue=-0, Sat=1.0, Bright=0, Cont=1.0, Coring=False) ++trim(466,694). Tweak(Hue=-0, Sat=1.0, Bright=0, Cont=1.0, Coring=False)
-
Yes, your code worked. But it is only using one filter. It's going to get very ugly with the full QTGMC, MvTools, Reinterlace sequence. At least break that out into a separate function. Then you can call it with a much cleaner looking:
Code:Trim(...).ChangeSpeed()++Trim(...)++Trim(...).ChangeSpeed()
Code:Trim(...).ChangeSpeed()\ ++Trim(...)\ ++Trim(...).ChangeSpeed()\ ++Trim(...)\ ++Trim(...).ChangeSpeed()\ etc.
-
Poisondeathray - I've got it working with the below code. Annoyingly it doesn't work in multi-threaded. Anyway, you said to slow down the audio you used: TimeStretch(rate=83.41666667) Soundout(). So do I just use that code in the parts that are playing too fast? How do I import the AC3 file so I can do the timestretch?
Code:Main=Mpeg2Source("E:\2 = New\SpeedUp.d2v", CPU=6) Main Trim(0,300) McTemporalDenoise(settings="medium", interlaced=true) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) Vinverse() RemoveSpots() AddGrainC(var=1.0,uvar=1.0) SeparateFields() SelectEvery(4,0,3) Weave() A=last Main Trim(301,465) McTemporalDenoise(settings="medium", interlaced=true) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) Vinverse() RemoveSpots() AddGrainC(var=1.0,uvar=1.0) SeparateFields() SelectEvery(4,0,3) Weave() B=last Main Trim(466,694) McTemporalDenoise(settings="medium", interlaced=true) AssumeFPS(25) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) source=last super = source.MSuper(pel=2) backward_vec = MAnalyse(super, overlap=4, isb = true, search=3) forward_vec = MAnalyse(super, overlap=4, isb = false, search=3) source.MFlowFps(super, backward_vec, forward_vec, blend=false, num=60000, den=1001) AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() C=last A++B++C
-
I would join the audio separately. You can use various methods
eg
https://forum.videohelp.com/threads/213080-Join-AC3-files
ie. Take the audio from section C using the timestretch script and using Trim() to mark the start/end points, or use an audio editor to slow it down , join them with one of the methods in the thread above
To import audio only in an avs script you can use NicAC3Source() , or FFAudioSource() . If there is an audio delay , don't forget to add that (it should be written in the name)
To cut audio you can use delaycut
Alternatively , you can specify audio with each section in the script by using AudioDub() , but this means you re-encode the entire audio (lose quailty in all the sections instead of just 1) -
There are inconsistencies in your script. You don't have "." between some of the filter calls . I don't know if that was a copy/paste error
-
I didn't have a period because my scripts worked fine without them. I'm still a bit confused about what I'm supposed to be doing to only slow down the audio on 1 section of the video. I've got this so far. I get the following error "no audio found in clip"
Code:Main=Mpeg2Source("E:\2 = New\SpeedUp.d2v", CPU=6) NicAC3Source("E:\2 = New\SpeedUp T80 2_0ch 256Kbps DELAY 0ms.ac3") Main Trim(0,300) # McTemporalDenoise(settings="medium", interlaced=true) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) Vinverse() RemoveSpots() AddGrainC(var=1.0,uvar=1.0) SeparateFields() SelectEvery(4,0,3) Weave() A=last Main Trim(301,465) # McTemporalDenoise(settings="medium", interlaced=true) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) Vinverse() RemoveSpots() AddGrainC(var=1.0,uvar=1.0) SeparateFields() SelectEvery(4,0,3) Weave() B=last Main Trim(466,694) # McTemporalDenoise(settings="medium", interlaced=true) AssumeFPS(25) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) source=last super = source.MSuper(pel=2) backward_vec = MAnalyse(super, overlap=4, isb = true, search=3) forward_vec = MAnalyse(super, overlap=4, isb = false, search=3) source.MFlowFps(super, backward_vec, forward_vec, blend=false, num=60000, den=1001) AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() TimeStretch(rate=83.41666667) Soundout() C=last A++B++C
-
Code:
vid=Mpeg2Source("E:\2 = New\SpeedUp.d2v", CPU=6) aud=NicAC3Source("E:\2 = New\SpeedUp T80 2_0ch 256Kbps DELAY 0ms.ac3") AudioDub(vid,aud) Main=last . . .
-
Note the bold-faced frame numbers. You ended one trim with one frame and began the next with the same one. You increased the total frame count by one, probably something you didn't intend. I suppose it was meant as an example since your Tweak settings do nothing, but still...
-
OK so this is my test example what I've got so far. Is that correct? When I load my script I see 3 SoundOut popups. Should I just save an AC3 file of every file? Then what do I do because I need to join them again?
Should I just use the TimeStretch(rate=83.41666667) Soundout() text on the parts that I want slowed down and Soundout() on parts that already play fine?
Code:vid=Mpeg2Source("E:\2 = New\SpeedUp.d2v", CPU=6) aud=NicAC3Source("E:\2 = New\SpeedUp T80 2_0ch 256Kbps DELAY 0ms.ac3") AudioDub(vid,aud) Main=last Main Trim(0,300) # McTemporalDenoise(settings="medium", interlaced=true) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) Vinverse() RemoveSpots() AddGrainC(var=1.0,uvar=1.0) SeparateFields() SelectEvery(4,0,3) Weave() Soundout() A=last Main Trim(301,465) # McTemporalDenoise(settings="medium", interlaced=true) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) Vinverse() RemoveSpots() AddGrainC(var=1.0,uvar=1.0) SeparateFields() SelectEvery(4,0,3) Weave() TimeStretch(rate=83.41666667) Soundout() B=last Main Trim(466,694) # McTemporalDenoise(settings="medium", interlaced=true) AssumeFPS(25) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) source=last super = source.MSuper(pel=2) backward_vec = MAnalyse(super, overlap=4, isb = true, search=3) forward_vec = MAnalyse(super, overlap=4, isb = false, search=3) source.MFlowFps(super, backward_vec, forward_vec, blend=false, num=60000, den=1001) AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() TimeStretch(rate=83.41666667) Soundout() C=last A++B++C
-
Take out all instances of soundout. Soundout is for encoding audio through avisynth
If you include audio in the script, you can feed the avs into an encoder that accepts avs scripts .
Or you can use 1 soundout() at the very end of the script, after A++B++C
Timestretch should only be used for part C, not part B (I'm assuming C is the only "bad" part) -
I'm confused. In your early post you said "To slow down audio, you can use various audio editors e.g. audacity, timestretch in avisynth with soundout". So that's what I'm doing but now you're saying to not use SoundOut.
If I just use TimeStretch then it won't fix the audio. I thought the whole idea of this was to do both the video and audio fixes in the script? I'm aware that I'll probably have to re-encode the audio, that's fine but I just need to know what I'm supposed to do. -
Erase all instances of soundout , keep timestretch only for part C, add soundout() to the end after A++B++C . This will give you 1 audio (joined)
If you didn't want to use soundout to encode audio, you can comment out soundout and use that avs script as input into another audio encoder.
This is more damaging than if you cut the AC3, and only encode part C. Then join the original A and B
Does that make sense ? -
Why is SoundOut needed? I have a similar script and audio is passed through properly without using it (though it's only stereo).
There's another way to approach this, maybe a little more straight forward:
Code:src = WhateverSource() norm = FilterSequenceA(src) slow = FilterSequenceB(src) Trim(slow,...)++Trim(norm,...)++Trim(slow,...)
-
-
I've recently decided to re-encode this video. Sorry I had to upload the whole thing so you can see the problem, I tried to make it small so it's around 250MB.
I had it working before where the fast video and audio sections were slowed down to normal speed. However when I tried to re-encode the original video again, the script is not working correctly. I set the trims so that the 1st and 3rd part of the video is slowed down and the middle part is left alone. Everything is fixed apart from the middle part which was fine to begin with but now it plays slower. What did I do wrong in my script?
Code:vid=Mpeg2Source("E:\Fast Video (ECW Oct 19 1999).d2v", CPU=6) aud=NicAC3Source("E:\Fast Video (ECW Oct 19 1999).ac3") AudioDub(vid,aud) Main=last Main Trim(0,28787) # This part needs the audio and video slowed down AssumeFPS(25) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) source=last super = source.MSuper(pel=2) backward_vec = MAnalyse(super, overlap=4, isb = true, search=3) forward_vec = MAnalyse(super, overlap=4, isb = false, search=3) source.MFlowFps(super, backward_vec, forward_vec, blend=false, num=60000, den=1001) AssumeTFF().Vinverse().RemoveSpots().AddGrainC(var=1.0,uvar=1.0).SeparateFields().SelectEvery(4, 0, 3).Weave() TimeStretch(rate=83.41666667) A=last Main Trim(28788,39486) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) Vinverse() RemoveSpots() AddGrainC(var=1.0,uvar=1.0) SeparateFields() SelectEvery(4,0,3) Weave() B=last Main Trim(39487,74379) # This part needs the audio and video slowed down AssumeFPS(25) AssumeTFF() QTGMC(Preset="Super Fast", sharpness=0.7) source=last super = source.MSuper(pel=2) backward_vec = MAnalyse(super, overlap=4, isb = true, search=3) forward_vec = MAnalyse(super, overlap=4, isb = false, search=3) source.MFlowFps(super, backward_vec, forward_vec, blend=false, num=60000, den=1001) AssumeTFF().Vinverse().RemoveSpots().AddGrainC(var=1.0,uvar=1.0).SeparateFields().SelectEvery(4, 0, 3).Weave() TimeStretch(rate=83.41666667) C=last A++B++C SoundOut() # Once you've saved the audio you can comment this line out to prevent it asking you to save the audio every time you refresh the script in AvsPmod filtered=Tweak(Hue=-10, Sat=0.7, Coring=False) ReplaceFramesSimple(last,filtered,Mappings="[0 9857]") filtered=Tweak(Sat=0.7, Coring=False) ReplaceFramesSimple(last,filtered,Mappings="[9858 29050]") filtered=Tweak(Sat=0.6, Coring=False) ReplaceFramesSimple(last,filtered,Mappings="[29051 74379]") ColorYUV(off_u=3, off_v=-0) ConvertToRGB32(interlaced=true). RGBAdjust(1.0, 0.95, 1.05). Converttoyv12(interlaced=true) Crop(18,0,-0,-4) AddBorders(18,2,16,2, $000000)
-
That script doesn't work with that video because the last frame number on line 47 "Mappings="[29051 74379]" is larger than the number of frames in the video. Replace 74379 with 74377.
If you had looked at the error message AviSynth returned you would have seen this.Last edited by jagabo; 1st Aug 2013 at 20:24.
-
74377 is the last frame. Maybe some of the time stretching functions have changed a little?
-
Ok it looks like when I re-encoded the video for uploading that a couple of frames were removed. Anyway, do you know how to fix the problem where the middle part of the video is slowed down instead of staying at the speed it originally was?
-
The middle part of the video isn't sped up here. Are you sure you're looking at the right part of the video? Remember, part A is longer than it originally was so part B starts later than it originally did -- around frame 34511 rather than 28788.
Last edited by jagabo; 1st Aug 2013 at 21:27.
-
In the video I uploaded the middle part plays fine but when I use the script I posted it slows down the middle part for some reason. Yes I'm sure the frame numbers are correct.
-
So the middle part is fine before I used my script. After I used my script is slows down the middle part for some reason. How can I prevent that?
-
The script is doing exactly what you're telling it to do. The problem is, and I told you this before, your trims are in the wrong places. In the pair of lines that reads:
Code:Main Trim(28788,39486) # This is 16 minutes - 21 mins 57 secs. It does NOT need to be slowed down.
Code:Main.Invert Trim(28788,39486) # This is 16 minutes - 21 mins 57 secs. It does NOT need to be slowed down.
Last edited by jagabo; 28th Aug 2013 at 11:18.
-
I don't understand that because when I load my script in AvsPmod the start and end trims are trimming the exact sections that I want slowed down? Yet when the video is encoded it's not slowing down the correct sections. Here are the the trims and trim times and also I've shown the times in the video with no script. What am I doing wrong?
1st Part (needs slowed down): Trim(0,28787) # 0 - 16 minutes (0 - 13 minutes 21 secs in the video before the script sees it)
2nd Part (does NOT need slowed down): Trim(28788,39486) # 16 minutes - 21 mins 57 secs (13 minutes 21 secs - 18 minutes 46 secs in the video before the script sees it.
3rd Part (needs slowed down): Trim(39487,74377) # 21 minutes 57 secs - 41 mins 21 secs (18 minutes 46 secs - 35 mins 29 secs in the video before the script sees it) -
Last edited by jagabo; 28th Aug 2013 at 13:18.
Similar Threads
-
How to Fix Horizontal Jitter with AviSynth?
By VideoFanatic in forum RestorationReplies: 2Last Post: 26th Jan 2014, 22:52 -
How to fix Chroma Bleed with AviSynth?
By VideoFanatic in forum RestorationReplies: 69Last Post: 10th Aug 2013, 16:29 -
How to fix these Avisynth script errors ?
By VideoFanatic in forum RestorationReplies: 6Last Post: 20th Aug 2012, 16:07 -
How to Fix Patchy Colour with Avisynth?
By VideoFanatic in forum RestorationReplies: 59Last Post: 14th Feb 2012, 10:20 -
Is it possible to Fix Bad Reception Artefacts with AviSynth??
By VideoFanatic in forum RestorationReplies: 6Last Post: 15th Nov 2011, 15:31