I would like to convert an.mp4 file (with audio only e.g.) download from the reddit API to assemble it with its corresponding video (without sound).
Is there any way to do this under node.js?
You can merge .mp4 audio and video files with fluent-ffmpeg, an ffmpeg commands layer for Node.js that avoid you launching it as a child process.
const ffmpeg = require('fluent-ffmpeg');
ffmpeg()
.input('audio.mp4', 'video.mp4')
.output('out.mp4')
.run();
And if you want to convert the audio output to wav audio, just specify the .wav extension and ffmpeg will convert it for you.
.output('out.wav')