Recherche avancée

Médias (1)

Mot : - Tags -/vidéo

Autres articles (44)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (11129)

  • Simples loop to iterate over files and send them to ffmpeg

    25 octobre 2019, par user2752471

    I want to do a shell script that will iterate over several video files in a directory, send everyone of them to ffmpeg, that will then reencode each one, producing a reencoded file that will have the same name as the original, except with .avi extension instead .mkv or .mp4.

    I found a fairly simple script in another topic here on SO, tried to change it slightly to take into account the file extension and the destination directory.

    However my script only produces countless "anything : No such file or directory"

    Here is it :

    $ for f in $(find -type f -name *.mkv); do ffmpeg -n -i "$f" -c:v copy ".$f" ; done

    And these is the ffmpeg command that I usually use :

    ffmpeg -y -i  -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -pass 1 -an -f avi /dev/null && ffmpeg -i -c:a libmp3lame -b:a 48k -ac 1 -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -pass 2  .avi

    So I need to identify what is incorrect in the first script, that is considering each small word of the file’s name as a file, and then change it as to add all these ffmpeg parameters.

    Somethings that I do not understand in the script :

    1)Are the -type and f in find command necessary. From what I read of the documentation, all it does is to tell find that it shall look for normal files, something that seems irrelevant for my case. When I use find, I do : find starting dir -name filename. So do I have to keep it ?

    2)What -n means for ffmpeg ? I am currently without a man entry for ffmpeg. Is it necessary for my needs ?

    3)Do I need to have "" around $f ? What it does ?

    4)As far as I understand $ denotes a variable. But what the "f" after it does ? Do I need it ?

    5)The " ;" after the closing ")" and the ".$f" are necessary ? The first is used to indicate the end of the for loop,and the second the end of the ffmpeg command ?

    6)The "do" and the "does" are also necessary for the same motives behind the " ;"

    Here is my attempt of the ffmpeg part of the script. Please tell me what to change on it, as in the find part of it.

    do ffmpeg -n -y -i "$f.mkv" -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -pass 1 -an -f avi /dev/null && ffmpeg -n -i "$f" -c:a libmp3lame -b:a 48k -ac 1 -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -pass 2  ".$f.avi" ; done

    If I would like the script to also look for ".mp4" besides ".mkv" how I would need to change it ?

    Thanks for any input.

  • Odd X server error with ffmpeg

    4 novembre 2013, par jhc

    I am building a weather data acquisition system. One of the things I would like to do would be to animate the satellite data that is arriving every 15 minutes. In fact, I have already devised a script (called animate) that successfully joins eight hours worth of PNG images into an AVI video file. This runs fine when run manually from the terminal.

    Unfortunately, the same cannot be said when run from my (as in my user, not root) crontab.

    Below is the cron job that I mentioned :

    1,16,31,46 * * * * /home/daniella/bin/anim_all > /home/daniella/logs/anim_all.log 2>&1

    anim_all simply calls animate for each distinct data product :

    #!/bin/bash
    set -x
    cd /home/daniella/data/imager

    rm -rf HRIT_MSG3_*.avi

    animate HRIT_MSG3_CTT
    animate HRIT_MSG3_IR108
    animate HRIT_MSG3_VIS006
    animate HRIT_MSG3_WV062

    And animate itself calls ffmpeg.

    #!/bin/bash

    set -x
    cd /home/daniella/data/imager
    product=$1
    hl="$product.8hl"

    declare -i i=0
    for file in $(cat $hl); do
       link=$(printf "images%02d.png" $i)
       ln -sf $file $link
       i=$((i+1))
       echo $i
    done

    ffmpeg -sameq -r 15 -i images%02d.png $product.avi
    rm -rf images*.png

    Just to be clear, the .8hl file is simply a list of PNG file paths that refer to that last 8 hours of data. Since there is new data every 15 minutes, that is a text file with 32 lines. Finally, this is the error that is returned when examining anim_all.log (referred in the crontab) file.

    + animate HRIT_MSG3_CTT
    animate: unable to open X server `' @ animate.c/AnimateImageCommand/365.
    + animate HRIT_MSG3_IR108
    animate: unable to open X server `' @ animate.c/AnimateImageCommand/365.
    + animate HRIT_MSG3_VIS006
    animate: unable to open X server `' @ animate.c/AnimateImageCommand/365.
    + animate HRIT_MSG3_WV062
    animate: unable to open X server `' @ animate.c/AnimateImageCommand/365.

    Please note that anim_all works fine, when called manually from the terminal. This error exists only when called by cron. I would imagine that this has to do with environment variables, but I have sourced my .bashrc inside the script to no prevail.

    EDIT -
    Investigating the animate.c file itself (see the full code here), at lines 365-368, there is this :

    if (display == (Display *) NULL)
       ThrowAnimateException(XServerError,"UnableToOpenXServer",
       XDisplayName(server_name));
    (void) XSetErrorHandler(XError);

    In response, I have attempted to export the $DISPLAY variable to 127.0.0.0:0 in the animate script, but this has not worked.

  • FFmpeg Degrades Quality of Video

    31 mars 2015, par elliotsandbox

    I have been tasked with converting a batch of videos from MOV to MP4 for an application my company is building. We’re converting the videos because a short MOV file has an extremely large file size (well over five hundred megabytes), obviously not what we want for a mobile application. Now I tried directly converting MOV to MP4 however FFmpeg produces broken MP4 files. I overcame this by converting MOV to AVI then the AVI to MP4. Huzza ! It works, however the quality is slightly degraded.

    Here is the code I am executing to convert the videos, it’s in Lua.

    os.execute(("./ffmpeg/ffmpeg -i %s %s/%s.avi"):format(inputDir[video], finalDirectory, friendlyName))
    os.execute(("./ffmpeg/ffmpeg -i %s/%s.avi %s/%s.mp4"):format(finalDirectory, friendlyName, finalDirectory, friendlyName))
    os.execute(("rm -r %s/%s.avi"):format(finalDirectory, friendlyName))

    I’ve had a look around and see that I should look at codecs and stuff. However my mind comes to a complete blank when it comes to codecs. I am certain that all I need is an extra parameter and the videos will just be fine.

    Any help is greatly appreciated !