Log in

View Full Version : Audio Slowdown (25>23.976, PAL>Film)


thecoreyburton
20th January 2017, 12:15
I've got a couple of PAL DVDs (as I'm from a region where PAL is the standard) that I'm currently ripping to my hard disk that I'm having some trouble with. These particular DVDs are progressive - but the footage was shot at 23.976fps, meaning there's been a speed up to get it on to disc. I'd like to restore it to the rate it's supposed to play at because now that I'm aware of speed-up, it's both incredibly noticable and frustrating. To begin, here are two sample files: Examples (http://www.mediafire.com/file/b066i0u48x2r4dx/sample.rar)

Example 1 is the one I need assistance with. The audio is sped up, but the pitch you'll hear is the correct pitch - meaning during the speed up process, only the tempo was changed.

Example 2 is a more typical case. The audio is both faster and higher in pitch. Programs like BeSweet and Eac3to have PAL slowdown operations built into them to handle this. I usually rely on the sync_audio parameter of AssumeFPS if I'm in a rush. Just to clarify, this is included for explanations sake and is not a file I need help with.

I've done a bit of research on the matter through a variety of old threads and haven't come up with a good solution yet. The issue is that the typical adjustments (such as the ones made by BeSweet or Eac3to) seem to handle both pitch and tempo simultaneously. Whilst this is the typical scenario and is superior in terms of quality, that would mean that example1 would be a fraction lower in pitch than it should be as a result of this adjustment. The best solution at this point is TimeStretch, but even with tweaking some of the advanced parameters such as sequence, seekwindow and overlap it's not without issues. It does what I want but the tweaking tends to be a decision between slight varying audio desync or anomalies in the track (such as hearing a click twice, which is common with certain tempo adjustments).

I was wondering if there was a better way or new plugin in the time since some of the older threads were posted that would be able to tackle such an adjustment? Is there a specific set of settings that will make TimeStretch work more transparently?

I know there will be some degree of quality loss, but I can accept that (more than I can accept a sped-up track) provided there aren't any large defects in the resulting track. I'd like to keep this all in AVISynth where possible, but if not it's not too big of a deal. The issue (as far as I can tell) only spans a couple of seasons.

magiblot
20th January 2017, 14:40
Hello, thecoreyburton.

Extending or shortening audio without artifacts is difficult, but there exists a very good approach: iZotope Radius filter in Adobe Audition.

http://i.imgur.com/YGclxCq.png

I'll try to post some samples in a while.

EDIT: Here is your example1 slowed down. New audio lenght is 104,27% of the speeded up 25,000 fps video. I have changed the video framerate by setting it in the properties of the mkv container.

http://www.mediafire.com/file/vt6ru4lavhowna5/sample.zip

My calculations are:

http://i.imgur.com/fXSJzse.gif

I didn't pay for Adobe Audition. If you need help obtaining it, send me a PM.

thecoreyburton
20th January 2017, 16:23
Edit: My original post is entirely irrelevant now.

That works wonders. It's a bit of work, but for the quality and consistency of the output it gives it's worth the hassle.

My only question is are you able to import the ac3 files directly without first transcoding?

johnmeyer
20th January 2017, 19:47
My only question is are you able to import the ac3 files directly without first transcoding?I own iZotope RX and also Sony Vegas, both of which can do speed changes with/without pitch adjustment. Neither of them read AC3 directly, but that doesn't matter much because you are, of course, going to be re-coding to the new speed, so one re-code is going to happen no matter what. You just want to avoid two encodes.

Therefore, all you need to do is convert the AC3 to uncompressed WAV (which is what most WAV files already are). There is no loss or change to the audio. You then perform the speed change on the WAV file, saving it to whatever file format you want. If you want really good audio, then rather than re-compress to AC3, you can save it as PCM (i.e., WAV). Of course the file will be larger and may not fit back onto a DVD, depending on what you did to the video.

