1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-02-12 01:29:42 +00:00

Cleanup fluent-ffmpeg dep

This commit is contained in:
snobu
2020-04-10 19:38:40 +03:00
parent 83fecf2894
commit 038832c50f
3 changed files with 2 additions and 43 deletions

View File

@@ -12,7 +12,7 @@ import fs from 'fs';
import path from 'path';
import yargs from 'yargs';
import sanitize from 'sanitize-filename';
import ffmpeg from 'fluent-ffmpeg';
/**
* exitCode 22 = ffmpeg not found in $PATH
@@ -199,33 +199,7 @@ async function downloadVideo(videoUrls: string[], outputDirectory: string, sessi
console.info('Spawning ffmpeg with access token and HLS URL. This may take a few seconds...\n');
const outputPath = outputDirectory + path.sep + video.title + '.mp4';
// TODO: Remove this mess and it's fluent-ffmpeg dependency
//
// ffmpeg()
// .input(video.playbackUrl)
// .inputOption([
// // Never remove those "useless" escapes or ffmpeg will not
// // pick up the header correctly
// // eslint-disable-next-line no-useless-escape
// '-headers', `Authorization:\ Bearer\ ${session.AccessToken}`
// ])
// .format('mp4')
// .saveToFile(outputPath)
// .on('codecData', data => {
// console.log(`Input is ${data.video} with ${data.audio} audio.`);
// })
// .on('progress', progress => {
// console.log(progress);
// })
// .on('error', err => {
// console.log(`ffmpeg returned an error: ${err.message}`);
// })
// .on('end', () => {
// console.log(`Download finished: ${outputPath}`);
// });
// We probably need a way to be deterministic about
// how we locate that ffmpeg-bar wrapper, npx maybe?
// Do not remove those "useless" escapes or ffmpeg will