3

I have a lossy AAC audio file. I would like it to be slightly faster, and slightly higher pitched. I would like to avoid loosing any audio quality, such as by re-encoding the stream.

I am well aware that if I wanted to increase the speed without increasing the pitch, I would be SOL for avoiding a re-encode. Same for increasing the pitch without increasing the speed, because these effects require relatively complicated filters.

However, I want to do something a lot simpler—increase the speed and the pitch at the same time, by the same amount. The same as what would happen if you played a vinyl record or cassette tape too quickly.

My recording currently has a sample rate of 44100hz. If I could change it to 48000hz without re-encoding, I would get a ~9% speed bump, which would be perfect! However, I can't seem to find a way to do this! Ffmpeg's asetrate filter, for example, requires a stream copy!

Surely there should be a way to do this? It seems technically simple...

5
  • Does changing the audio and video frame rates in the metadata have any effect? (If not, where is the controlling information stored? Mar 7 at 14:12
  • @RayButterworth I don't know how to do that! GUI apps don't let you edit that field, and I don't see a way to do it with e.g. ffmpeg. Mar 10 at 0:33
  • I think whether this is possible depends on the actual lossy codec being used. Skimming hydrogenaudio, I found threads hydrogenaud.io/index.php/topic,115369.0.html, hydrogenaud.io/index.php/topic,33993.0.html, and hydrogenaud.io/index.php/topic,102416.0.html.
    – 1110101001
    Sep 16 at 22:22
  • They seem to imply that it might be possible by changing header data, so long as the actual lossy encoding doesn't rely on the specific sampling rate for its decoding "You might run into troubles if you change the sampling rate. AAC makes use of a sampling rate specific partition of the spectrum into scalefactor bands. Changing the sampling rate could render the AAC stream useless (I'm not 100% sure)."
    – 1110101001
    Sep 16 at 22:23
  • I suppose you could just try it and see. I don't know of any off-the-shelf way to edit this data, you could probably pull up the aac format spec and use a hex editor, or modify ffmpeg to get it to write out the value you want. Also note that some container formats (like mkv) support overriding the sample rate at decode time.
    – 1110101001
    Sep 16 at 22:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.