FranceBB
20th January 2017, 20:15
@thecoreyburton... side note: I work in a broadcast environment and I apply speed-up to many files on a daily basis. Even though you may hate me, you gotta trust me when I say that we don't have any other choice. Our workflow requires a true 25 interlaced footage 50Hz encoded in XDCAM 50Mbit/s MPEG-2. We get many many files from the States in ProRes 23.976, but the best way to handle them it's the speed up.

1) Duplicated frames: if we duplicate 1 frame every 24 clean frames, it's gonna be noticeable as the camera panning will stop every bloody time and it's painful.

2) blending: blending is a kinda "fine" way to proceed, but the downside is that everything looks blurred on playback and it's kinda weird. It may be fine for some low quality shows like Love it or List it, Cheaters and so on, but definitely not for movies.

3) motion vectors: I tried to use mvtools at home via avisynth in order to create 1 frame every 24 from scratch via motocompensation and vectors prediction, and I was very confident with that, but it ended up creating some noticeable artifacts on objects moving in a "circular way" on the camera, especially on 1080i footages, so I dropped it and I never used it nor proposed it at work.

4) speed-up with pitch adjustment: that is actually really good. Since we dub everything (I mean, everything) we don't really care about speeding up the audio on the original track as it's gonna be in channels 3-4 anyway as second language. As to channels 1-2, we speed music and effects up adjusting the pitch, and the difference it's barely noticeable. As to the video, it plays really smoothly, without artifacts and it's as sharp as the original one.

In other words, "sorry" if we speed everything up, but it's the best choice we have, really. (And no, we can't air progressive footages).

magiblot
20th January 2017, 22:55
are you able to import
Yes, that's just what I did. However, when I had to export, I enconded to flac to avoid recompressing.

I own iZotope RX and also Sony Vegas, both of which can do speed changes with/without pitch adjustment.

I wonder if they work the same as the filter included with Audition? Would you mind testing with this sample (or providing me one to test with it) to compare results?
Slowed down lenght is 150% of the original one.

http://www.mediafire.com/file/n9gt789y1351ctn/sample2.zip

[...]
In my country we had a problem with a Japanese animation from the 90's. In first place, it was done a 24 -> 25 fps conversion like the one you described and dubbed over the high-pitched background sound by a certain TV channel. Many years later, a company adquired the rights for that series and released a DVDs with interlaced 24 -> 25 fps conversion (keeping the lenght of the footage). When they had to put the dub on it, they extended the lenght keeping the pitch with a low-end filter (like the ones thecoreyburton was using in first place), so annoying metallic artifacts could be heard. Then, since this company had the rights, TV channels should use the same video master as them. And therefore, they replaced the original dub with the one full of artifacts.

thecoreyburton
21st January 2017, 00:28
Therefore, all you need to do is convert the AC3 to uncompressed WAV.
That's how I did the test-run in the meantime. That last question wasn't a question of quality but rather one of convenience.

I work in a broadcast environment and I apply speed-up to many files on a daily basis. ... "sorry" if we speed everything up, but it's the best choice we have, really. (And no, we can't air progressive footages).
That's alright, I've come across several similar situations and been in a few myself. Realistically, even though I'm all for the best-quality result despite how long it might take or how difficult it may be to achieve it, the worst footage and sources are still watchable. Sometimes that's the best-case scenario, even though it's not ideal. Most of the time I'm not after the "perfect" video (though I wouldn't knock back that opportunity if it was there), I'm just after making the most out of the source I've got.

Yes, that's just what I did.
Are you running CS6 like me, or Creative Cloud? Mine doesn't seem to like AC3 files for whatever reason (they're not supported in the drop down box and selecting one manually throws an error stating the obvious).

magiblot
21st January 2017, 00:42
Are you running CS6 like me, or Creative Cloud? Mine doesn't seem to like AC3 files for whatever reason (they're not supported in the drop down box and selecting one manually throws an error stating the obvious).

I think it's creative cloud. It gives me no problem opening ac3 files.

EDIT: It definitely is creative cloud. CC 2015, compilation 8.0.0.192.

