We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1266709 + 777fde7 commit 68d5c94Copy full SHA for 68d5c94
examples/any-to-mp4-steam.js
@@ -0,0 +1,16 @@
1
+// The solution based on adding -movflags for mp4 output
2
+// For more movflags details check ffmpeg docs
3
+// https://ffmpeg.org/ffmpeg-formats.html#toc-Options-9
4
+
5
+var fs = require('fs');
6
+var path = require('path');
7
+var ffmpeg = require('../index');
8
9
+var pathToSourceFile = path.resolve(__dirname, '../test/assets/testvideo-169.avi');
10
+var readStream = fs.createReadStream(pathToSourceFile);
11
+var writeStream = fs.createWriteStream('./output.mp4');
12
13
+ffmpeg(readStream)
14
+ .addOutputOptions('-movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov')
15
+ .format('mp4')
16
+ .pipe(writeStream);
0 commit comments