Hi there!
I’ve setup a plainTransport connection between ffmpeg and the producer(s) and have been able to successfully save the stream to a .webm file locally using FFmpeg:
get _commandArgs() {
let commandArgs = [
"-loglevel",
"debug",
"-protocol_whitelist",
"pipe,udp,rtp",
"-fflags",
"+genpts",
"-f",
"sdp",
"-i",
"pipe:0",
];
commandArgs = commandArgs.concat(this._videoArgs);
commandArgs = commandArgs.concat([
"-flags",
"+global_header",
`${RECORD_FILE_LOCATION_PATH}/${this._rtpParameters.fileName}.webm`,
]);
console.log("commandArgs:%o", commandArgs);
return commandArgs;
}
get _videoArgs() {
return ["-map", "0:v:0", "-c:v", "copy"];
}
I’m now wanting to stream it to an RTMP endpoint directly.
I’ve fiddled around with the args where we add flags like tune zerolatency, force convert format to flv and then stream but am running into weird errors.
Any help would be greatly appreciate it.
Thanks a ton