C
C#2mo ago
Uncle Sens

Converting 8-bit PCM Stream into FLAC Stream

Hello, I have an application, that receives an audio stream in the form of a byte[] that is encoded in g.711, which is then decoded into 8-bit PCM. I want to encode the PCM stream into a FLAC stream, which i can then send to a different application via a socket. I don't know how to encode it from PCM to FLAC, can somebody with experience help me?
5 Replies
ACiDCA7
ACiDCA72mo ago
what kind oif answer are you looking for? generally tho, when working with mediaformats ffmpeg is usually a good pick
Petris
Petris2mo ago
ffmpeg is terrible if you want to use it in another app the native api is horrible and using it commandline is janky and terrible if you want to do stuff like streaming you probably want to PInvoke libFLAC here instead
ACiDCA7
ACiDCA72mo ago
there are wrappers that make your live easier there but i respect your opinion... tbh i didnt quite think about it.. but yea if your goal is only flac libflac would be a better choice..
Petris
Petris2mo ago
from what I've seen, most wrappers just start the commandline tool lol cause the native api is 1000 LOC for converting audio file to another format levels of bad
Uncle Sens
Uncle Sens2mo ago
Thanks for the answers!
Want results from more Discord servers?
Add your server