Cleanup fluent-ffmpeg dep
This commit is contained in:
parent
83fecf2894
commit
038832c50f
3 changed files with 2 additions and 43 deletions
|
@ -12,7 +12,7 @@ import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import yargs from 'yargs';
|
import yargs from 'yargs';
|
||||||
import sanitize from 'sanitize-filename';
|
import sanitize from 'sanitize-filename';
|
||||||
import ffmpeg from 'fluent-ffmpeg';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* exitCode 22 = ffmpeg not found in $PATH
|
* 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');
|
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';
|
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
|
// We probably need a way to be deterministic about
|
||||||
// how we locate that ffmpeg-bar wrapper, npx maybe?
|
// how we locate that ffmpeg-bar wrapper, npx maybe?
|
||||||
// Do not remove those "useless" escapes or ffmpeg will
|
// Do not remove those "useless" escapes or ffmpeg will
|
||||||
|
|
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -360,11 +360,6 @@
|
||||||
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
|
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"async": {
|
|
||||||
"version": "3.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz",
|
|
||||||
"integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw=="
|
|
||||||
},
|
|
||||||
"async-limiter": {
|
"async-limiter": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
|
||||||
|
@ -1102,15 +1097,6 @@
|
||||||
"integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
|
"integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"fluent-ffmpeg": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.2.tgz",
|
|
||||||
"integrity": "sha1-yVLeIkD4EuvaCqgAbXd27irPfXQ=",
|
|
||||||
"requires": {
|
|
||||||
"async": ">=0.2.9",
|
|
||||||
"which": "^1.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"follow-redirects": {
|
"follow-redirects": {
|
||||||
"version": "1.5.10",
|
"version": "1.5.10",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"colors": "^1.4.0",
|
"colors": "^1.4.0",
|
||||||
"ffmpeg-progressbar-cli": "^1.5.0",
|
"ffmpeg-progressbar-cli": "^1.5.0",
|
||||||
"fluent-ffmpeg": "^2.1.2",
|
|
||||||
"is-elevated": "^3.0.0",
|
"is-elevated": "^3.0.0",
|
||||||
"jwt-decode": "^2.2.0",
|
"jwt-decode": "^2.2.0",
|
||||||
"puppeteer": "^2.1.1",
|
"puppeteer": "^2.1.1",
|
||||||
|
|
Loading…
Reference in a new issue