
Recherche avancée
Autres articles (111)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (4287)
-
Why is my Youtube Video not downloading completely ? "Input buffer exhausted, packet corrupt"
15 septembre 2021, par user16909319Introduction :


I'm working on a Discord Music Bot for personal use only. Basically, when I play a 2min song with the bot, it plays the song for 1min 30secs, then skips it and plays the next one in the queue. The error is shown below :




Error in Pull Function

IO error : Error number -10054 occurred

[mov,mp4,m4a,3gp,3g2,mj2 @ 0000018f86a6f4c0] Packet corrupt (stream = 0, dts = 11154432).

Input buffer exhausted before END element found

Invalid Data found when processing Input

[mov,mp4,m4a,3gp,3g2,mj2 @ 0000018f86a6f4c0] stream 0, offset 0x3e805c : partial file



The code block which I think is causing the problem :


Search song method


async def search_song(self, amount, song, get_url=False):
 info = await self.bot.loop.run_in_executor(None, lambda: youtube_dl.YoutubeDL(ytdl_format_options).extract_info(
 f"ytsearch{amount}:{song}", download=False, ie_key="YoutubeSearch"))
 if len(info["entries"]) == 0: return None

 return [entry["webpage_url"] for entry in info["entries"]] if get_url else info



Play_song method


async def play_song(self, ctx, song):
 url = pafy.new(song).getbestaudio().url
 ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(url, executable="C:/ffmpeg/bin/ffmpeg.exe")),
 after=lambda error: self.bot.loop.create_task(self.check_queue(ctx)))
 ctx.voice_client.source.volume = 0.5



Formatting Options I provided :


ytdl_format_options = {
 'format': 'bestaudio/best',
 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
 'restrictfilenames': True,
 'noplaylist': True,
 'nocheckcertificate': True,
 'ignoreerrors': True,
 'logtostderr': False,
 'quiet': True,
 'no_warnings': True,
 'default_search': 'auto',
 'source_address': '0.0.0.0'
}



Solutions that I've tried :


- 

- Running it on both Replit and locally.
- Redownloading FFmpeg
- Ensuring FFmpeg, pafy, and youtube_dl are all up to date.








Things to Note :


- 

- Playing a 2mins song, it stops after 1min 30 seconds and displays the error above. (75% of the song)
- Playing a 1hr song, it still continues after 10 minutes.






I do not have much experience in this yet so I'm not entirely sure where in my code is actually causing this issue or other ways which I can use to test and fix the issue.


-
ytdl python "KeyError : formats"
7 juillet 2022, par MondumkreisungIm trying to make a discord music bot for personal use, since groovy and rythm got shut down.
It's working okay-ish I guess, but im having a problem with ytdl.
typing "-play" and an url is working just like intended, but i cant type "-play 'song name'".
Typing "-play example" gives me this :


[download] Downloading playlist: example
[youtube:search] query "example": Downloading page 1
[youtube:search] playlist example: Downloading 1 videos
[download] Downloading video 1 of 1
[youtube] CLXt3yh2g0s: Downloading webpage
Ignoring exception in command play:
[download] Finished downloading playlist: example
Traceback (most recent call last):
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\venv\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
 ret = await coro(*args, **kwargs)
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\voice.py", line 53, in play
 url2 = info['formats'][0]['url']
KeyError: 'formats'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\venv\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
 await ctx.command.invoke(ctx)
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\venv\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
 await injected(*ctx.args, **ctx.kwargs)
 File "C:\Users\Dennis\PycharmProjects\groovy's true successor\venv\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
 raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'formats'



im fairly new to coding, so im sorry if somethings weird to understand.


okay, so : typing -play with an url works fine, but typing -play with the song name doesnt. its only searching for the first word, downloads the first searchresult and then "crashes".


so "-play Rick Astley - Never Gonna Give You Up" for example only searches for "Rick" and then it says something about KeyError : 'formats'
Here is my code :


@client.command()
async def play(ctx, url):
 channel = ctx.author.voice.channel
 voice = discord.utils.get(client.voice_clients, guild=ctx.guild)
 if voice and voice.is_connected():
 pass
 else:
 await channel.connect()

 ffmpeg_opts = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
 ydl_opts = {'format': "bestaudio/best", 'default_search': 'auto'}
 vc = ctx.voice_client

 with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 info = ydl.extract_info(url, download=False)
 url2 = info['formats'][0]['url']
 source = await discord.FFmpegOpusAudio.from_probe(url2, **ffmpeg_opts)
 vc.play(source)



-
avformat/scd : add demuxer
1er décembre 2021, par Zane van Iperenavformat/scd : add demuxer
Adds demuxer for Square Enux SCD files.
Based off [1] and personal investigation.
This has only been tested against Drakengard 3 (PS3) *_SCD.XXX files
(big-endian). As it is highly likely that FFXIV (PC) files are little-endian,
this demuxer is marked as experimental until this can be confirmed.[1] : http://ffxivexplorer.fragmenterworks.com/research/scd%20files.txt
Reviewed-by : Peter Ross <pross@xvid.org>
Reviewed-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by : Zane van Iperen <zane@zanevaniperen.com>