Recherche avancée

Médias (91)

Autres articles (45)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • 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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (5632)

  • rename files from id3v1 tags in terminal

    13 février 2021, par MenaK

    I have a directory of mp3 files which are all named 1.mp3, 2.mp3 etc..

    


    #dir with numbers for names

10.mp3  15.mp3  2.mp3   24.mp3  29.mp3  33.mp3  38.mp3  42.mp3  47.mp3  51.mp3  56.mp3  60.mp3  65.mp3  7.mp3   74.mp3  79.mp3  83.mp3  88.mp3  92.mp3
11.mp3  16.mp3  20.mp3  25.mp3  3.mp3   34.mp3  39.mp3  43.mp3  48.mp3  52.mp3  57.mp3  61.mp3  66.mp3  70.mp3  75.mp3  8.mp3   84.mp3  89.mp3  93.mp3
12.mp3  17.mp3  21.mp3  26.mp3  30.mp3  35.mp3  4.mp3   44.mp3  49.mp3  53.mp3  58.mp3  62.mp3  67.mp3  71.mp3  76.mp3  80.mp3  85.mp3  9.mp3   94.mp3
13.mp3  18.mp3  22.mp3  27.mp3  31.mp3  36.mp3  40.mp3  45.mp3  5.mp3   54.mp3  59.mp3  63.mp3  68.mp3  72.mp3  77.mp3  81.mp3  86.mp3  90.mp3  95.mp3
14.mp3  19.mp3  23.mp3  28.mp3  32.mp3  37.mp3  41.mp3  46.mp3  50.mp3  55.mp3  6.mp3   64.mp3  69.mp3  73.mp3  78.mp3  82.mp3  87.mp3  91.mp3  96.mp3


    


    I wrote a for loop to extract the title from the metadata using ffmpeg :

    


    for x in *.mp3; do
ffmpeg -i $x ./$("ffmpeg -i $x 2>&1 |grep -E '^\s*title\s*\:\s.*$' |awk -F ' :' '{print $2}'".mp3
done


    


    Instead of extracting the title and renaming the file it says that the file '.mp3' already exists, would I like to rewrite it. when I type y to rewrite this new '.mp3' the same things just happens again.
I fixed the problem by putting the full path of the output file in double quotes instead of just the title extraction command

    


    for x in *.mp3; do
ffmpeg -I $x "./$(ffmpeg -i $x 2>&1 |grep -E '^\s*title\s*\:\s.*$' |awk -F ' :' '{print $2}'
)".mp3
done


    


    My question is why does it create a new file called .mp3 when I only wrap the title extraction command in quotes and not the whole path ?

    


    I'm sorry if this is a little lengthly, Im new to stack overflow

    


  • aarch64 : cabac_encode_{decision,bypass,terminal}_asm

    19 novembre 2014, par Janne Grunau
    aarch64 : cabac_encode_decision,bypass,terminal_asm
    

    benchmarks on a Nexus 9 (nvidia denver) :
    101.3 cycles in x264_cabac_encode_decision_c, 67105369 runs, 3495 skips
    97.3 cycles in x264_cabac_encode_decision_asm, 67105493 runs, 3371 skips
    132.8 cycles in x264_cabac_encode_terminal_c, 1046950 runs, 1626 skips
    116.1 cycles in x264_cabac_encode_terminal_asm, 1048424 runs, 152 skips
    92.4 cycles in x264_cabac_encode_bypass_c, 16776192 runs, 1024 skips
    89.6 cycles in x264_cabac_encode_bypass_asm, 16776453 runs, 763 skips

    Cycle counts are not as stable as one would like. The dynamic code
    optimisation seems to produce different results for small chnages in a
    binary. Repeated runs with the same binary produce stable results
    though (ignoring the first run).

    • [DH] Makefile
    • [DH] common/aarch64/asm-offsets.c
    • [DH] common/aarch64/asm-offsets.h
    • [DH] common/aarch64/cabac-a.S
    • [DH] common/cabac.h
    • [DH] tools/checkasm.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 ...

    


    Would be happy about any help the cutting already works !

    


    #!/bin/bash

# Function to extract BPM from filename

get_bpm() {
    local filename="$1"
    local bpm=$(echo "$filename" | grep -oE '[0-9]{1,3}' | head -n1)
    echo "$bpm"
}

# Function to cut audio based on BPM
cut_audio() {
    local input_file="$1"
    local bpm="$2"
    local output_file="${input_file%.*}_cut.${input_file##*.}" # Appends "_cut" to original filename

    # Define the number of beats per bar (assuming 4 beats per bar)
    beats_per_bar=4

    # Calculate the duration of each bar in seconds
    bar_duration=$((60 * beats_per_bar / bpm))

    # Define start and end times for each bar range
    start_times=(0 21 33 45 57 69 81 93 105 117 129 141)
    end_times=(20 29 41 53 65 77 89 101 113 125 137 149)

    # Iterate through each bar range
    for ((i = 0; i < ${#start_times[@]}; i++)); do
        start_time=${start_times[$i]}
        end_time=${end_times[$i]}
        echo "Cutting audio file $input_file at $bpm BPM for bar $((i + 1)) ($start_time-$end_time) for $bar_duration seconds..."

        # Cut audio for current bar range using ffmpeg
        ffmpeg -i "$input_file" -ss "$start_time" -to "$end_time" -c copy "$output_file"_"$((i + 1)).${input_file##*.}" -y
    done

    # Check if the output files are empty and delete them if so
    for output_file in "${output_file}"_*; do
        if [ ! -s "$output_file" ]; then
            echo "Output file $output_file is empty. Deleting..."
            rm "$output_file"
        fi
    done

    echo "Audio cut and saved as $output_file"
}


# Main script
if [ "$#" -eq 0 ]; then
    echo "Usage: $0 [audio_file1] [audio_file2] ..."
    exit 1
fi

for file in "$@"; do
    bpm=$(get_bpm "$file")
    if [ -z "$bpm" ]; then
        echo "Error: No BPM found in filename $file"
    else
        cut_audio "$file" "$bpm"
    fi
done


    


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

    


    If you need more details just lmk