Author Topic: Convert stream to mp3  (Read 271 times)

nudrick

  • Posts: 8
Convert stream to mp3
« on: 8 Jun '18 - 17:18 »
Hello

I am converting a stream into a mp3 file with this code:
Code: [Select]
int enc = BassEnc.BASS_Encode_Start(mixerNonStop, "lame.exe -b 128 - output.mp3", 0, null, IntPtr.Zero);
The file is created without problems but sometimes, when I change the sources (I mix 3 files) the recording doesn't work. Is is something related to the bitrate of the sources that I am using?

Thanks

Ian @ un4seen

  • Administrator
  • Posts: 21133
Re: Convert stream to mp3
« Reply #1 on: 8 Jun '18 - 17:59 »
When you say the "recording doesn't work", do you mean there is no output.mp3 file created? What is the BASS_Encode_Start return value then? If you check the process list in Task Manager, do you see LAME running? You could try providing a full path for the output file.

The bitrate of the source audio file(s) won't affect the encoding (the encoder will receive the decoded sample data). One exception could be if the source is a live stream, and the bitrate is too high for the internet connection.

Smoov

  • Posts: 18
Re: Convert stream to mp3
« Reply #2 on: 14 Jun '18 - 21:01 »
Ian,

Do you have an ETA on when the BASSENC_MP3 might become available? We are trying to get mp3 encoding running on a linux docker container and if we install the latest LAME package it was causing issue with playback. It will be really nice when we don't have to go through the lame.exe for encoding...

Thanks

Dustin

Ian @ un4seen

  • Administrator
  • Posts: 21133
Re: Convert stream to mp3
« Reply #3 on: 15 Jun '18 - 13:44 »
I think it should be available quite soon, perhaps in a week or so.

kirr

  • Posts: 1
Re: Convert stream to mp3
« Reply #4 on: 20 Jun '18 - 18:38 »
Do you have an ETA on when the BASSENC_MP3 might become available?
I think it should be available quite soon, perhaps in a week or so.
Wow!  :o
Pardon...
I maybe missed something. Will there be a way to encode mp3 without the lame? Is there a some preliminary information?

Best regards!

Ian @ un4seen

  • Administrator
  • Posts: 21133
Re: Convert stream to mp3
« Reply #5 on: 21 Jun '18 - 15:25 »
Yes, there will be a new MP3 encoding add-on, along the same lines as the existing FLAC/OGG/OPUS encoding add-ons. It will be based on the LAME library (libmp3lame), so you will ultimately still be using LAME but you won't need a separate LAME executable. It will support the LAME command-line options but probably not all of them (there are a lot). Let me know if there are any particular LAME options that you would like to see supported. The add-on is almost done and will probably be ready sometime next week.