fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No such file or directory for rtsp url

mselgamal opened this issue · comments

Version information

  • fluent-ffmpeg version: 2.1.2
  • ffmpeg version: 5.1.4-0+rpt3+deb12u1
  • OS: Debian 12.2.0-14

Code to reproduce

ffmpegProcess = ffmpeg()
        .input("'rtsp://172.16.1.21:554/stream0?username=admin&password=<insert-pass>'")
        .inputOptions([
            '-loglevel debug',
            '-hide_banner',
            '-fflags nobuffer',
            '-flags low_delay',
            '-rtsp_transport udp'
        ])
        .outputOptions([
            '-c:v copy',
            '-an',
            '-preset veryfast',
            '-ssrc 0x'+ssrc,
            '-f rtp'
        ])
        .output("'rtp://52.86.222.93:43900?rtcpport=47929&pkt_size=1200'")
        .on('start', (commandLine) => {
            console.log('Spawned Ffmpeg with command: ' + commandLine);
        })
        .on('error', (err, stdout, stderr) => {
            console.error('An error occurred: ' + err.message);
            console.log('ffmpeg stdout:', stdout);
            console.log('ffmpeg stderr:', stderr);
        })
        .on('end', () => {
            console.log('Stream ended for camera');
        });
        
ffmpegProcess.run();

Expected results

ffmpeg process that streams rtp to a media server (output path)

everything works fine when using CLI to run identical command

Observed results

"rtsp://172.16.1.21:554/stream0?username=admin&password=E10ADC3949BA59ABBE56E057F20F883E": No such file or directory

Checklist

  • I have read the FAQ
  • I tried the same with command line ffmpeg and it works correctly (hint: if the problem also happens this way, this is an ffmpeg problem and you're not reporting it to the right place)
  • I have included full stderr/stdout output from ffmpeg