
- #FFMPEG OPTIONS DISCORD INSTALL#
- #FFMPEG OPTIONS DISCORD FULL#
It will reconnect the bot to the source so it's still able to stream the video, when this happens, you'll have a strange message in your terminal that you don't need to be worried of. To solve this problem, you have to use that FFMPEG_OPTS variable.
However, streaming audio causes a known issue, explained here. To know what the video variable contains, you can print it. ay(FFmpegPCMAudio(source, **FFMPEG_OPTS), after=lambda e: print('done', e)) #Get videos from links or from youtube search #FFMPEG OPTIONS DISCORD INSTALL#
Install requests ( pip install requests). You can vote up the ones you like or vote down the ones you dont like, and go. It receives new Discord features shortly after they arrive in the API. Installing youtube_dl ( pip install youtube-dl) if you don't have it. The following are 12 code examples of discord. Usability, consistency, and performance are key focuses of discord.js, and it also has nearly 100 coverage of the Discord API. You're already using youtube_dl (judging by your ydl_opts var). Vc.play(discord.FFmpegPCMAudio('music.mp3'), after=lambda e: print('done', e)) To solve this problem, you have to use that FFMPEGOPTS variable. Os.system("ffmpeg -i music.mp4 -map 0:a:0 -b:a 96k music.mp3") See man ffmpeg for detailed description of the options. Youtube = pytube.YouTube(str(song).strip("(,)'")) Thanks for any input! def play(ctx, *song): I don't care much about smaller code optimizations as this is just a small bot for a few friends and me. How would I go about streaming the audio directly into the VC? I'm open to use youtube_dl in place of pytube3. #FFMPEG OPTIONS DISCORD FULL#
At the moment, the command downloads the full song, converts it, and then outputs it into a VC, but this process is heavily slow. ffmpeg -f image2 -i imaged.jpg video. I have setup a music command that downloads a song from YouTube and outputs it into a VC. ffmpeg -i video.avi Convert Images To a Video Sequence This command will transform all the images from the current directory (named image1.jpg, image2.jpg, etc) to a video file named video.mpg. I have a discord.py bot setup in a small server of mine.