Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ffprobe exited with code 1 #54

Open
0nEoNi1 opened this issue Jan 24, 2024 · 3 comments
Open

Error: ffprobe exited with code 1 #54

0nEoNi1 opened this issue Jan 24, 2024 · 3 comments

Comments

@0nEoNi1
Copy link

0nEoNi1 commented Jan 24, 2024

When running the command npm run yeet in the /Discord-video-stream/examples/basic directory, the following error is encountered:

Error: ffprobe exited with code 1
ffprobe version 4.4.2-0ubuntu0.22.04.1 ...
https://www.youtube.com/watch?v=1k1vz9PD7O4: Invalid data found when processing input

Screenshots/Logs:
Screenshot 2024-01-24 181703

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.

@longnguyen2004
Copy link
Collaborator

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.

@0nEoNi1
Copy link
Author

0nEoNi1 commented Jan 24, 2024

Hi @longnguyen2004,
Thanks for your response and your suggestion,

I deleted everything and cloned the project again but this time when running npm 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'.

image
Thanks

@longnguyen2004
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants