fluent-ffmpeg / node-fluent-ffmpeg

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

No such file or directory for rtsp url #1260

Open mselgamal opened 3 months ago

mselgamal commented 3 months ago

Version information

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