You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since this library was created for discord-player, the API should be similar to its current transcoder, which is a node.js stream. It works by taking raw stream, piping it to transcoder and receive the desired output.
My current idea is to implement something similar to the following:
import{probeStream,CodecType,Transcoder}from'mediaplex'conststream=getInputStream();constprobeResult=awaitprobeStream(stream);if(!probeResult.result)return;// unsupported streamconsttranscoder=newTranscoder({format: CodecType.OPUS,// the output formatsampleRate: 48000,// output sample ratechannels: 2,// the number of channels
... // other options});// Transcoder extends Transform streamconstoutput=stream.pipe(transcoder);// output shall be Opus stream, as specified in format
The text was updated successfully, but these errors were encountered:
Since this library was created for discord-player, the API should be similar to its current transcoder, which is a node.js stream. It works by taking raw stream, piping it to transcoder and receive the desired output.
My current idea is to implement something similar to the following:
The text was updated successfully, but these errors were encountered: