Recherche avancée

Médias (0)

Mot : - Tags -/interaction

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (60)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (9110)

  • Simple discord.py mp3 bot not playing music

    18 avril 2023, par Lukas Nesvarbu

    Discord bot dosent play anykind of music, neither mine nor other bots codes work he just dosent play music. idk maybe i am just stupid BUT IT DOSENT WORK WHY

    


    import discord
import time
import os
from discord.ext import commands

BOT_TOKEN = "" # put token here

intentss = discord.Intents.default()
intentss.message_content = True
intentss.voice_states = True

bot = commands.Bot(command_prefix=";;", intents = intentss)

OPUS_LIBS = ['libopus-0.x86.dll', 'libopus-0.x64.dll', 'libopus-0.dll', 'libopus.so.0', 'libopus.0.dylib']

@bot.command()
async def join(ctx):
    channelVC = ctx.author.voice.channel
    await channelVC.connect()

@bot.command()
async def leave(ctx):
    await ctx.voice_client.disconnect()

@bot.command()
async def play(ctx):
    voice = ctx.guild.voice_client
    mloc = 'C:/Users/Lukas/Desktop/Bot Bethoven/Youtube/test.mp3'
    voice.play(discord.FFmpegPCMAudio(executable = "C:/ffmpeg/bin/ffmpeg.exe", source = mloc))


bot.run(BOT_TOKEN)


    


    it just give error codes :

    


    discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: Not connected to voice.
INFO     discord.player ffmpeg process 22896 has not terminated. Waiting to terminate...
INFO     discord.player ffmpeg process 22896 should have terminated with a return code of 1.


    


    intresting thing when i put join and play in the same command it dosent show not connected to voice error, actually it dosent show anything and neither plays mp3 file

    


    i tryed reinstalling : PyNaCl, FFmpeg, Visual Code, updating python.
nothing helps. this problem started after i did 1 month break from coding bot, before that it worked fine.

    


    i'm thinking problem is something with my pc, maybe path or something dosent work(because it worked month ago and i didnt do anything to code), i tryed checking but everything seems normal,

    


  • swr : support -async X as a simple way to do what ffmpeg -async X did

    22 décembre 2012, par Michael Niedermayer

    swr : support -async X as a simple way to do what ffmpeg -async X did

  • Is there a simple way to create 8 or 16 bit grayscale videos using matplotlib ?

    19 avril 2022, par user18544920

    I have been reading for 3 days however still can't quite wrap my head around how to do the following. We have been asked to produce a simulation video from matplotlib to evaluate a programme that only accepts u8 or u16 grayscale videos. I have managed to produce the required animated scatterplot using the following code, however only know how to convert to grayscale using the second chunk of code in CV2 that results in a lot of compression.

    


    I would get marked down for both the heavy compression and not doing it within the animation code, however I don't know of a way to do it during the animation code.

    


    Animation code

    


    pixelx = 250  # length of x for resulting movie in pixels
pixely = 250  # length of y for resulting movie in pixels
fig2d = plt.figure(figsize=(pixelx/72, pixely/72), dpi=72)
ax2d = fig2d.add_axes([0,0,1,1])
ax2d.set_axis_off()
scatter2d = ax2d.scatter([], [], s=(pixelx*particle.rad/Env.X)**2, marker='o', edgecolors='none', c='#000000', cmap='gray')
ax2d.set_aspect('auto')
ani2d = FuncAnimation(fig2d, update2d, frames=(duration * fps), init_func=initial2d, blit=False, interval=1000/fps,
                      repeat=True)
ani2d.save('x.avi', writer='ffmpeg', fps=fps, dpi=72)


    


    RGB to grayscale code

    


    import cv2
source = cv2.VideoCapture('x.avi')
frame_width = int(source.get(3))
frame_height = int(source.get(4))
size = (frame_width, frame_height)
result = cv2.VideoWriter('xG.avi',
                         cv2.VideoWriter_fourcc(*'MJPG'), 200, size, 0)
while True:

    ret, img = source.read()

    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

    result.write(gray)

    cv2.imshow("frame", gray)

    key = cv2.waitKey(1)
    if key == ord("q"):
        break

cv2.destroyAllWindows()
source.release()


    


    Any help would be greatly apprciated