fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.85k stars 874 forks source link

ffprobe freeze #1237

Open Lamerat opened 10 months ago

Lamerat commented 10 months ago

Version information

Code to reproduce

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.