
Recherche avancée
Autres articles (100)
-
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...) -
D’autres logiciels intéressants
12 avril 2011, parOn ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
Videopress
Site Internet : (...) -
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)
Sur d’autres sites (5097)
-
Youtube-dl and Ffmpeg
25 juin 2022, par Joksyi have made a music bot with discord.py, but i get this info thing and it doesnt work anymore
error [youtube] QxYdBvB8sOY: Downloading webpage 985104597242773505 [2022-06-25 07:45:51] [INFO ] discord.player: Preparing to terminate ffmpeg process 37580. [2022-06-25 07:45:51] [INFO ] discord.player: ffmpeg process 37580 has not terminated. Waiting to terminate... [2022-06-25 07:45:51] [INFO ] discord.player: ffmpeg process 37580 should have terminated with a return code of 1.
this is my code

import discord
import os
import asyncio
import youtube_dl
from discord import *

token = "token is here"
prefix = "j!"
blocked_words = ["blocked words are here"]

voice_clients = {}

yt_dl_opts = {'format': 'bestaudio/best'}
ytdl = youtube_dl.YoutubeDL(yt_dl_opts)

ffmpeg_options = {'options': "-vn"}

intents = discord.Intents.default()
intents.message_content = True

client = discord.Client(intents=intents)


programmer_role = "987018590152699964"
 


@client.event
async def on_ready():
 print(f"Bot logged in as {client.user}")

@client.event
async def on_message(msg):
 if msg.author != client.user:
 if msg.content.lower().startswith(f"{prefix}info"):
 await msg.channel.send(f"Hi, Im JoksysBot Made By Joksy!")

 for text in blocked_words:
 if text in str(msg.content.lower()):
 await msg.delete()
 await msg.channel.send("Hey, Dont Say That!")
 return
 if msg.content.startswith(f"{prefix}play"):

 try:
 voice_client = await msg.author.voice.channel.connect()
 voice_clients[voice_client.guild.id] = voice_client
 except:
 print("error")

 try:
 url = msg.content.split()[1]

 loop = asyncio.get_event_loop()
 data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=False))

 song = data['url']
 player = discord.FFmpegPCMAudio(song, **ffmpeg_options, executable="C:\\Users\\jonas\\Documents\\ffmpeg-2022-06-16-git-5242ede48d-full_build\\ffmpeg-2022-06-16-git-5242ede48d-full_build\\bin\\ffmpeg.exe")

 voice_clients[msg.guild.id].play(player)

 except Exception as err:
 print(err)

 if msg.content.startswith(f"{prefix}pause"):
 try:
 voice_clients[msg.guild.id].pause()
 except Exception as err:
 print(err)

 if msg.content.startswith(f"{prefix}resume"):
 try:
 voice_clients[msg.guild.id].resume()
 except Exception as err:
 print(err)

 if msg.content.startswith(f"{prefix}stop"):
 try:
 voice_clients[msg.guild.id].stop()
 await voice_clients[msg.guild.id].disconnect()
 except Exception as err:
 print(err)

client.run(token)




its weird since all the other code in my bot works fine like the
!info
command, so it must be an error with either youtube-dl or ffmpeg. But then again it doesnt join the voice call in the first place so that might be the error. i added ffmpeg to path but i still wrote the path to it hereplayer = discord.FFmpegPCMAudio(song, **ffmpeg_options, executable="C:\\Users\\jonas\\Documents\\ffmpeg-2022-06-16-git-5242ede48d-full_build\\ffmpeg-2022-06-16-git-5242ede48d-full_build\\bin\\ffmpeg.exe")
. i followed this tutorial for the bot https://www.youtube.com/watch?v=Q8wxin72h50&t=1040s i did everything he did but it didnt work. My discord.py version is2.0.0
my Python version is3.10.5
and my youtube_dl version is2021.12.17
my ffmpeg download isffmpeg-2022-06-16-git-5242ede48d-full_build
. I tested it ondiscord.py 1.73
and it worked fine. This was in intellij though whilst my main program is in Visual Studio Code but i couldnt see it making any big difference so it could be the intents that makes the program not work.I couldnt see any mistakes in the code but im new to discord.py, youtube_dl and ffmpeg stuff so unless visual studio code showed me what i did wrong, i wouldnt notice. But what did i do wrong and how can i fix it ?

-
Discord Bot can't play audio from YouTube all of a sudden
22 mars 2023, par Aidan TweedyLast night my Discord bot stopped working out of the blue. The bot had been working perfectly for months until this point - no code changes occurred and it was running in a Docker container on my home server. Then last night, my
!play <url></url>
command stopped working. The bot would join the voice channel, but not actually play anything. Then it would need to be manually disconnected from the voice channel in order for it to do anything again. After the first play fails, and I try again I get this error message :

