Recherche avancée

Médias (91)

Autres articles (38)

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

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

Sur d’autres sites (5726)

  • Convert simple Bash script to PowerShell ?

    10 février 2015, par vulcan raven

    I have pulled the Bash script from here, which checks the AVI file for bad frames using ffmpeg and cygwin extension. I am able to execute the code in Mingw. I put ffmpeg.exe (ren ffmpeg), cygwin1.dll & cygz.dll in Mingw’s bin dir (/c/mingw/bin/). Now, I am looking to port this bash code to PowerShell. Can anyone shed some PowerShell light on this one ?

    Script : (path : /c/mygw/bin/AviConvert)

    #!/bin/bash

    FFMPEG="ffmpeg"
    LIST=`find | grep \.avi$`

    for i in $LIST; do
       OUTP="$i.txt"
       OUTP_OK="$i.txt.ok"
       TMP_OUTP="$i.tmp"
       if [ -f "$OUTP" -o -f "$OUTP_OK" ] ; then
       echo Skipping "$i"
       else
       echo Checking "$i"...
       RESULT="bad"
       ffmpeg -v 5 -i "$i" -f null - 2> "$TMP_OUTP" && \
           mv "$TMP_OUTP" "$OUTP" && \
           RESULT=`grep -v "\(frame\)\|\(Press\)" "$OUTP" | grep "\["`
       if [ -z "$RESULT" ] ; then
           mv "$OUTP" "$OUTP_OK"
       fi
       fi
    done
  • Getting video metadata in ruby script using ffmpeg, ffprobe or rvideo

    24 janvier 2013, par alex

    I want to get metadata of videos referenced by a URL using Ruby. At this point, I found many related posts, but could not find out how to solve my problem.

    I tried to use RVideo, but when I do :

    file = RVideo::Inspector.new(:file => 'http://www.agreatsite.com/avideo.mp4' ;)

    It throws

    'ArgumentError : File not found (http://www.agreatsite.com/avideo.mp4)...

    So I can't get the information using RVideo (but it works well when I have the file hosted on my local computer).

    I then tried to use ffprobe, but I don't know how to read the output.
    So far, I have the following method, which "shows" the information I want when I run it in the console, but it actually returns "true" and I can't find out how to capture the output I need...

     def media_info
       source = self
       command = <<-end_command
         ffprobe -v quiet -print_format json -show_format -show_streams  #{source}
       end_command
       command.gsub!(/\s+/, " ")
       system(command)
     end

    Would love some help, to make this work with either ffprobe or RVideo !

    UPDATE :
    I found a way to get what I needed. Not sure this is the best way to do it :

    def get_media_duration

    source = self.media[0][:url]    

    command = <<-end_command
     ffprobe -v quiet  -show_streams  #{source}
    end_command
    command.gsub!(/\s+/, " ")

    duration = ""
    IO.popen(command) { |io| while (line = io.gets) do
                           puts "++ "+line.inspect
                           duration = line.split("duration=")[1].gsub("\n", "") if line.split("duration=").length > 1
                         end
                     }
    duration  

    end

    I guess I could make it work that way, but doesn't seem very elegant to me. Better suggestions would be greatly appreciated !

  • How do I make a bash script continue part of a loop only if there is no error in the first step of the loop ?

    30 mars 2012, par Eli Greenberg

    I currently have a .command file for Mac that contains the following :

    for f in ~/Desktop/Uploads/*.flv
    do
        /usr/local/bin/ffmpeg -i "$f" -vcodec copy -acodec libfaac -ab 128k -ar 48000 -async 1 "${f%.*}".mp4
        rmtrash "$f"
    done

    How can I tell bash to only execute rmtrash if ffmpeg doesn't produce an error ?