johnmeyer
21st January 2017, 04:53
I wonder if they work the same as the filter included with Audition? Would you mind testing with this sample (or providing me one to test with it) to compare results? Slowed down lenght is 150% of the original one.Wow, those slowed down results don't sound too good. Let me see if I have something that can import flac files (I know they are common but I've never dealt with them). I'll post something if I can import the audio.

[edit]OK, no problem getting it into Vegas and I can go from there.

One major problem you have is that your audio is clipped. This will mess up the slow-down algorithms, something that is VERY evident on your "izotope_radius_high.flac" file. You absolutely must run the "de-clipper" in iZotope before you proceed doing anything. Better yet, of course, is to try to get a file that isn't clipped.

johnmeyer
21st January 2017, 05:15
OK, here's a zip file that contains two 150% slowdowns. One was done with iZotope RX3 Advanced, using their Radius plugin. I ran the iZotope Declipper before I ran the slowdown, and I saved this file and used it as the input to Vegas. As I mentioned in my previous post, your original is badly clipped, and if you don't first take care of that, you will get lousy results, as you found out.

I then used Vegas Pro, version 10, using its Elastique plugin.

I was getting a problem with Vegas showing clipping in its VU meters, even tough I had reduced the peaks in iZotope when doing the declipping. So I reduced the levels slightly, and as a result the Vegas result is slightly quieter than the one from iZotope. With a few more minutes I could have figured out how to avoid this, but I assumed that what you really wanted to hear was the amount of artifacting in each result.

This is a pretty significant slowdown, and to my ears the artifacts are not too bad: not much echo or flanging; very little stuttering; and only a slight increase in the sibilants.

Here you go:

