Im trying to write ffmpeg command, that takes rtmp stream and saves it to mp4 file. The following command works:
ffmpeg -i rtmp://rtmp.global.cdn.vindral.com/publish/sk_b75a2aa5-9d18-4f44-8d38-cb33ac31c84b -vcodec copy -acodec copy -f mp4 output.mp4
But my command written in fluent-ffmpeg doesnt work. I guess it's because of wrong options that i used.
Hi Team,
Im trying to write ffmpeg command, that takes rtmp stream and saves it to mp4 file. The following command works: ffmpeg -i rtmp://rtmp.global.cdn.vindral.com/publish/sk_b75a2aa5-9d18-4f44-8d38-cb33ac31c84b -vcodec copy -acodec copy -f mp4 output.mp4
But my command written in fluent-ffmpeg doesnt work. I guess it's because of wrong options that i used.
Thank you in advance for checking my code below!
Version information
Code to reproduce
const ffmpegStatic = require('ffmpeg-static'); const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegStatic);
ffmpeg() .input('rtmp://rtmp.global.cdn.vindral.com/publish/sk_b75a2aa5-9d18-4f44-8d38-cb33ac31c84b') .addOptions([ '-vcodec', 'copy', '-acodec', 'copy', '-f', 'mp4' ]) .output('output.mp4') .on('error', (error) => { console.error(error); });
Expected results
File with recorded stream
Observed results
Not even an error message