0

Is it possible to rip an audio steam with Variable Bit Rate encoding and re encode it on the fly as it is being recorded with Constant Bit Rate encoding?

I am downloading an audio stream in AAC format with VBR encoding using cURL.

The duration of a VBR encoded file will be calculated by its byte length, resulting in a discrepancy for the duration on different players. The result of this duration discrepancy does not allow me to seek and slice precisely. I would need to re encode it somehow with a constant bit rate to get the seeking to work properly.

The audio stream is hours long so re encoding it afterwards takes way too much time and processing power.

Is there anything I can do about this?

Perhaps I can specify some settings in cURL to achieve a constant recording bit rate?

gunter
  • 139
  • 5
  • You are downloading a .aac file ( VBR encoded file) completely and then trying to seek it. – mail2subhajit Nov 07 '19 at 18:11
  • Yes, this is possible, but what does this have to do with HTML? Also, you don't need to re-encode, nor use CBR to fix this problem. Use a proper container that has timestamps. Also, an audio recording of "hours long" shouldn't take but a couple seconds to transcode the entire thing. – Brad Nov 07 '19 at 18:35
  • I am downloading an AAC stream that is VBR encoded. I have a javascript player that bookmarks timestamps and also slices audio. On a CBR encoded audio file the durations stay constant. But on a VBR encoded file the duration changes every time you refresh the page, and the durations also are not the same when using different audio players, like VLC and quicktime. I use FFMPEG to re encode it in CBR 128kb and it takes quite a while to run through the hours of audio. – gunter Nov 08 '19 at 08:03

0 Answers0