Giter VIP home page Giter VIP logo

Comments (8)

PythonicBoat avatar PythonicBoat commented on July 17, 2024 3

Live streams ain't supported by youtube-dl to incorporate playback of https links @Raptor123471 trying adding lavalink.py/wavelink to your repo. These libraries ensure playback of songs/streams by running parallel to the main source code. @miniboy0624 as you say it plays for some time and stops, it is due to the fact that youtube-dl downloads/extracts audio first and then streams it to the vc.

from dingolingo.

PythonicBoat avatar PythonicBoat commented on July 17, 2024 1

@miniboy0624 try adding this under commands/music.py

    @commands.command()
    async def stream(self, ctx, *, url):
        """Streams from a url (same as yt, but doesn't predownload)"""

        async with ctx.typing():
            player = await YTDLSource.from_url(url, loop=self.bot.loop, stream=True)
            ctx.voice_client.play(player, after=lambda e: print(f'Player error: {e}') if e else None)

        await ctx.send(f'Now playing: {player.title}')

This will stream audio from the provided url rather than downloading it, hope it helps!

from dingolingo.

Raptor123471 avatar Raptor123471 commented on July 17, 2024

Can you send me the link to the livestream? It is currently working on my instance.

from dingolingo.

miniboy0624 avatar miniboy0624 commented on July 17, 2024

I mean any livestream from YouTube.
When I played the livestream, it showed the following result and started the livestream for a few seconds, then no sound came out.
image

from dingolingo.

Raptor123471 avatar Raptor123471 commented on July 17, 2024

I am not able to reproduce this issue on my instance. The live stream you provided has been playing for 30mins now. Is that the full output with the issue you are having? Try updating all of your dependencies if you have not already.

from dingolingo.

Raptor123471 avatar Raptor123471 commented on July 17, 2024

@PythonicBoat youtube-dl does support live-streams and my current instance has no problem with the livestream provided. I believe @miniboy0624 may have outdated dependancies.

from dingolingo.

PythonicBoat avatar PythonicBoat commented on July 17, 2024

well with doesn't 'suppport', I had meant the way in which audio playback was. The play command in your repo, by default fetches the url, downloads, extracts and then play it. Doing so for livestreams might be buggy (it completely depends upon your hosting server and network connection) as it will have to continuously fetch and stream it. Thus, alternatively i had mentioned the use of wavelink/lavalink. Though my above post contains a stream command, which instead of downloading the stream will play it directly.

from dingolingo.

miniboy0624 avatar miniboy0624 commented on July 17, 2024

Thank you for help, I will try to use the way u guys said. :)

from dingolingo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.