Two samples (https://www.mediafire.com/?gdzn5qx4ibr6jub)

I saved this in WAV format so as not to introduce any new encoding artifacts.

magiblot
21st January 2017, 18:20
Hey, I hadn't notice that undesirable noise before, because it wasn't there when editing in Audition. I have found it was generated at the time of exporting the audio to FLAC. Using the WAV format the problem is no longer present and I can show you what it was supposed to sound like:

http://www.mediafire.com/file/wgrp60yu5623777/sample3.zip

Let me see if I have something that can import flac files (I know they are common but I've never dealt with them)

Theoretically, the difference between WAV and FLAC could be considered the same between a AVI file with uncompressed YUV and a MKV container with a lossless Lagarith compressed stream: FLAC allows more compatibility with metadata and tags, and provides lossless compression. I thought there was no disadvantage on using FLAC instead of WAV, but I'll be more careful from now on, even if it was just Audition's blame for being bad at exporting to FLAC.

Now, comparing our iZotope samples, I feel like mine, which has been less processed (although I understand the clipping problem), sounds a bit better (without considering the volume). I feel this when I listen to yours after mine. On one hand, the extension method seems to work exactly the same for both iZotope Radius samples. On the other hand, Vegas' filter is slightly inferior but still much better than the dummy filter from Audition.

kuchikirukia
22nd January 2017, 02:54
Can't eac3to do this in one command?

hello_hello
22nd January 2017, 03:19
magiblot,
The reference FLAC encoder calculates the MD5 of the input audio as it compresses. So does the ffmpeg version of FLAC. As does the WavPack codec.
You should be able to export to wave, convert that to FLAC, convert to WavPack, convert back to FLAC and the MD5 will remain unchanged.
I mention all that because if you export to FLAC, and then export the same file to wave and convert it to FLAC and the MD5 is different, something is probably wrong. It might be a way to work out if something odd is happening to the process when exporting directly to flac.

I've never worked out how to dig out the MD5 other than get foobar2000 to show it to me, but there's probably other ways to do it.

https://s28.postimg.org/dijoy8kp9/flac.gifhttps://s28.postimg.org/ye5z9hgwd/Wav_Pack.gif

tebasuna51
22nd January 2017, 14:44
Can't eac3to do this in one command?
Like thecoreyburton explain in first post there are 2 kind of conversions:

Example 1 is the one I need assistance with. The audio is sped up, but the pitch you'll hear is the correct pitch - meaning during the speed up process, only the tempo was changed.

Example 2 is a more typical case. The audio is both faster and higher in pitch. Programs like BeSweet and Eac3to have PAL slowdown operations built into them to handle this.

eac3to can manage Example 2 with -slowdown (using libSsrc.dll).

But with the Example 1 the output don't have the correct pitch.

To manage the Example 1 for free there are TimeStretch, but the quality is less than using commercial soft like iZotope (and others). Of course eac3to can't use that plugin.

EDIT: BTW if the free option is enough for you there are a chance to work with eac3to:

The AviSynth plugin TimeStretch are based in SoundTouch libraries (https://www.surina.net/soundtouch/soundstretch.html) and there are a command line tool (SoundStretch 1.9.2 for Windows (https://www.surina.net/soundtouch/soundstretch-v1.9.2.zip)) that can be used with eac3to:

eac3to "Example 1" -stdout.wav -simple | soundstretch stdin SLOWDOWN.wav -tempo=-4.095904
eac3to "Example 1" -stdout.wav -simple | soundstretch stdin SPEEDUP.wav -tempo=4.2708333

StainlessS
23rd January 2017, 03:32
I've never worked out how to dig out the MD5 other than get foobar2000 to show it to me, but there's probably other ways to do it.


Dont know for sure if this would work (but almost certainly will),

try HashMyFiles:- http://www.nirsoft.net/utils/hash_my_files.html
HashMyFiles can also be launched from the context menu of Windows Explorer, and display the MD5/SHA1 hashes of the selected file or folder.

OR

HashCheck Shell Extension:- http://code.kliu.org/hashcheck/

The HashCheck Shell Extension makes it easy for anyone to calculate and verify checksums and hashes from Windows Explorer. In addition to integrating file checksumming functionality into Windows, HashCheck can also create and verify SFV files (and other forms of checksum files, such as .md5 files). It is fast and efficient, with a very light disk and memory footprint, and it is open-source.
Shows CRC-32, MD4, MD5, and SHA-1 via file Properties/Checksums. [EDIT: Checksums new item in Properties]

An audio file is just a file, should make no difference in calculating MD5, so should be same as shown by FooBar2000.

EDIT: Obviously can use for files other than audio too.
EDIT: Perhaps if audio file carries some kind of additional eg metadata, then MD5 would not match, so maybe FooBar2000 only
calculates on the actual audio, and so above FILE COMPLETE MD5 calculators would be lacking/wrong, so maybe ignore this post :(

thecoreyburton
23rd January 2017, 09:18
This has been very insightful! I have a different (but related) question too, actually. Is there a way to adjust the subtitle track (vobsub, in this case) by the same slowdown as the video and audio?

I'm thinking the stretch property in the MKV container for the subtitles could be the most viable solution (using the same value magiblot mentioned earlier), but would that work?; Is there a more practical way to do this at an encoding level or is that the best option for such a scenario?

magiblot
24th January 2017, 02:05
This has been very insightful! I have a different (but related) question too, actually. Is there a way to adjust the subtitle track (vobsub, in this case) by the same slowdown as the video and audio?

Well, the way would be converting all timestaps into seconds and apply them the conversion factor. I don't know which programs do this, though.

Bloax
25th January 2017, 15:47
Hey, I hadn't notice that undesirable noise before, because it wasn't there when editing in Audition. I have found it was generated at the time of exporting the audio to FLAC. Using the WAV format the problem is no longer present
It sounds like we're dealing with 32-bit float audio in the WAV being output and encoded as something that isn't 32-bit float.

The reason editing is done in 32-bit float is due to the fact that clipping does not exist in 32-bit float - I'm not certain of the specifics, but I would imagine that it does something similiar to using the same volume bits as 24-bit audio would, but leaves the rest as headroom for over-maximum volumes to retain the dynamics of the volume above what would normally be the maximum.

srfscenar
21st June 2017, 15:49
Hi all,

for soundstretch the 23.976 -> 25 temp is 4.2708333 and the 24 -> 25 tempo is 4.1666667.
Can someone tell me please what is the tempo from 25 to 23,976 and 25 to 24?
How is it calculated?

Thanks!

real.finder
21st June 2017, 16:20
AssumeFPS(24, sync_audio=true).SSRC(AudioRate())

AssumeFPS(24000, 1001, sync_audio=true).SSRC(AudioRate())

can do what the Thread talk about

srfscenar
21st June 2017, 17:35
AssumeFPS(24, sync_audio=true).SSRC(AudioRate())

AssumeFPS(24000, 1001, sync_audio=true).SSRC(AudioRate())

can do what the Thread talk about

Sorry, I am not that into code!
Is that an avs script? Is there a simple math that gives the required tempo?

I want to use the soundstretch command line (soundstretch.exe 'IN' 'OUT' -tempo=xxxxx
I want to calculate that xxxx when going from 25fps to 24 or 23.976.

Any ideas?

Thanks!

StainlessS
21st June 2017, 19:41
Is this what you seek (near bottom of page):- http://avisynth.nl/index.php/TimeStretch


Raise playback tempo from NTSC Film speed (23.97 fps) to PAL speed (25 fps) without changing pitch:

TimeStretch(tempo=100.0*25.0/(24000.0/1001.0))


which looks like for slowdown maybe something like


Lower playback tempo from PAL speed (25 fps) to NTSC Film speed (23.97 fps) without changing pitch:

TimeStretch(tempo=100.0*(24000.0/1001.0)/25.0)
# or TimeStretch(tempo=4.0*(24000.0/1001.0))
# or TimeStretch(tempo=4.0*24000.0/1001.0)
# or TimeStretch(tempo=96000.0/1001.0)


For 25 -> 24FPS slowdown

Lower playback tempo from PAL speed (25 fps) to Film speed (24.0 fps) without changing pitch:

TimeStretch(tempo=100.0*24.0/25.0)
# or TimeStretch(tempo=4.0*24.0)
# or TimeStretch(tempo=96.0)

where tempo = 96% = (100%-96%) = 4% slowdown. (24.0/25.0=0.96)

EDIT: This seems to work OK (result as Percent, dont know what SoundStretch.Exe expects)

Function TimeStretchTempo(clip InC,Float OutNum,Float "OutDen") {
# http://forum.doom9.org/showthread.php?p=1810135#post1810135
# Returns Timestretch() Tempo arg, to change playback tempo when changing VideoFramerate, without changing pitch:
Num = InC.FrameRateNumerator
Den = InC.FrameRateDenominator
OutDen = Default(OutDen,1.0).Float
Assert(0.0<OutNum,String(OutNum,"TempoAsPercent: 0.0 < OutNum(%f)"))
Assert(0.0<OutDen,String(OutDen,"TempoAsPercent: 0.0 < OutDen(%f)"))
Return 100.0 * OutNum * Den / (OutDen * Num) # All are Coerced to Float (v2.58 Incl)
}


InC=ColorBars
IFPS=25.0
InC=InC.AssumeFPS(IFPS) # Input simulated FPS : Audio No Change

ONUM=24000
ODEN=1001

Tempo=InC.TimeStretchTempo(ONUM,ODEN) # Calc Required Tempo keeping same pitch as InC

OutAudio=InC.TimeStretch(tempo=Tempo).ResampleAudio(InC.AudioRate) # Stretch and back to Original SampleRate
# SSRC() can fail with some ratios,
# ResampleAudio() almost no differt to SSRC() for some years.

OutC=InC.AssumeFPS(ONUM,ODEN,Sync_Audio=False) # Output Video rate leaving Audio as was

Last=OutC.AudioDub(Outaudio) # Result Explicit assign to Last (no reason)

RT_Subtitle("InFPS=%f : OutFPS=%f : Tempo=%f%%",InC.FrameRate,FrameRate,Tempo)

EDIT: Oops, changed TimeStretch(Tempo) to TimeStretch(tempo=Tempo) : EDIT: Tempo 1st arg after clip anyway so was no prob.

EDIT: Links in CODE blocks no longer seems to work automatically.

EDIT: Function re-named as per following my post.

real.finder
21st June 2017, 21:05
Sorry, I am not that into code!
Is that an avs script? Is there a simple math that gives the required tempo?

I want to use the soundstretch command line (soundstretch.exe 'IN' 'OUT' -tempo=xxxxx
I want to calculate that xxxx when going from 25fps to 24 or 23.976.

Any ideas?

Thanks!

it's avs of course

With it you can change the speed of video and audio (with pitch change)

tebasuna51
21st June 2017, 21:16
tempo = 100 * ( FpsOUT/FpsIN - 1 )

eac3to "25" -stdout.wav -simple | soundstretch stdin 23.976.wav -tempo=-4.095904
eac3to "23.976" -stdout.wav -simple | soundstretch stdin 25.wav -tempo=4.2708333

eac3to "25" -stdout.wav -simple | soundstretch stdin 24.wav -tempo=-4.0
eac3to "24" -stdout.wav -simple | soundstretch stdin 25.wav -tempo=4.1666667

eac3to "24" -stdout.wav -simple | soundstretch stdin 23.976.wav -tempo=-0,0999001
eac3to "23.976" -stdout.wav -simple | soundstretch stdin 24.wav -tempo=0.1

StainlessS
21st June 2017, 22:46
Thank you Tebasuna51.

I presume that Soundstretch can somehow be called from inside Avisynth (otherwise what is it doing in this forum), so ... [EDIT: at least via RT_Call/CallCmd]

Added SoundStretch version of Tempo as SoundStretchTempo() (relative to 100.0%)

Function TimeStretchTempo(clip InC,Float OutNum,Float "OutDen") {
# https://forum.doom9.org/showthread.php?p=1810135#post1810135
# Returns Timestretch() Tempo arg, to change playback tempo when changing Video Framerate, without changing pitch:
Num = InC.FrameRateNumerator
Den = InC.FrameRateDenominator
OutDen = Default(OutDen,1.0).Float
Assert(0.0<OutNum,String(OutNum,"TempoAsPercent: 0.0 < OutNum(%f)"))
Assert(0.0<OutDen,String(OutDen,"TempoAsPercent: 0.0 < OutDen(%f)"))
Return 100.0 * OutNum * Den / (OutDen * Num) # All are Coerced to Float (v2.58 Incl)
}


Function SoundStretchTempo(clip InC,Float OutNum,Float "OutDen") {
# Returns SoundStretch() Tempo arg, to change playback tempo when changing Video Framerate, without changing pitch:
Return TimeStretchTempo(InC,OutNum,OutDen) - 100.0
}

Function CmpTempo(clip c,Float IFPS,Float OutNum,Float "OutDen") {
c.AssumeFPS(IFPS) # Input simulated FPS : Audio No Change
TST=TimeStretchTempo(OutNum,OutDen)
SST=soundStretchTempo(OutNum,OutDen)
OutDen = Default(OutDen,1.0).Float
Return RT_String("InFPS=%.3f : OutFPS=%.3f : TimeStretchTempo=%10.6f%% : SoundStretchTempo=%10.6f%%\n",FrameRate,OutNum/OutDen,TST,SST)
}

ColorBars(Width=960)
GSCript("""
S=""
for(i=0,5) {# 0)=25.0->23.976 : 1)=23.976->25.0 : 2)=25.0->24.0 : 3)=24.0->25.0 : 4)=24.0->23.976 : 5)=23.976->24.0
IFPS = Select(i, 25.0, 23.976, 25.0, 24.0, 24.0, 23.976)
ONUM = Select(i, 24000, 25, 24, 25, 24000, 24)
ODEN = Select(i, 1001, 1, 1, 1, 1001, 1)
S = S + CmpTempo(Last,IFPS,ONUM,ODEN)
}
RT_DebugF("%s",S)
RT_Subtitle("%s",S)
""")
Return Last


Results from DebugView

00000003 1.71319640 [4984] RT_DebugF: InFPS=25.000 : OutFPS=23.976 : TimeStretchTempo= 95.904099% : SoundStretchTempo= -4.095901%
00000004 1.71322191 [4984] RT_DebugF: InFPS=23.976 : OutFPS=25.000 : TimeStretchTempo=104.270935% : SoundStretchTempo= 4.270935%
00000005 1.71325016 [4984] RT_DebugF: InFPS=25.000 : OutFPS=24.000 : TimeStretchTempo= 96.000000% : SoundStretchTempo= -4.000000%
00000006 1.71327806 [4984] RT_DebugF: InFPS=24.000 : OutFPS=25.000 : TimeStretchTempo=104.166664% : SoundStretchTempo= 4.166664%
00000007 1.71330607 [4984] RT_DebugF: InFPS=24.000 : OutFPS=23.976 : TimeStretchTempo= 99.900101% : SoundStretchTempo= -0.099899%
00000008 1.71333420 [4984] RT_DebugF: InFPS=23.976 : OutFPS=24.000 : TimeStretchTempo=100.100098% : SoundStretchTempo= 0.100098%



EDIT: Made SoundStretchTempo() a stub calling TimeStretchTempo().

EDIT: As well as forum now not automatically adding links in CODE blocks, also now messes up links when editing post containing a previously good link
(in a CODE block). (you get a 404 NOT FOUND page, This is a Serious Problem and will not get better in time if not fixed)

tebasuna51
22nd June 2017, 12:28
I presume that Soundstretch can somehow be called from inside Avisynth (otherwise what is it doing in this forum), so ...

I put comand line options because:

Can't eac3to do this in one command?

And seems srfscenar want also these command lines.

BTW:

The AviSynth plugin TimeStretch are based in SoundTouch libraries (https://www.surina.net/soundtouch/soundstretch.html) and there are a command line tool (SoundStretch 1.9.2 for Windows (https://www.surina.net/soundtouch/soundstretch-v1.9.2.zip)) that can be used with eac3to:...

Then avs TimeStretch (latest version) is the same than Soundstretch Command Line.

Not need more avs functions.

StainlessS
22nd June 2017, 13:08
Originally Posted by tebasuna51 View Post
The AviSynth plugin TimeStretch are based in SoundTouch libraries and there are a command line tool (SoundStretch 1.9.2 for Windows) that can be used with eac3to:...

Then avs TimeStretch (latest version) is the same than Soundstretch Command Line.


Good to know, thanks.

Not need more avs functions.

I'll just leave as it is, example just shows the difference between TimeStretch relative 0.0% Tempo and SoundStretch relative 100.0% Tempo.

EDIT:
ie,

TimeStretch_Tempo = 100 * ( Float(FpsOUT)/FpsIN )
SoundStretch_Tempo = 100 * ( Float(FpsOUT)/FpsIN - 1 ) # or SoundStretch_Tempo = TimeStretch_Tempo - 100.0



EDIT:
Had not previously tested output, 25.0 -> 12.5 FPS, works fine, same audio length, and in-sync (vlong clips may lose sync).
(but sounds a bit echo-y [well waddya expect @ half rate :) ].

#Import("TimeStretchTempo.avs")
Avisource("D:\v\XMen2.avi").Trim(10000,-10000) # 25.0 FPS PAL
ORATE=FrameRate / 2.0 # Half Input rate, extreme test
Return AudioDub(Assumefps(ORATE),TimeStretch(Tempo=TimeStretchTempo(ORATE)).ResampleAudio(Audiorate))

srfscenar
22nd June 2017, 13:34
tebasuna51 and StainlessS thank you very much! Exactly what I needed!
Thanks!