Recherche avancée

Médias (91)

Autres articles (48)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

Sur d’autres sites (5297)

  • How to write command line argument input redirection within a bash script ?

    3 septembre 2013, par Serg ikS

    I'm putting together a bash script to run movie rendering jobs. ffmpeg expects a multi-line text file as one of the arguments for concatenation filter to join several files into one. Like this :

    ffmpeg -f concat -i mylist.txt -c copy output

    There's also an option to write it all in a single line like so :

    ffmpeg -f concat -i <(printf "file '%s'\n" A.mp4 B.mp4) -c copy Output.mp4

    How do I write the latter for into a bash script, substituting the file names from other variables ? Tryed splitting the variables, but its not the one that works. $A and $B variables contains paths to input files.

    #!/bin/bash
    ...
    TMP_LIST=$(printf "file '%s'\n" ${A} ${B})
    APPEND="${FFMPEG} -f concat -i <<< {${TMP_LIST}} -c copy ${OUTPUT}"
    # run the concatenation:
    $APPEND
  • Bash Script - Rename files that are beginning with a number to two digits [duplicate]

    9 septembre 2018, par Flavorum1

    This question already has an answer here :

    I have a couple of folders that are audiobooks. The files are numbered and I want to convert them to one file.
    I used the following script to convert them :

       #!/bin/bash
       if [ ! -d mp3 ]; then
       mkdir -p mp3;
       fi;
       for f in ./*.flac; do echo "file '$f'" >> mylist.txt; done
       ffmpeg -f concat -safe 0 -i mylist.txt -b:a 320k mp3/title.mp3
       [ -e mylist.txt ] && rm mylist.txt

    My problem is that I have to rename the first ten files because they are not in the right order. The files are named 1 - Title, 2 - Title, 3 - Title and so on. To get the right order I have to rename them to 01 - Title, 02 - Title, ..., 09 - Title.
    How can I do that with a bash script ? Furthermore it would be nice, if the playlist.m3u file would be changed accordingly.

    Thanks for your help.

    @Cyrus posted the right Link to solve my problem.
    The solved script ist :

    #!/bin/bash
    if [ ! -d mp3 ]; then
    mkdir -p mp3;
    fi;
    for f in ./*.flac; do echo "file '$f'" >> mylist2.txt; done
    sort -V mylist2.txt >> mylist.txt
    rm mylist2.txt
    ffmpeg -f concat -safe 0 -i mylist.txt -b:a 320k mp3/title.mp3
    [ -e mylist.txt ] && rm mylist.txt
  • Strange behavior about ”ls | while read" with ffmpeg in shell script [duplicate]

    13 décembre 2018, par user3288408

    This question already has an answer here :

    I created a shell script to convert all wave files to mp3 files. I use Ubuntu 18.04, FFmpeg was installed using apt, and I run my script in bash.

    My script :

    #!/bin/bash

    ls *.wav | while read file
    do
       echo $file
       ffmpeg -i "$file" -codec:a libmp3lame -b:a 192k "${file%.*}.mp3"
    done

    The target files are followings : (include space characters. The real filenames are longer, but I simplified the filenames. Also in this case, the problem occurs)

    % ls *.wav
    '01 A.wav'  '02 A.wav'  '03 A.wav'

    The problem is that sometimes $file in the loop is blank or a part of filename strangely (’echo $file’ shows that), and ffmpeg says ’[broken filename] : No such file or directory’. I confirmed the following things.

    • When I comment out the ffmpeg line, ’echo’ shows what I expected. ($file not broken)
    • When I replace ffmpeg to a similar command like ’lame’, it works. ($file not broken)
    • When I replace ’ls *.wav | while read file’ to ’for file in *.wav’, it works. ($file not broken)

    So, only when I use combination of ’ls’ and ’ffmpeg’, $file is broken. What’s going on ? Or do I misunderstand something ?