Hello everyone.
Long story short, I would like to show a movie to my grandparents who are in their 90s and it would be easier for them to follow if it was slowed down a little. My source files are ripped from a bluray movie and the audio and video are separate, so this will need to be put into consideration.
I'm using avisynth + MeGUI but my knowledge of it is very limited. I would like to slow down the movie by either 3% or 4%. Similar to how PAL movies are sped up by 4%, I feel this is a decent amount of difference.
I have noticed if you simply type a command, the parameters won't show up. But if you type the command and then hit enter, they will. Please provide an example for 3% and 4% slowdown and give as much detail as possible.
Thank you in advance.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 20 of 20
Thread
-
-
AssumeFPS(23.976, sync_audio=true)
Though I'm not sure this will work in Megui -- doesn't it handle audio separately? -
-
-
-
Last edited by WAusJackBauer; 15th May 2021 at 11:51.
-
If you can't handle audio in the same script as the video, in the audio script use AssumeSampleRate() to set the sample rate 4 percent slower than the original rate. For example, if the original is 48000 Hz change it to 46080 Hz. Players might have trouble with an unusual sample rate like that so follow up by resampling back to the original sample rate.
Code:AssumeSampleRate(46080) ResampleAudio(48000)
If you don't want the pitch shift use TimeStretch() instead:
Code:TimeStretch(tempo=0.96)
Last edited by jagabo; 15th May 2021 at 11:49.
-
Ah yes I remember my brother showing me something about TimeStretch years ago for converting PAL movies to NTSC speed.
So assuming I want 4%, I have typed tempo=0.96 but I get an error that says "Input audio sample format to TimeStretch must be float"
I then tried typing =0.96 for rate and pitch (was that correct?) but then I got a "Script error: syntax error" -
Think about it this way: changing TEMPO is making the audio slower or faster; changing PITCH is changing the frequency/tone of the sounds.. in this case DOWN.. so a woman's voice may sound like a man's one (this is only to make an example, I don't think a so little shift can lead to something so radical like that)
You don't want (nor need) changing the pitch (frequency) of the audio .. so TimeStretch() is the correct way to go for this specific task.
NOTE : to be precise and clear.. when you simply slow down an audio (in analogue devices too).. the pitch goes down by itself (since it depends on the speed the audio plays at - it's just physics - like with records: a 33 rpm record will play at a higher pitch at a speed of 45 rpm ).
With digital audio and PC software.. the algorithms involved can treat these two factors as they were separate .. and compensate for that shift for you, if that's not what you want/needLast edited by krykmoon; 15th May 2021 at 12:21.
-
Oh right of course. I'm so used to changing the pitch because I live in a PAL region and on PAL movies the pitch is higher than it should be.
I'm still insure of what to do though. I'm pretty clueless with this kind of stuff so I guess if you can give an example as if you were doing it yourself and then I can just copy and paste it.Last edited by WAusJackBauer; 15th May 2021 at 12:31.
-
I'm not an Avisynth expert.. especially when audio is involved.
But IF the software you use to encode can take the audio from the avisynth script I would do something like this:
Code:# inside the quotes put the full path to your video, with file extensions - the one I provided is only an example fileName = "D:\Movies\MyMovie.mkv" # Values lesser than one will slow the media down while greater than 1 will speed it up. SpeedRatio = 0.96 A = FFAudioSource(fileName) V = FFVideoSource(fileName) V = V.AssumeFPS(23.976 * SpeedRatio) A = A.TimeStretch(tempo=100 * SpeedRatio) AudioDub(V, A)
Last edited by krykmoon; 15th May 2021 at 15:05.
-
-
Krykmoon's already given you one example. Here's another:
Code:a = LWLibavAudioSource("3IVX.avi") # get the audio v = LWLibavVideoSource("3IVX.avi") # get the video AudioDub(v,a) # join them into a single stream TimeStretch(tempo=96) # stretch the audio by 4 percent AssumeFPS(framerate*0.96) # stretch the video by four percent
-
Perfect that worked, thank you!
Strange that when combined with the video it didn't come up with that float error
EDIT: Actually I do get the error when I use the source audio. (DTS file) I wasn't getting the error because I accidentally dragged and dropped in an AC3 encode of the audio that I had from a while back.
So any ideas how to fix this float error? "Input audio sample format to TimeStretch must be float"Last edited by WAusJackBauer; 17th May 2021 at 11:12.
-
Convert your audio to float (if it is DTS is ISN'T decoded that way by default).
Code:ConvertAudioToFloat ()
something like...
Code:Normalize (...) ConvertAudioTo24bit ()
-
I tried ConvertAudioToFloat () on its own and that seems to have done done the trick! Thank you!
Everything seems good in the preview, audio is in sync and pitch is not changed, but incase something happens after the encode, what numbers/settings should I use for Normalize?
Also should I use Normalize and ConvertAudioTo24bit before or after TimeStretch?Last edited by WAusJackBauer; 17th May 2021 at 11:41.
-
Because you are converting to float and doing a pitch-correcting time stretch/shrink, your samples are being interpolated. It is very unlikely (esp. since you didn't make any other changes, AFAIK), but there is always the possibility that some of those interpolations generated new samples that are "out-of-bounds" compared to the original 16/24bit integer format. If that happens, those samples will clip. Normalize "resets" the whole clip so the max is right at the limit and all is below, making everything "valid" again.
The default settings (the clip in question, 1.0 - for normal 0dBFS as the peak, show=false/omitted) should be fine. Use it AFTER TimeStretch. It is there to correct the above possibility that might occur during the timestretch.
Hope that helps,
Scott -
Last edited by WAusJackBauer; 18th May 2021 at 01:47.
Similar Threads
-
Editing a bluray movie.
By macarthskey in forum Newbie / General discussionsReplies: 2Last Post: 14th Dec 2018, 12:07 -
full encode movie bluray +extra?
By leftovers in forum Blu-ray RippingReplies: 0Last Post: 25th Aug 2018, 07:15 -
how i can delete audios in full bluray movie
By vipk77 in forum Authoring (Blu-ray)Replies: 24Last Post: 16th Dec 2017, 09:50 -
tsMuxer : Bluray Folder from Main Movie MKV
By frankcro in forum Newbie / General discussionsReplies: 3Last Post: 19th Jun 2016, 11:31