@editframe/assets 0.16.7-beta.0 → 0.16.8-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Probe.js +12 -4
- package/package.json +1 -1
package/dist/Probe.js
CHANGED
|
@@ -257,6 +257,16 @@ class Probe {
|
|
|
257
257
|
if (!this.mustProcess) {
|
|
258
258
|
return createReadStream(this.absolutePath);
|
|
259
259
|
}
|
|
260
|
+
const fragmenterArgs = this.isAudioOnly ? [
|
|
261
|
+
"-movflags",
|
|
262
|
+
"frag_keyframe",
|
|
263
|
+
"-frag_duration",
|
|
264
|
+
"4000000"
|
|
265
|
+
// Fragment every 4 seconds (in microseconds)
|
|
266
|
+
] : [
|
|
267
|
+
"-movflags",
|
|
268
|
+
"frag_keyframe"
|
|
269
|
+
];
|
|
260
270
|
const ffmpegConformanceArgs = [
|
|
261
271
|
...this.ffmpegAudioInputOptions,
|
|
262
272
|
...this.ffmpegVideoInputOptions,
|
|
@@ -266,8 +276,7 @@ class Probe {
|
|
|
266
276
|
...this.ffmpegVideoOutputOptions,
|
|
267
277
|
"-f",
|
|
268
278
|
"mp4",
|
|
269
|
-
|
|
270
|
-
"frag_keyframe",
|
|
279
|
+
...fragmenterArgs,
|
|
271
280
|
"pipe:1"
|
|
272
281
|
];
|
|
273
282
|
log("Running ffmpeg", ffmpegConformanceArgs);
|
|
@@ -284,8 +293,7 @@ class Probe {
|
|
|
284
293
|
"copy",
|
|
285
294
|
"-f",
|
|
286
295
|
"mp4",
|
|
287
|
-
|
|
288
|
-
"frag_keyframe",
|
|
296
|
+
...fragmenterArgs,
|
|
289
297
|
"pipe:1"
|
|
290
298
|
];
|
|
291
299
|
log("Running ffmpeg", ffmpegFragmentArgs);
|