Open 0nEoNi1 opened 7 months ago
The link to the video must be a valid video file (can be local file or a URL). For youtube links, you need a downloader (e.g. yt-dlp), and stream the video data to ffmpeg.
Hi @longnguyen2004, Thanks for your response and your suggestion,
I deleted everything and cloned the project again but this time when runningnpm run build
, I encountered TypeScript compilation errors in the BaseMediaConnection.ts file of version 3.0.3 of the @dank074/discord-video-stream package.
Error 1: File: src/client/voice/BaseMediaConnection.ts - Line: 56
src/client/voice/BaseMediaConnection.ts:56:23 - error TS2769: No overload matches this call.
Overload 1 of 2, '(intervalId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
Error 2: File: src/client/voice/BaseMediaConnection.ts - Line: 170
src/client/voice/BaseMediaConnection.ts:170:27 - error TS2769: No overload matches this call.
Overload 1 of 2, '(intervalId: string | number | Timeout): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'.
Overload 2 of 2, '(id: number): void', gave the following error.
Argument of type 'Timer' is not assignable to parameter of type 'number'.
Thanks
There are typing errors if you upgrade the dependencies, in particular @types/node
, where the return type of setInterval
is changed from NodeJS.Timer
to NodeJS.Timeout
. You can either not upgrade, or fix the types yourself and make a PR.
When running the command npm run yeet in the /Discord-video-stream/examples/basic directory, the following error is encountered:
Screenshots/Logs:
Environment: Node.js version: 21.6.0 npm version: 10.3.0 ffmpeg version: 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers Operating System: Ubuntu 22.4
Expected Behavior: The command npm run yeet should run without errors, and the specified YouTube video should be processed successfully.
Actual Behavior: The error mentioned above is encountered, and the video processing fails with the ffprobe error.
Additional Note for $play-live and $play-cam: For $play-live, the account joins the voice channel and starts streaming but stops even before I can watch. For $play-cam, the account joins the voice channel, and the camera keeps loading without successful streaming.