-
Notifications
You must be signed in to change notification settings - Fork 825
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
'write EPIPE -4047' error with some videos #816
Comments
Are you at the latest version of ytdl-core? The current latest version is 4.1.4, make sure you upgrade to that. |
Removing the bitrate setting didn't work, as for the code I did copy and paste a part for the example. It's probably not the code because going back to ytdl-core 3.4.2 fixes the issue, but that version is a bit unstable and I don't want to have to use a bad work-around. I also am using the latest version of ytdl-core (4.1.4). |
I'm unable to reproduce the error on either version with your code. I'll leave this open in case someone else can help. |
What code did you use to get the video (or how did you download the video), was it streaming through a Discord bot or just downloading and playing back the video? I have been trying to get this working for days, rewrote the code from scratch and it still produced a 'write EPIPE -4047' error, it doesn't happen with all videos only a small percentage of them. |
🤔 stumbled across the same error earlier today in the example/ffmpeg.js |
Yep, the first time it does nothing, second time produces a 'write EPIPE -4047' error. |
I still have the same error |
Hey ! |
Hey @AMDBartek have you resolved this issue? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sorry for the (very) late response, I did manage to solve the issue by rewriting my code but I think this issue should be kept open as others seem to be having the same issue. |
If that's the case, then perhaps this isn't a bug with ytdl but rather improper handling of a stream. |
Unfortunately, I do not know what specific part of code fixed the issue. |
that's what I thought after this find #816 (comment) that way it is either a ytdl problem or a ytdl-example problem 😂 |
I am also having this issue after following the ffmpeg example |
Hi, I recently made a similar implementation and found a way to prevent this error. Here is the code I used : let stream = ytdl(song.url, {
filter : "audioonly",
opusEncoded : false,
fmt : "mp3",
encoderArgs: ['-af', 'bass=g=10,dynaudnorm=f=200']
});
const dispatcher = serverQueue.connection
.play(stream, {type : "unknown"})
.on("finish", () => {
//do finish step
})
.on("error", error => console.error(error)); I did not tried this code with the ffmpeg example but with my own discord bot |
thanks, this solved my problem about "typeerror: the compressed data passed is corrupted" |
just wanna let you know that these parameters serve no use with ytdl-core 😉 opusEncoded : false,
fmt : "mp3",
encoderArgs: ['-af', 'bass=g=10,dynaudnorm=f=200'] |
Hey there, I recently came across this issue myself with the following video:
Checking the format output for that video using youtube-dl gave out the following:
In my case, I'm using the I tried downloading the file manually and then trying to play it directly on discord.js and surprise, it didn't work. However, trying with the format I also tried doing the opposite for a video that worked normally, downloading it in audioonly format with m4a codec also made it fail. Could it be maybe that the voice support for discord.js cannot handle an m4a stream? |
depends on how u use it |
In my case, I fixed this problem and the reason was the video title. Some videos have special characters or emojis in their title which are not supported by the most of modern OS' as file name. You should remove all special characters before using title in any I/O operation (except it's a file content). By the way, if you are a cross-platform developer, do not mix Bash and Powershell in Windows. Some packages can cause conflict during package installation. |
I had the same problem when testing my code on Windows. I put it into a Docker container, and I had no more issues. I hope it helps someone else! (I recommend using the |
My friends tried to play this video on my Discord bot and it threw a write EPIPE (warning, it is loud): https://youtu.be/ihmDR7W1P1o
This video also throws a write EPIPE error but not immediately: https://www.youtube.com/watch?v=thW6YPgJm2U
It happens on both Windows and Linux hosts, I could not find the culprit for this issue but it only happens with a few videos, there is a couple of examples above. Is it something to do with the format of the videos?
Sample of my code:
The text was updated successfully, but these errors were encountered: