diff options
author | bobzel <zzzman@gmail.com> | 2022-09-15 12:56:46 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-09-15 12:56:46 -0400 |
commit | 97664022dc6cf55ac1a3492232adc9b7ab9e9c3c (patch) | |
tree | a02b95a1c4f97808d68c0b9d960754e1aea3b184 | |
parent | 02a26630710569f345a5f3a6cb75fcf46c729f17 (diff) |
changed youtube ffmpeg command to escape filename (problem with videos starting with a '-')
-rw-r--r-- | src/server/DashUploadUtils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/DashUploadUtils.ts b/src/server/DashUploadUtils.ts index 8cf657da4..a5a606745 100644 --- a/src/server/DashUploadUtils.ts +++ b/src/server/DashUploadUtils.ts @@ -102,7 +102,7 @@ export namespace DashUploadUtils { export function uploadYoutube(videoId: string): Promise<Upload.FileResponse> { return new Promise<Upload.FileResponse<Upload.FileInformation>>((res, rej) => { console.log('Uploading YouTube video: ' + videoId); - exec('youtube-dl -o ' + (videoId + '.mp4') + ' ' + videoId + ' -f "mp4[filesize<5M]/bestvideo[filesize<5M]+bestaudio/bestvideo+bestaudio"', (error: any, stdout: any, stderr: any) => { + exec('youtube-dl -o ' + (videoId + '.mp4') + " 'https://www.youtube.com/watch?v=" + videoId + "' -f 'mp4[filesize<5M]/bestvideo[filesize<5M]+bestaudio/bestvideo+bestaudio'", (error: any, stdout: any, stderr: any) => { if (error) { console.log(`error: Error: ${error.message}`); res({ |