Recherche avancée

Médias (1)

Mot : - Tags -/portrait

Autres articles (106)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (11563)

  • Anomalie #3686 : formulaire_editer_article_verifier : vérification incomplète

    21 février 2016, par Peet du

    La ligne https://core.spip.net/projects/spip/repository/entry/spip/prive/formulaires/editer_article.php#L157, vient de
    https://core.spip.net/issues/2508.

    L’avantage (?) de https://core.spip.net/projects/spip/repository/revisions/19075, c’est que ça gère aussi bien les cas de création et de modification d’un article dans une rubrique interdite.

    J’ai donc testé mon patch avec le cas d’un admin restreint et il n’y a pas d’effet de bord : ceci grâce à autoriser_article_modifier().

    Il est donc question ici de compléter/corriger cette demande : il doit être possible de voir et de modifier, même si il est interdit de créer.

    Le bug que j’ai trouvé :

    C’est le cas qui se présente avec le plugin LIM

    1- un article ou des articles ont été créés dans une rubrique ;
    2- puis le webmestre décide plus tard d’interdire la création de nouveaux articles dans cette même rubrique, ceci grâce à une fonction du plugin LIM ;
    3- Mais si il n’est plus possible de créer un article dans cette rubrique, LIM gère le cas où l’auteur veut les modifier ses articles présents dans cette rubrique.

    Donc le bug soulevé vient du fait que le plugin LIM surcharge l’autorisation autoriser_rubrique_publierdans(). Plus exactement, il ajoute une condition.
    voir http://zone.spip.org/trac/spip-zone/changeset/95014/_plugins_/lim/trunk/lim_autorisations.php.

    Je précise que cette fonctionnalité du plugin LIM pose un problème seulement avec l’objet Article. Pas avec les autres objets éditoriaux.

    Voilà. J’espère n’avoir rien oublié.

  • A Soundboard for Discord with Discord.py with already downloaded .mp3 files

    8 août 2019, par Kerberos Kev

    I’m setting up a discord bot with discord.py, and want to implement an soundboard.The soundboard should take already downloaded .mp3 files and play them in the discord. The bot already automatically joins and disconnects from a voice channel but does not play any of my sound files.

    I tried converting the mp3 file into an opus one and just play it without ffmpeg but this didn’t work either.

    import discord
    from discord.ext import commands
    from discord.utils import get
    from mutagen.mp3 import MP3
    import time
    import os

    client = commands.Bot(command_prefix='<')
    a = './'+'kurz-kacken.mp3'


    class Soundboard(commands.Cog):

       def __init__(self, client):
           self.client = self

       @commands.command(pass_context=True)
       async def soundboard(self, ctx, songname: str):
           channel = ctx.message.author.voice.channel
           voice = get(client.voice_clients, guild=ctx.guild)

           if voice and voice.is_connected():
               await voice.move_to(channel)
           else:
               voice = await channel.connect()

               print(f"The bot has connected to {channel}\n")

           # audio = MP3('./'+'kurz-kacken.mp3')
           # a = audio.info.length
           voice.play(discord.FFmpegPCMAudio('./'+'kurz-kacken.mp3'),
                      after=lambda e: print("Song done!"))
           voice.source = discord.PCMVolumeTransformer(voice.source)
           voice.source.volume = 0.07
           # time.sleep(a)
           await ctx.send(f'ended')

           if voice and voice.is_connected():
               await voice.disconnect()


    def setup(client):
       client.add_cog(Soundboard(client))
  • Why do my Windows filenames keep getting converted in Python ?

    13 avril 2024, par GeneralTully

    I'm running a script that walks through a large library of .flac music, making a mirror library with the same structure but converted to .opus. I'm doing this on Windows 11, so I believe the source filenames are all in UTF-16. The script calls FFMPEG to do the converting.

    


    For some reason, uncommon characters keep getting converted to different but similar characters when the script runs, for example :

    


    06 xXXi_wud_nvrstøp_ÜXXx.flac

    


    gets converted to :

    


    06 xXXi_wud_nvrstøp_ÜXXx.opus

    


    They look almost identical, but the Ü and I believe also the ø are technically slightly different characters before and after the conversion.

    


    The function which calls FFMPEG for the conversion looks like this :

    


    def convert_file(pool, top, file):
    fullPath = os.path.join(top, file)
    # Pass count=1 to str.replace() just in case .flac is in the song
    # title or something.
    newPath = fullPath.replace(src_dir, dest_dir, 1)
    newPath = newPath.replace(".flac", ".opus", 1)

    if os.path.isfile(newPath):
        return None
    else:
        print("{} does not exist".format(newPath))
   
        cvt = [
            "Ffmpeg", "-v", "debug", "-i", fullPath, "-c:a", "libopus", "-b:a", "96k", newPath]
        print(cvt)

        return (
            fullPath,
            pool.apply_async(subprocess.run, kwds={
                "args": cvt,
                "check": True,
                "stdin": subprocess.DEVNULL}))


    


    The arguments are being supplied by os.walk with no special parameters.

    


    Given that the script is comparing filenames to check if a conversion needs to happen, and the filenames keep getting changed, it keeps destroying and recreating the same files every time the script runs.

    


    Why might this be happening ?