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
ffmpeg(url) url is rtsp://xxxxxx./?starttime=20241216T103616Z&endtime=20241216T103646Z is not listen on 'end' stream,only listen the fs local video file?
const ffmpegCommand = ffmpeg(url)
.addInputOption("-rtsp_transport", "tcp")
.addInputOption("-analyzeduration", "50000", "-max_delay", "500000")
.addInputOption("-fflags", "nobuffer")
.addInputOption("-flags", "low_delay")
.on("start", () => {
console.log("Stream started.");
logger.info("Stream started.");
})
.on("codecData", (data) => {
console.log("Stream codecData:", data);
logger.info(
Stream codecData: ${JSON.stringify(data)}
);})
.on("stderr", (stderrLine) => {
console.error("FFmpeg stderr:", stderrLine);
logger.error(
FFmpeg stderr: ${stderrLine}
);// setTimeout(()=>{
// stream.end();
// },33000)
})
.on("error", (err) => {
console.error("An error occurred:", err.message);
logger.error(
An error occurred: ${err.message}
);stream.end();
})
.on("end", (stdout, stderr) => {
console.log("Stream ended.",stdout);
logger.info("Stream ended.");
stream.end();
})
.outputFormat("flv")
.videoCodec("copy") // 这里使用 copy 以支持原始编码(H264 或 H265)
.noAudio()
// .withDuration(33)
.pipe(stream, { end: true })
When I want to transcode an rtsp playback stream address, I cannot listen for the end event, only the fs local video file end stream event
The text was updated successfully, but these errors were encountered: