Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (22)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • 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

Sur d’autres sites (5165)

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

  • Add logo on concatenated video

    5 septembre 2020, par ottpeter

    I'm trying to add a logo on top of a concatenated video. The video concatenation and the adding of the logo should be in the same filter complex. My filter complex currently looks like this (it is generated by Bash) :

    &#xA;

    [0:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v0];[1:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v1];[2:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v2];[3:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v3];[4:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v4];[5:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v5];[6:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v6];[7:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v7];[8:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v8];[9:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v9];[10:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v10];[11:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v11];[12:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v12];[13:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v13];[14:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v14];[15:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v15];[16:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v16];[17:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v17];[18:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v18];[19:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v19];[20:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v20];[21:v]scale=854:480:force_original_aspect_ratio=1,pad=width=854:height=480:x=&#x27;if(lt(in_w,854),(854-in_w)/2,0)&#x27;:0,setsar=1[v21];movie=/home/logo.png, scale=180:-1 [logo];&#xA;[v0][v1][v2][v3][v4][v5][v6][v7][v8][v9][v10][v11][v12][v13][v14][v15][v16][v17][v18][v19][v20][v21] concat=unsafe=1:n=22:v=1:a=0[conc]; [conc][logo] overlay=50:50 [outv];&#xA;

    &#xA;

    On 0bin, it is easier to read. So, there is a really long video concatenation part, and on the end, I would try to add the logo like this :

    &#xA;

    &#xA;

    [conc][logo] overlay=50:50 [outv] ;

    &#xA;

    &#xA;

    This is the error I'm getting :

    &#xA;

    [AVFilterGraph @ 0x5640862fc520] No such filter: &#x27;&#x27; &#xA;Error initializing complex filters.&#xA;Invalid argument&#xA;

    &#xA;

    How to do this correctly ?

    &#xA;

    EDIT :&#xA;This is the Bash script :

    &#xA;

        echo "Creating the video list..."&#xA;    # Number of videos&#xA;    VID_NUMBER=$(find $VIDS_PATH -maxdepth 1 -type f -printf . | wc -c)&#xA;    # File names can not contain spaces. INPUT_LIST will contain the list of input files, all files in VIDS folder.&#xA;    INPUT_LIST=""&#xA;    for file in $VIDS_PATH*&#xA;    do&#xA;        if [ ${file: -4} == ".jpg" ]&#xA;        then&#xA;            INPUT_LIST="${INPUT_LIST} -loop 1 -t $IMAGE_DURATION -i $file"&#xA;        else&#xA;            INPUT_LIST="${INPUT_LIST} -i $file"&#xA;        fi&#xA;    done&#xA;&#xA;    echo "Creating filter complex..."&#xA;    # This is the beginning of the filter that is used for concatenation. Has to be an entry for all videos.&#xA;    FILTER_COMPLEX_LIST=""&#xA;    for ((i=0; i&lt;$VID_NUMBER; i&#x2B;&#x2B;))&#xA;    do&#xA;        FILTER_COMPLEX_LIST="${FILTER_COMPLEX_LIST}[$i:v]scale=$RES_X:$RES_Y:force_original_aspect_ratio=1,pad=width=$RES_X:height=$RES_Y:x=&#x27;if(lt(in_w,$RES_X),($RES_X-in_w)/2,0)&#x27;:0,setsar=1[v$i];"&#xA;    done&#xA;&#xA;    # Insert logo&#xA;    FILTER_COMPLEX_LIST="${FILTER_COMPLEX_LIST}movie=$LOGO, scale=180:-1, setpts=PTS-STARTPTS [logo];"&#xA;&#xA;    # Filter final line. This is also generated in a loop. Tells ffmpeg which videos to concat and specifies output [outv]. No sound.&#xA;    FILTER_FINAL_LINE=""&#xA;    for ((i=0; i&lt;$VID_NUMBER; i&#x2B;&#x2B;))&#xA;    do&#xA;        FILTER_FINAL_LINE="${FILTER_FINAL_LINE}[v$i]"&#xA;    done&#xA;    FILTER_FINAL_LINE="${FILTER_FINAL_LINE} concat=unsafe=1:n=22:v=1:a=0[conc]; [conc][logo] overlay=50:50 [outv];"&#xA;&#xA;    # Run ffmpeg&#xA;    date &#x2B;"%Y %b %d %H:%M:%S Starting ffmpeg to stream videos ..." >> /home/streamer.log&#xA;    ffmpeg \&#xA;        -y \&#xA;        -fflags &#x2B;genpts \&#xA;        $INPUT_LIST \&#xA;        -filter_complex "\&#xA;        $FILTER_COMPLEX_LIST \&#xA;        $FILTER_FINAL_LINE" \&#xA;        -map "[outv]" \&#xA;        $OUTPUT_SETTINGS \&#xA;        $OUTPUT&#xA;&#xA;        sleep 1&#xA;done&#xA;

    &#xA;