Recherche avancée

Médias (91)

Autres articles (72)

  • 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 (...)

  • 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 (...)

  • 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 (10377)

  • mov : Fix handling of zero-length metadata values

    15 décembre 2014, par Martin Storsjö
    mov : Fix handling of zero-length metadata values
    

    Since 3cec81f4d4, a zero-length metadata value would try to
    allocate 2*0 bytes, where av_malloc() returns NULL.

    Always add one to the allocated length, to allow space for
    a null terminator in the zero-length case.

    Incidentally, this fixes fate-alac on RVCT 4.0, where a compiler
    bug seems to mess up the mov muxer to the point that it writes
    the wrong sort of metadata. Previously this bug was undetected,
    but since 3cec81f4d4 such mov files started returning
    AVERROR(ENOMEM) in the mov demuxer.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavformat/mov.c
  • Script doesnt recognize bars / length right for cutting audio , ffmpeg terminal

    14 avril 2024, par totzillarbeats

    This terminal script doesn't recognize bars / length right for cutting audio, maybe somebody knows what's wrong with the calculation ...

    &#xA;

    Would be happy about any help the cutting already works !

    &#xA;

    #!/bin/bash&#xA;&#xA;# Function to extract BPM from filename&#xA;&#xA;get_bpm() {&#xA;    local filename="$1"&#xA;    local bpm=$(echo "$filename" | grep -oE &#x27;[0-9]{1,3}&#x27; | head -n1)&#xA;    echo "$bpm"&#xA;}&#xA;&#xA;# Function to cut audio based on BPM&#xA;cut_audio() {&#xA;    local input_file="$1"&#xA;    local bpm="$2"&#xA;    local output_file="${input_file%.*}_cut.${input_file##*.}" # Appends "_cut" to original filename&#xA;&#xA;    # Define the number of beats per bar (assuming 4 beats per bar)&#xA;    beats_per_bar=4&#xA;&#xA;    # Calculate the duration of each bar in seconds&#xA;    bar_duration=$((60 * beats_per_bar / bpm))&#xA;&#xA;    # Define start and end times for each bar range&#xA;    start_times=(0 21 33 45 57 69 81 93 105 117 129 141)&#xA;    end_times=(20 29 41 53 65 77 89 101 113 125 137 149)&#xA;&#xA;    # Iterate through each bar range&#xA;    for ((i = 0; i &lt; ${#start_times[@]}; i&#x2B;&#x2B;)); do&#xA;        start_time=${start_times[$i]}&#xA;        end_time=${end_times[$i]}&#xA;        echo "Cutting audio file $input_file at $bpm BPM for bar $((i &#x2B; 1)) ($start_time-$end_time) for $bar_duration seconds..."&#xA;&#xA;        # Cut audio for current bar range using ffmpeg&#xA;        ffmpeg -i "$input_file" -ss "$start_time" -to "$end_time" -c copy "$output_file"_"$((i &#x2B; 1)).${input_file##*.}" -y&#xA;    done&#xA;&#xA;    # Check if the output files are empty and delete them if so&#xA;    for output_file in "${output_file}"_*; do&#xA;        if [ ! -s "$output_file" ]; then&#xA;            echo "Output file $output_file is empty. Deleting..."&#xA;            rm "$output_file"&#xA;        fi&#xA;    done&#xA;&#xA;    echo "Audio cut and saved as $output_file"&#xA;}&#xA;&#xA;&#xA;# Main script&#xA;if [ "$#" -eq 0 ]; then&#xA;    echo "Usage: $0 [audio_file1] [audio_file2] ..."&#xA;    exit 1&#xA;fi&#xA;&#xA;for file in "$@"; do&#xA;    bpm=$(get_bpm "$file")&#xA;    if [ -z "$bpm" ]; then&#xA;        echo "Error: No BPM found in filename $file"&#xA;    else&#xA;        cut_audio "$file" "$bpm"&#xA;    fi&#xA;done&#xA;

    &#xA;

    Maybe its only the math calc in the beginning but idk :)

    &#xA;

    If you need more details just lmk

    &#xA;

  • 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.

    &#xA;

    Code :

    &#xA;

    @bot.command(name=&#x27;play&#x27;, help=&#x27;To play song&#x27;)&#xA;async def play(ctx, url):&#xA;    voice_channel = ctx.author.voice.channel&#xA;&#xA;    if voice_channel is None:&#xA;        return await ctx.send(&#x27;You are not connected to a voice channel.&#x27;)&#xA;&#xA;    async with ctx.typing():&#xA;        filename = await YTDLSource.from_url(url, loop=bot.loop)&#xA;        &#xA;        if ctx.voice_client is not None:&#xA;            ctx.voice_client.stop()&#xA;&#xA;        source = discord.FFmpegPCMAudio(&#xA;            executable="ffmpeg",&#xA;            source=filename&#xA;        )&#xA;        &#xA;        voice_channel.play(source)&#xA;&#xA;    await ctx.send(&#x27;**Now playing:** {}&#x27;.format(filename))&#xA;

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;