Open Lamerat opened 10 months ago
const pathToFfmpeg = require('ffmpeg-ffprobe-static'); const ffmpeg = require('fluent-ffmpeg') ffmpeg.setFfmpegPath(pathToFfmpeg.ffmpegPath) ffmpeg.setFfprobePath(pathToFfmpeg.ffprobePath) const checkRTMP = (url) => { return new Promise((resolve, reject) => { ffmpeg.ffprobe(url, (err, data) => { if (err) return reject(err) resolve(data) }) }) } checkRTMP('rtmp://exmaple.com/live/122_12).then(x => console.log(x)).catch(e => console.log(e))
(note: if the problem only happens with some inputs, include a link to such an input file)
When try this code to active RTMP link all is OK, but if stream is not active, the function freeze and never resolve.
Version information
Code to reproduce
(note: if the problem only happens with some inputs, include a link to such an input file)
When try this code to active RTMP link all is OK, but if stream is not active, the function freeze and never resolve.