Recherche avancée

Médias (91)

Autres articles (72)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans 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 (9964)

  • Code returns AttributeError : 'VoiceChannel' object has no attribute 'play' when running on Discloud

    18 septembre 2023, par Sc4rl3ttfir3

    So, my code works fine when I run it locally, but even after adapting it to run on Discloud, it returns an error I can't solve.

    


    Code :

    


    @bot.command(name='play', help='To play song')
async def play(ctx, url):
    voice_channel = ctx.author.voice.channel

    if voice_channel is None:
        return await ctx.send('You are not connected to a voice channel.')

    async with ctx.typing():
        filename = await YTDLSource.from_url(url, loop=bot.loop)
        
        if ctx.voice_client is not None:
            ctx.voice_client.stop()

        source = discord.FFmpegPCMAudio(
            executable="ffmpeg",
            source=filename
        )
        
        voice_channel.play(source)

    await ctx.send('**Now playing:** {}'.format(filename))


    


    When it runs on the Discloud server, it returns the following error/traceback message :

    


    Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/discord/ext/commands/core.py", line 235, in wrapped
ret = await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user_686208406444572830/Sc4rl3ttb0t.py", line 357, in play 
voice_channel.play(source)
^^^^^^^^^^^^^^^^^^
AttributeError: 'VoiceChannel' object has no attribute 'play'


    


    Anybody with any idea of what is going wrong would be greatly appreciated for helping out

    


  • Force graphic card or player to play at 25 fps even display is connected at 59.9

    15 novembre 2016, par Rkalkani

    My projector is connected at 1920x1080 59.9

    How I can force a graphic card to give output at 25fps or How I can play 25 fps video smoothly with 59.9 refresh rate.

    I used Blueray player and it is playing video smoothly at a constant rate.

    ( I am using MPV and ffmpeg player to play video on computer. )

  • How can I play an MPG file using Electron on windows without converting it ? [closed]

    1er novembre 2024, par Indy Singh

    I am trying to play MPG files in an Electron app on Windows. The files contain mpeg1 encoded video. I am using the video element. I can play MP4 files, but the MPG files do not play. One requirement is to be able to play the video from some arbitrary start time.

    


    Electron uses the Chrome engine to render output. Google Chrome app also cannot play MPG files.

    


    Electron uses ffmpeg.dll to play the video file. As far as I can tell ffmpeg.dll contains the mpeg1 decoder, but the video element does not appear to make use of it.

    


    I know I can convert the video before playing, however conversion takes several minutes and is not an ideal user experience. As a fallback I can convert small segments as needed, which still takes a bit of time, so it is not ideal.

    


    Streaming the video from a server process with on-the-fly conversion is possible, but I believe it may not work well with the need to seek. I could be wrong here.

    


    Any other suggestions would be welcome.

    


    EDIT 1 :
I am developing an Electron App using the programming languages TypeScript, JavaScript and HTML5 and the tools Nodejs and Electron. I did not post a code snippet as I am looking for an approach, not a fix for code. Not sure why this question got flagged as being 'not about programming'.

    


    A Google search does not show many options other than those mentioned below.

    


    EDIT 2 :
Thanks to the suggestion from VC.One I am looking at the JSMPEG library. It does look like it could possibly do the job but with 'numerous limitations'. It also say the other alternative called Broadway is 'huge, compiled with emscripten and quite complicated'

    


    EDIT 3 :
I am now looking hls.js, which I think will likely work for my needs. It integrates well with using the html5 video element. I can use it with on-demand decoding of the MPG MPEG1 video file in small segments.