Closed jamesdools closed 3 years ago
can you try using
seek: song.startTime,
encoderArgs: ['-t', song.endTime]
and weird, encoderArgs: ["-ss", "20", "-t", "50"]
worked for me. Maybe something's wrong with your values
Thanks for the quick reply!
using a combo of seek & encoderArgs does the same. I should have mentioned also above, have tried both a duration with -t
and an endTime with-to
.
What happens is - it actually plays it in the voice channel with the correct start / stop time, but ffmpeg throws and error and it crashes immediately. The discordjs error event handlers aren't even triggered, and wrapping it in a try / catch doesn't stop it either..
Any thoughts? I was wondering if those arguments changes the readable stream into something ytdl-core doesn't handle.
Also am using ffmpeg version 4.0.2 on my machine.
Looks like the problem in prism-media I guess? 🤔
hm definitely a problem with prism-media imo coz I tested with prism-media
only and same result ¯\(ツ)\/¯
Thanks - that's interesting. Just curious as to why encoderArgs: ["-ss", "20", "-t", "50"]
ran okay for you earlier though?
Are you using node-opus over @discordjs/opus or something like that?
Wondering if I can get on the same dependencies as you, maybe it'll play nice.
ps. If you're able to describe how you're testing it with prism-media
directly, I can open an issue with them 🙂
Heya - great job on the wrapper, super useful!
I wanted to be able to give a start & end time to a youtube clip but it's throwing errors that I'm not really able to interpret.
Here's the snippet:
Where
song.startTime
&song.endTime
look something like2:30
,2:42
.Worth mentioning that only using the startTime works, eg:
seek
option you've added is doing under the hood anyway.Wondering if you meant to add an end time but it was problematic - or am I just using ffmpeg wrong? Here's the error thrown btw (it never gets to the
.on( 'error')
catch)