Home › Forums › BreakawayOne › Custom Encoder Code for PCM
- This topic has 9 replies, 3 voices, and was last updated 1 year, 5 months ago by Milky.
-
AuthorPosts
-
May 29, 2023 at 5:16 pm #17183Radio ENAParticipant
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.
May 30, 2023 at 3:21 pm #17186MilkyKeymasterDo you have any documentation on this that we can look over?
June 1, 2023 at 6:45 pm #17188Radio ENAParticipantNot really…any help would be appreciated
June 2, 2023 at 8:35 am #17190MrKloroxParticipantWhat codec are you trying to use?
June 3, 2023 at 10:23 pm #17195Radio ENAParticipantpcm.exe
June 4, 2023 at 6:12 am #17196MrKloroxParticipantedit: 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
June 4, 2023 at 6:20 am #17197MrKloroxParticipantOkay, 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.”June 4, 2023 at 6:29 am #17198Radio ENAParticipantThat’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?
June 4, 2023 at 7:22 am #17203MrKloroxParticipantWhich 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.
June 4, 2023 at 2:42 pm #17204MilkyKeymasterGreat work, MrKlorox. Thank you for your research.
-
AuthorPosts
- You must be logged in to reply to this topic.