View Full Version : Lossless audio slowing down/speeding up?
Meow
21st July 2017, 00:11
Hi,
So I've been wondering if there's a specific way to slow down audio to (exactly) half,
and then when it would be sped back up to normal speed, it would sound as good as possible.
Note:
I'd need this for 120fps YouTube video purpose.
This means that it'll be YouTube that will be responsible of speeding the audio back up to normal.
Not familiar with 120fps YouTube videos?
How it works is that you have a 120fps video clip, you slow it down to exactly half, and render as 60fps.
Then playback with YouTube on 2x speed and the result is 120fps.
Please note:
I'm not looking to hear any comments about why on earth I want 120fps YouTube videos, or why it's stupid etc etc etc. I have my own reasons as to why I want it.
I'm just here to hopefully get some advice from the pros, since I'm a total noob when it comes to something like this :(
How have I currently been slowing down my audio?
I've just dragged the audio to 2x length while holding down ctrl on Sony Vegas to slow it down to half along with the video clip.
So yeah, that's about it. And I do understand that it probably isn't possible to do this losslessly like my title suggests (I just couldn't come up with a better title).
But I am hoping that there is some way I would be able to get sound quality than what I get at the moment.
Any help would be very highly appreciated,
Thanks!
Ghitulescu
21st July 2017, 10:23
Slowing is possible, as well as speeding it up, just that is not lossless - it can't be lossless.
tebasuna51
21st July 2017, 11:16
Not familiar with 120fps YouTube videos?
Yes, then correct me if next comments are wrong.
How it works is that you have a 120fps video clip, you slow it down to exactly half, and render as 60fps.
For instance you have a video clip with 120 frames than played at 120 fps have a real duration of 1 second.
And you change the fps to 60 to obtain a wrong duration of 2 seconds for these 120 frames.
Then playback with YouTube on 2x speed and the result is 120fps.
When playback at 2x you recover the correct duration of 1 second for these 120 frames.
Now you have the real audio of 1 second of duration than want to mux to fake 60 fps video.
I don't know what do the playback 2x with the audio, even some players can mute the audio when select a double speed for the video.
But, in theory, the change of video fps to half (120 -> 60 fps) is equivalent to change the audio samplerate to half (48000 -> 24000 Hz).
Then the 48000 samples of 1 second real audio are played in 2 seconds at 24 KHz.
Maybe the player at 2x recover the original samplerate and play the 48000 samples in 1 second lossless.
You can try this solution. Remember, is change the samplerate, not resample the audio or change the duration.
Resample:
When you resample 48000 samples 48 KHz to 24 KHz you obtain 24000 samples with 1 second of duration. Lossy conversion.
Change duration:
When you drag the audio with 48000 samples 1 second in Vegas, over a 2 seconds video, it convert the 48000 samples in 96000 samples to obtain 2 seconds played at 48 KHz. Lossy conversion.
And we need 48000 samples 48 KHz = 1 second, the same 48000 samples played at 24 KHz = 2 seconds.
Lossless conversion (the samples are untouched).
We hope than playback at 2x recover the real duration without modify the samples.
I don't know if Vegas can do it, but yes any audio editor (Audition, SoundForge, Goldwave, Audacity,...).
Meow
21st July 2017, 13:20
Slowing is possible, as well as speeding it up, just that is not lossless - it can't be lossless.
Yeah, as I said in my post.
I was just wondering if there's a way to slow it down in a way that I'd lose a minimal amount of audio quality.
------------------------------------
Yes, then correct me if next comments are wrong.
For instance you have a video clip with 120 frames than played at 120 fps have a real duration of 1 second.
And you change the fps to 60 to obtain a wrong duration of 2 seconds for these 120 frames.
When playback at 2x you recover the correct duration of 1 second for these 120 frames.
Now you have the real audio of 1 second of duration than want to mux to fake 60 fps video.
I don't know what do the playback 2x with the audio, even some players can mute the audio when select a double speed for the video.
But, in theory, the change of video fps to half (120 -> 60 fps) is equivalent to change the audio samplerate to half (48000 -> 24000 Hz).
Then the 48000 samples of 1 second real audio are played in 2 seconds at 24 KHz.
Maybe the player at 2x recover the original samplerate and play the 48000 samples in 1 second lossless.
You can try this solution. Remember, is change the samplerate, not resample the audio or change the duration.
Resample:
When you resample 48000 samples 48 KHz to 24 KHz you obtain 24000 samples with 1 second of duration. Lossy conversion.
Change duration:
When you drag the audio with 48000 samples 1 second in Vegas, over a 2 seconds video, it convert the 48000 samples in 96000 samples to obtain 2 seconds played at 48 KHz. Lossy conversion.
And we need 48000 samples 48 KHz = 1 second, the same 48000 samples played at 24 KHz = 2 seconds.
Lossless conversion (the samples are untouched).
We hope than playback at 2x recover the real duration without modify the samples.
I don't know if Vegas can do it, but yes any audio editor (Audition, SoundForge, Goldwave, Audacity,...).
Sounds cool, but I'm quite sure this wont work.
And I tried it as well (not sure if I did it wrong tho)
This would be the result on the Sony Vegas timeline:
https://image.prntscr.com/image/gNDPua_pQq26xRmCBlfp2g.png
Video is slowed down to half, and audio's samplerate has been changed to half.
So now half of the video is just no sound, and anyways when I playback halved samplerate on YouTube with 2x playback speed, it's just actually in 2x speed.
So the first half of the video sounds like chipmunks, and in the second half there's no sound.
So I guess YouTube will just simply play it back with 2x speed.
Here's how to seconds go in 2x playback:
https://i.gyazo.com/7f5fcbe9cfaf770033e16bee7e5e1ee1.gif
So yeah.
tebasuna51
21st July 2017, 16:15
Your coments about Vegas don't help me at all.
Please upload a sample 120 fps with the audio.
raffriff42
21st July 2017, 18:45
If I understand correctly, you want the user to select double-speed in their browser? YouTube will then speed it up - but for me in Firefox anyway, it does so while keeping pitch constant. You want to slow the sound to half speed, also keeping pitch constant (https://en.wikipedia.org/wiki/Audio_time_stretching_and_pitch_scaling), yes? This is a process with unavoidable artifacts in both directions - usually audible as clicks, echoes or a hollow sound. If you could allow the pitch to fall and rise, the fidelity would be much better, as only simple resampling is needed, but I don't think YouTube lets you change speed without pitch correction.
Meow
21st July 2017, 18:49
Your coments about Vegas don't help me at all.
Please upload a sample 120 fps with the audio.
A test clip like this?
https://www.youtube.com/watch?v=o_P1S8TPYaU
Play at 720p@60 with 2x playback. You can gear how the audio sounds a bit bad, but not too bad tho.
If you want to compare to the original version of the song, it's name is "Alan Walker - Fade [NCS Release]" (First song that popped up when I searched for non-copyright music)
And that test clip was done by slowing down the audio to half in Sony Vegas. (I didn't try to re-sampling again because it didn't seem to yield any good results)
Meow
21st July 2017, 19:05
If I understand correctly, you want the user to select double-speed in their browser? YouTube will then speed it up - but for me in Firefox anyway, it does so while keeping pitch constant. You want to slow the sound to half speed, also keeping pitch constant (https://en.wikipedia.org/wiki/Audio_time_stretching_and_pitch_scaling), yes? This is a process with unavoidable artifacts in both directions - usually audible as clicks, echoes or a hollow sound. If you could allow the pitch to fall and rise, the fidelity would be much better, as only simple resampling is needed, but I don't think YouTube lets you change speed without pitch correction.
Nice knowledge, and yeah, I think I'm understanding the source of the problem now.
However this doesn't provide me with a possible solution to make the audio sound at least a bit better(?).
Or am I just too much of a noob the spot a solution suggestion in there?
tebasuna51
21st July 2017, 21:00
A test clip like this?
[url]https://www.youtube.com/watch?v=o_P1S8TPYaU[/url
Nope, this is a 30 fps:
General
Archivo : 120fps test vid.mp4
Contenedor : MPEG-4
Ocupacion : 6.7 MiB (7070488 bytes, 80345 de contenedor)
Duracion_T : 00:04:00.047 (240047 ms)
Bitrate_T : 235637
Fecha : UTC 2017-07-21 19:38:52.870
Video
Formato : AVC High@L3.1 CABAC / 1 Ref Frames
Duracion_V : 00:04:00.033 (240033 ms)
Bitrate_V : 40946 ( nominal)
Resolucion : 1280x720
Pixel_AR : 1.000
Display_AR : 16:9 (1.778)
Framerate : 30.000 (7201 frames)
Muestras : YUV, 4:2:0, 8 bits
Campos : Progressive
Factor_Qf : 0.001
Audio
Formato : AAC LC
Duracion_A : 00:04:00.047 (240047 ms)
Bitrate_A : 192000 VBR
Canales : 2 (2/0/0)
Muestreo : 44100
Retraso :
Titulo : IsoMedia File Produced by Google, 5-11-2011
Idioma : English
Meow
21st July 2017, 21:26
Nope, this is a 30 fps:
Firstly, this is in no way related to my question.
Secondly, I don't know if there's something wrong with your eyes, but it's clearly not 30fps. It is about 120fps...
Thirdly, from where did you even pull those numbers from? Downloaded the video with some (shitty) YouTube video downloader?
tebasuna51
21st July 2017, 22:56
Sorry I don't understand your post.
This sample sound better for you?: https://www.sendspace.com/file/y1xfhl
To be played at 2x.
Meow
21st July 2017, 23:46
Sorry I don't understand your post.
This sample sound better for you?: https://www.sendspace.com/file/y1xfhl
To be played at 2x.
Can't download that, SendSpace seems to be down.
StainlessS
22nd July 2017, 00:26
Can't download that, SendSpace seems to be down.
Its up for me.
Meow
22nd July 2017, 01:02
Its up for me.
Oh yeah, it wasn't letting me access it on my computer, was just saying that Cloudfare for that site is down, dunno. Was able to access on my VPS tho.
Sorry I don't understand your post.
This sample sound better for you?: https://www.sendspace.com/file/y1xfhl
To be played at 2x.
Sounds worse imo tbh.
tebasuna51
22nd July 2017, 21:10
Sounds worse imo tbh.
Maybe my original "Alan Walker - Fade [NCS Release]" was worse (I think than is over saturated)
Using my own source (Mozart) I make a test to know if there are any advantage, audio only related, when play a video at 2x fps.
- The video must have double duration (double size) than original audio in 2x mode.
- The process to obtain audio for 2x videos was explained in my first post.
- Work fine for me, using mpc-hc, forcing 2x.
Here are my test (https://www.sendspace.com/file/djbbxj) and some data to compare:
Audio 1x Audio 2x
-------------------- --------------------
Video Full size Audio size Samplerate Bitrate Samplerate Bitrate
--------- ---------- ---------- ---------- -------- ---------- --------
Test_0.1x 11.918.113 9.832.907 44.100 605 Kb/s - -
Test_1.1x 6.825.835 4.754.353 44.100 292 Kb/s - -
Test_1.2x 10.742.783 6.504.371 22.050 200 Kb/s 44.100 400 Kb/s
Test_2.1x 5.310.606 3.236.032 44.100 199 Kb/s - -
Test_2.2x 7.553.672 3.324.731 22.050 102 Kb/s 44.100 204 Kb/s
Test_0 have the original FLAC source.
1) Test_1
I used qaac to encode to max quality (V 125) the audio and we can obtain a, theoric, better quality (400 Kb/s vs 292 Kb/s) in 2x mode.
The questions are:
1.1) Is really better?
My old ears can't difference them. Maybe some "golden ears" can say something.
1.2) The full video size is near the size than the reference Test_0.1x and can't be better.
I can't see the advantages.
2) Test_2
Now the encodes was make at v 196 and v 98 to obtain the same size for audio and a equivalent bitrate (199 Kb/s vs 204 Kb/s) in both modes.
Like before I can't difference them, but in theory must have the same quality.
The full video size 2x is greater than 1x, even greater than Test_1.1x with better audio bitrate (292 Kb/s)
I can conclude than, in my opinion, this thecnique is usseless for audio quality.
Meow
23rd July 2017, 11:51
Maybe my original "Alan Walker - Fade [NCS Release]" was worse (I think than is over saturated)
Using my own source (Mozart) I make a test to know if there are any advantage, audio only related, when play a video at 2x fps.
- The video must have double duration (double size) than original audio in 2x mode.
- The process to obtain audio for 2x videos was explained in my first post.
- Work fine for me, using mpc-hc, forcing 2x.
Here are my test (https://www.sendspace.com/file/djbbxj) and some data to compare:
Audio 1x Audio 2x
-------------------- --------------------
Video Full size Audio size Samplerate Bitrate Samplerate Bitrate
--------- ---------- ---------- ---------- -------- ---------- --------
Test_0.1x 11.918.113 9.832.907 44.100 605 Kb/s - -
Test_1.1x 6.825.835 4.754.353 44.100 292 Kb/s - -
Test_1.2x 10.742.783 6.504.371 22.050 200 Kb/s 44.100 400 Kb/s
Test_2.1x 5.310.606 3.236.032 44.100 199 Kb/s - -
Test_2.2x 7.553.672 3.324.731 22.050 102 Kb/s 44.100 204 Kb/s
Test_0 have the original FLAC source.
1) Test_1
I used qaac to encode to max quality (V 125) the audio and we can obtain a, theoric, better quality (400 Kb/s vs 292 Kb/s) in 2x mode.
The questions are:
1.1) Is really better?
My old ears can't difference them. Maybe some "golden ears" can say something.
1.2) The full video size is near the size than the reference Test_0.1x and can't be better.
I can't see the advantages.
2) Test_2
Now the encodes was make at v 196 and v 98 to obtain the same size for audio and a equivalent bitrate (199 Kb/s vs 204 Kb/s) in both modes.
Like before I can't difference them, but in theory must have the same quality.
The full video size 2x is greater than 1x, even greater than Test_1.1x with better audio bitrate (292 Kb/s)
I can conclude than, in my opinion, this thecnique is usseless for audio quality.
Wow, nice.
And yeah, I cant really tell the difference playing them in MPC-HC.
To be fair tho, I guess one could say those only contain "simple" sounds, unlike modern music which has all kinds of electronic sounds & a lot bass etc.
But yeah, when played back in YouTube at 2x speed, those clips (which did sound really good when played at 2x speed in MPC-HC) didn't sound very good anymore :(.
I guess it's fair to say that YouTube just doesn't do this very well :(
Thanks a lot for your knowledge and help tho.
Still hoping to see if anyone would have a suggestion on what to do with the audio to avoid those weird sounds that the 2x playback at YouTube creates, please post here :)
But I guess it should be time for me to just accept that fact the sound would sound very good :/
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.