Recherche avancée

Médias (91)

Autres articles (53)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (5142)

  • Process each frame of a video back and compile back into a video

    5 mai 2015, par Namingwaysway

    I have a bash script that takes in an image, and processes the image using convert, tesseract, and a custom python script.

    What I would like to do next, is take in each frame of a video [ideally only processing on "scene" changes], process that frame, and use the resulting frames to build a new video.

    I have been down the path of "dump every frame to an image, batch process it, and compile it back", but I don’t have the storage space for anything over a few seconds with that.

    Any ideas ?

  • Extract thumbnail from video in amazon s3 and store it in amazon s3 [closed]

    24 juin 2021, par Kanav Raina

    I want to extract thumbnail from video and store it on s3.

    


    import ffmpeg

url="https://link_to_s3_video.mp4"

(
    ffmpeg
    .input(url, ss='00:00:03')  
    .output("frame.png", pix_fmt='rgb24', frames='1')  
    .overwrite_output()
    .run()
)


    


    I am able to extract image but now how should I pass this image to file_upload function and store it on s3

    


    def file_upload(file, filename):
    link = f"https://{PUBLIC_BUCKET_NAME}.s3.us-east-2.amazonaws.com/images/{filename}"
    try:
        s3.Object(PUBLIC_BUCKET_NAME, f"images/{filename}").load()
    except ClientError as e:
        if e.response['Error']['Code'] == "404":
            try:
                s3_client.upload_fileobj(
                    file,
                    PUBLIC_BUCKET_NAME,
                    f"images/{filename}",
                    ExtraArgs={'ACL': 'public-read'}
                )

                return 200, link
            except ClientError as e:
                logging.error(e)
                return 500, ""
        else:
            return 500, ""
    else:
        return 409, link


    


    Thanks

    


  • Bot Stops Current Playback When Attempting to Queue Next Song

    8 novembre 2023, par Feras

    Hello Stack Overflow community,

    


    I'm working on a Discord bot in Python using the discord.py library that plays music from YouTube links. The bot is supposed to queue a song when the !play command is used while another song is currently playing. It plays the first song successfully but throws errors when trying to queue the next song and stops the current playback.

    


    Here's a snippet of my code related to the play command :

    


    # ... [other parts of the code] ...

@bot.command()
async def play(ctx, url):
    global queue, current_song
    # ... [code to process the command] ...
    # This is the problematic part
    if not ctx.voice_client.is_playing() and not ctx.voice_client.is_paused():
        ctx.voice_client.play(discord.FFmpegPCMAudio(executable="ffmpeg", source=file_path), after=lambda e: asyncio.run_coroutine_threadsafe(play_next(ctx), ctx.bot.loop))
        current_song = new_song
        await ctx.send(f"🎶 Now playing: **{track_name}** by **{artist_name}**")
    else:
        queue.append(new_song)
        await ctx.send(f"🎵 Added to queue: **{track_name}** by **{artist_name}**")

# ... [rest of the code] ...


    


    When I run the !play command to add a song to the queue, the following errors occur :

    


    [aac @ 000001e574714e80] Number of bands (55) exceeds limit (43).
Error while decoding stream #0:0: Invalid data found when processing input
# ... [other FFmpeg error messages] ...
[INFO] discord.player: ffmpeg process 7944 successfully terminated with return code of 0.
C:\Users\james\Desktop\Pycharm_Python\Mine egne projekter\temp: No such file or directory
[INFO] discord.player: ffmpeg process 9308 successfully terminated with return code of 1.


    


    The first song plays fine, but the bot fails to queue the next song and stops the current song instead.

    


    Can someone help me understand what might be causing these errors and how to fix them ? Any insights or suggestions would be greatly appreciated.

    


    Thank you !

    


    I have updated FFmpeg to version 6.0, and the youtube_dl library is also up to date. The bot is running on a Windows system. I've tried several troubleshooting steps, including generating unique filenames for downloads to avoid conflicts, but the issue persists.