Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (46)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

Sur d’autres sites (5999)

  • Bash script that lists files in a directory doesn't work

    28 juillet 2018, par Fabrizio Gabriele

    I made a bash script because I need to convert a lot of files in a directory from .MOV to .mp4 format.
    I created this script for the purpose :

    #!/bin/bash

    touch .lista
    ls -1 "$1" | grep -i .MOV > .lista
    list= `pwd`/.lista
    cd "$1"
    while read -r line;
       do filename=${line%????}
       ffmpeg -i "$line" -vcodec copy -acodec copy "$filename.mp4"; done < $list
    rm .lista

    This script is supposed to convert me each .MOV file into the directory indicated by $1, but it doesn’t work, it converts me only one file, then it terminates. I can’t understand why. What’s wrong with that ?

  • Bash script stops execution of ffmpeg in while loop - why ?

    20 novembre 2020, par Alex Monthy

    I have this bash script for converting .mp4 video to .mp3 audio.
It runs, but does the loop only once, though there are more mp4 files in /home/myname/mp4dir.

    



    The script converts the first .mp4 file it finds to .mp3, unless there is already an .mp3 file. This should be done in a loop, but after the first call to ffmpeg the script stops.

    



    Why ?

    



    #!/bin/bash
find /home/myname/mp4dir -name "*.mp4" | while read f
do
        fOut=`echo $f | sed s/mp4/mp3/`
        echo "convert $f => $fOut"
        if ! test -f $fOut
        then
                ffmpeg -i $f -vn -f mp3 $fOut
        fi
done


    


  • Batch script to match two filenames in the same folder with different extension

    24 mai 2018, par Ahhhhhhhhhhhhhdfgbv

    I’ve been looking, but I don’t quite understand the regex of matching filenames. I have seen in SO that there are questions that match two filenames in different folders, but I’m looking within the same folder.

    file01.jpg
    file01.wav
    file02.jpg
    file03.jpg
    file04.jpg
    file04.wav

    I want it to match if there is a jpg and a wav to run a ffmpeg script, and if the wav doesn’t have a matching jpg then run another ffmpeg script, and if there is no matching wav to the jpg do another script.

    if( $jpg == $wav ) // matching filenames without extension
       do script1
    else if( $jpg != $wav ) // if there is no matching jpg to wav
       if( empty($jpg) && $wav )
           do script2
       if( empty($wav) && $jpg )
           do script3