[youtube] crOZk88eCcg: Downloading webpage
 [youtube] crOZk88eCcg: Downloading android player API JSON
 [youtube] Extracting URL: https://www.youtube.com/watch?v=crOZk88eCcg&ab_channel=0foofighter0
 [youtube] crOZk88eCcg: Downloading webpage
 [youtube] crOZk88eCcg: Downloading android player API JSON
 [2023-03-22 00:27:59] [ERROR ] discord.ext.commands.bot: Ignoring exception in command play
 Traceback (most recent call last):
 File "/usr/local/lib/python3.10/dist-packages/discord/ext/commands/core.py", line 190, in wrapped
 ret = await coro(*args, **kwargs)
 File "/usr/src/app/./main.py", line 180, in play
 voice.play(player, after=lambda e: print(f'Player error: {e}') if e else None)
 File "/usr/local/lib/python3.10/dist-packages/discord/voice_client.py", line 600, in play
 raise ClientException('Not connected to voice.')
 discord.errors.ClientException: Not connected to voice.
 
 The above exception was the direct cause of the following exception:
 
 Traceback (most recent call last):
 File "/usr/local/lib/python3.10/dist-packages/discord/ext/commands/bot.py", line 1347, in invoke
 await ctx.command.invoke(ctx)
 File "/usr/local/lib/python3.10/dist-packages/discord/ext/commands/core.py", line 986, in invoke
 await injected(*ctx.args, **ctx.kwargs) # type: ignore
 File "/usr/local/lib/python3.10/dist-packages/discord/ext/commands/core.py", line 199, in wrapped
 raise CommandInvokeError(exc) from exc
 discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: Not connected to voice.
 [2023-03-22 00:27:59] [INFO ] discord.player: ffmpeg process 12 has not terminated. Waiting to terminate...
 [2023-03-22 00:27:59] [INFO ] discord.player: ffmpeg process 12 should have terminated with a return code of -9.



My first instinct was that ffmpeg was borking somehow, since it has been difficult to get working in the past. However I'm not sure how ffmpeg could've stopped working, since the bot never went down between working and not working. That leads me to believe it could be a change on Youtube/Discord's side ?


For context, here is a snippet of my
!play
code :

@client.command(pass_context = True)
async def play(ctx):
 url = ctx.message.content.split("!play ",1)[1]
 voice = discord.utils.get(client.voice_clients)
 if (ctx.author.voice):
 if voice == None:
 channel = ctx.message.author.voice.channel
 voice = await channel.connect()

 # Youtube Magic
 ydl_opts = {
 'format': 'worstaudio/worst',
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }],
 }

 if "http" not in url:
 yt = YoutubeSearch(url, max_results=1).to_json()
 print(yt)
 yt_id = str(json.loads(yt)['videos'][0]['id'])
 yt_channel = str(json.loads(yt)['videos'][0]['channel']).strip().replace(" ", "")
 url = 'https://www.youtube.com/watch?v='+yt_id+"&ab_channel="+yt_channel

 with yt_dlp.YoutubeDL(ydl_opts) as ydl:
 song_info=ydl.extract_info(url, download=False)
 for file in os.listdir("./"):
 if file.endswith(".mp3"):
 os.rename(file, "song.mp3")

 voice.stop()

 embed_trk = discord.Embed(
 title="Now playing",
 color=ctx.author.color,
 )
 video_title = song_info.get('title', None)
 video_channel = song_info.get('uploader', None)
 embed_trk.add_field(name="Track title", value=video_title, inline=False)
 embed_trk.add_field(name="Channel", value=video_channel, inline=False)

 await ctx.send(embed=embed_trk)
 player = await YTDLSource.from_url(url, loop=client.loop, stream=True)
 voice.play(player, after=lambda e: print(f'Player error: {e}') if e else None)
 while voice.is_playing():
 await asyncio.sleep(1)
 
 await request_record(ctx, video_title)

 else:
 await ctx.send("You must be in a voice channel to run this command")



-
Youtube WatchMe android project Login issue
16 septembre 2015, par KichuI created live streaming application using https://github.com/youtube/yt-watchme. And its installed on android phone.If I logged into this app.I’s still shows the "Not Signed in" Message. After login its showing the following error in android studio console
09-16 16:48:01.970 25937-3107/com.google.android.apps.watchme E/WatchMe﹕ com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. The API (YouTube Data API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"reason": "accessNotConfigured",
"extendedHelp": "https://console.developers.google.com"
}
],
"message": "Access Not Configured. The API (YouTube Data API) is not enabled for your project. Please use the Google Developers Console to update your configuration."
}
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1056)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
at com.google.android.apps.watchme.util.YouTubeApi.getLiveEvents(YouTubeApi.java:155)
at com.google.android.apps.watchme.MainActivity$GetLiveEventsTask.doInBackground(MainActivity.java:312)
at com.google.android.apps.watchme.MainActivity$GetLiveEventsTask.doInBackground(MainActivity.java:295)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)How can i solve this issue please help.
This application is connecting to
YouTube Watch Me
project.Is it possible to connect my project using client Id and client secret(How can i configure my client id to this app ?) ?Please suggest