Begin option not working.
kyranet opened this issue · 1 comments
Similar to #200, I'm trying to make the stream start at a certain moment, tried with the following formats: "0:02:48:000"
, "2min 48s"
, "2 min 48 s"
, even "2m"
and "3m"
, and in milliseconds: 168000
but the stream starts at 0:00:00:000
from the beggining. Also tried shorter times, "6s"
and "10s"
, same issue.
Code
const stream = ytdl(this.queue[0].url, { begin, filter: (format) => !format.bitrate && format.audioEncoding === 'opus' })
.on('error', err => this.client.emit('log', err, 'error'));
this.dispatcher = this.connection.playStream(stream, { passes: 5 });
Tried with songs which a duration longer than 3, 4 and 7 minutes. It starts from zero.
Later, I tried using range instead of begin:
const stream = ytdl(this.queue[0].url, { range: { start: 168000 }, filter: (format) => !format.bitrate && format.audioEncoding === 'opus' })
.on('error', err => this.client.emit('log', err, 'error'));
this.dispatcher = this.connection.playStream(stream, { passes: 5 });
And it simply doesn't stream until I change the value of start to 0. (Tried with a few milliseconds, didn't work.)
This option has been pretty unreliable. I just tried it with a random video, it worked for the default format, but not for the first format with the audioonly
and videoonly
filters.
I can add another note about this. I'm also considering removing it entirely, it's not reliable at all.