Home Forums BreakawayOne Custom Encoder Code for PCM

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #17183
    Radio ENA
    Participant

    I hope someone may be able to assist. I need to set up a internal server type custom encoder to send PCM 12Khz 16bit mono little endian to a remote Barix box. Sample rate is 48000 and Bit Rate 192. Not sure what the encoder code and Mime Type is. Any help with this would be wholeheartedly appreciated.

    #17186
    Milky
    Keymaster

    Do you have any documentation on this that we can look over?

    #17188
    Radio ENA
    Participant

    Not really…any help would be appreciated

    #17190
    MrKlorox
    Participant

    What codec are you trying to use?

    #17195
    Radio ENA
    Participant

    pcm.exe

    #17196
    MrKlorox
    Participant

    edit: ah crap, nevermind. I’ll try to figure out a command line. I did a calculation and 12khz 16bit mono can indeed do 192 kbps

    #17197
    MrKlorox
    Participant

    Okay, I think Google Bard is going to be your best help. I would do my own asking if I were you, so you could get more accurate info in your followup questions.

    “i need a command line prompt for the execution of pcm.exe with a conversion of 16-bit, 12khz, mono (192kbps) PCM data”

    and this was its response.

    “pcm.exe -f pcm -b 16 -s 12000 -c 1 -k 192000 input.wav output.wav

    Here is a breakdown of the command line arguments:

    pcm.exe is the name of the pcm.exe executable file.
    -f specifies the output file format. In this case, the output file format is PCM.
    -b specifies the bit depth of the output file. In this case, the bit depth is 16 bits.
    -s specifies the sample rate of the output file. In this case, the sample rate is 12kHz.
    -c specifies the number of channels in the output file. In this case, the number of channels is 1.
    -k specifies the bitrate of the output file. In this case, the bitrate is 192kbps.
    input.wav is the name of the input file.
    output.wav is the name of the output file.”

    #17198
    Radio ENA
    Participant

    That’s amazing.. it truly is. Thank you. As there is no actual audio file and will be used to stream to the Barix Exstreamer from a VAC live feed, which parameters need to change?

    #17203
    MrKlorox
    Participant

    Which Extreamer? Having trouble with PCM.exe… is this included with BreakawayOne?

    It appears flac.exe can also encode PCM data. https://xiph.org/flac/documentation_tools_flac.html

    “flac -c -1 -s 12000 -b 16 -f s16le – | nc remote_ip 8000

    The -c option tells FLAC to encode the audio data, the -1 option tells FLAC to use the highest quality encoder, the -s option sets the sample rate to 12000 Hz, the -b option sets the bit rate to 16 bits per sample, the -f option sets the sample format to 16-bit little-endian, and the | nc remote_ip 8000 tells FLAC to stream the encoded audio data to the remote Barix extreamer box on port 8000.”

    I don’t know if this works. Again, you would do best by asking Bard or ChatGPT yourself so you can try the responses and tell it when it doesn’t work. Then post the working code here for posterity.

    #17204
    Milky
    Keymaster

    Great work, MrKlorox. Thank you for your research.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.