when i try to download a livestream what is currently live i get the following error
"TypeError: Request path contains unescaped characters"
a full trace stack can be viewed here
an example to reproduce is this live stream
NOTE from dev: You may find that some audio livestreams can be played for only a few seconds before they stop. That's an effect of this same issue.
I'm not able to replicate. Could you post an example of how your bot uses ytdl?
oh sure since i use it with Discord.js it look like this
const yt = require('ytdl-core');
voiceConnection.playStream(yt(link, { filter: 'audioonly' }));
where link is defined as the url of the livestream (of course i only put the needed information in since the rest is more likely not the issue it works fine with all other kind of videos and stuff only Livestreams that are currently ongoing are the issue)
I've found that this issue only appears when using filter: 'audioonly' as an option.
Yep, I'm able to replicate with the filter.
If it's any help, I've found that the segmentURL in m3u8stream's index file is garbled text when using filter: 'audioonly', whereas it is a proper URL without it.
i found a fix for this, do
filter : 'audioonly' , quality: 94
94 is the itag responsible for livestream.
That fix doesn't seem to work for me.
+1
+1 Getting this problem.
i actually found a nice workaround on here instead using yt(link, { filter: 'audioonly' }) use yt(link, { audioonly: true }) and it works as expected, but #263 is happening then
@Dev-Yukine doing yt(link, { audioonly: true }) is basicly the same as yt(link) and will therefor also download the video part...
The workaround was working fine but getting this error on live streams with or without the filter now.
Is there actually any Livestream on Youtube with more DASH (audio only) formats available besides 139 and 140 itags? Because those are the only formats that I seem to find on every livestream I test, besides the video+audio formats (91, 92, 93, 94, 95 itags) and other video only formats.
I assume that when you guys use { filter: 'audioonly' } it will either use the 139 or 140 itag format, one of them (140 itag) is only going to play for a few seconds and the other one (139 itag) currently seems to throw TypeError: Request path contains unescaped characters.
The only way to properly get the stream from a Youtube livestream right now is to simply not use the audioonly filter, forcing you to also download the video, instead use quality or format to select a live format, e.g. ytdl(url, { quality: [91,92,93,94,95] });
Btw, even if this gets fixed the 139 itag has, supposedly, only 48kbps audio bitrate - it's not exactly the greatest audio quality lol - so I hope there's some "privileged" streams out there with more DASH (audio only) formats that I'm not seeing because that's a miserable bitrate tbh.
Was worth fixing imo. m3u8stream, the module ytdl uses to stream live videos, can be used by other video or audio sources. Ones that could use a DASH manifest to stream.
Of course. 馃憤 I noticed that since the the fix the 140 itag seems to now stream the live audio instead of just a few seconds, and, compared to the 139 itag, it has a decent bitrate so it's great. 馃槂