Recherche avancée

Médias (91)

Autres articles (41)

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

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (4604)

  • How to fix this script - recursive ffmpeg encoding

    15 août 2019, par Gabriel Luz

    I’ve downloaded some videos from my course and I think they are too big. I need to reencode them to something better and smaller.
    The problem is I made the script but it saves the file in the first folder. I want the output files inside the same folder as the input files. For example :

    Folder 1
    - script.sh
        Folder 2
        - file1.mp4
        - file1.new
        Folder 3
        - file2.mp4
        - file2.new

    I’ve tried using the for loop only, and it was working actually but I couldn’t encode the files recursively. This wouldn’t work. Using find solved the problem, but now the output files are all in the same directory, which is the same directory where the script is located (working directory).

    IFS=$'\n'; set -f
    for i in $(find . -name '*.mp4'); do
       if ($width > 600) && ($width < 800); then
       echo "$i is a 720p video. Let's encode it to VP9."
       notify-send Shrinker "Beginning encoding filename "$i""
       ffmpeg -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1280x720 -b:v 1800k \
           -minrate 900k -maxrate 2610k -tile-columns 2 -g 240 -threads 8 \
           -quality good -crf 32 -c:v libvpx-vp9 -c:a libopus \
           -pass 1 -speed 4 "$(basename "${i/.mp4}")".webm && \
       ffmpeg -y -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1280x720 -b:v 1800k \
           -minrate 900k -maxrate 2610k -tile-columns 2 -g 240 -threads 8 \
           -quality good -crf 32 -c:v libvpx-vp9 -c:a libopus \
           -pass 2 -speed 4 -y "$(basename "${i/.mp4}")".webm
       elif ($width > 800) && ($width < 1081) && ($fps < 31.000); then
       echo "$i is a 1080p video with 30fps or maybe less. Let's encode it to VP9."
       ffmpeg -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1920x1080 -b:v 1800k \
           -minrate 900k -maxrate 2610k -tile-columns 2 -g 240 -threads 8 \
           -quality good -crf 31 -c:v libvpx-vp9 -c:a libopus \
           -pass 1 -speed 4 "$(basename "${i/.mp4}")".webm && \
       ffmpeg -y -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1920x1080 -b:v 1800k \
           -minrate 900k -maxrate 2610k -tile-columns 4 -g 240 -threads 8 \
           -quality good -crf 31 -c:v libvpx-vp9 -c:a libopus \
           -pass 2 -speed 4 -y "$(basename "${i/.mp4}")".webm
       notify-send Shrinker "Beginning encoding filename "$i""
       elif ($width > 800) && ($width < 1081) && ($fps > 49.000); then
       echo "$i is a 1080p video with 50fps or maybe more. Let's encode it to VP9."
       ffmpeg -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1920x1080 -b:v 3000k \
           -minrate 1500k -maxrate 4350k -tile-columns 2 -g 240 -threads 8 \
           -quality good -crf 31 -c:v libvpx-vp9 -c:a libopus \
           -pass 1 -speed 4 "$(basename "${i/.mp4}")".webm && \
       ffmpeg -y -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1920x1080 -b:v 3000k \
           -minrate 1500k -maxrate 4350k -tile-columns 4 -g 240 -threads 8 \
           -quality good -crf 31 -c:v libvpx-vp9 -c:a libopus \
           -pass 2 -speed 4 -y "$(basename "${i/.mp4}")".webm
       notify-send Shrinker "Beginning encoding filename "$i""
       else
       echo "no file found"
       fi
    done

    My script finds every file and encodes them BUT the output files are saved into folder 1. It should save on folder 2 and folder 3.

    I get this:
    Folder 1
    - script.sh
    - file1.webm
    - file2.webm
        Folder 2
        - file1.mp4
        Folder 3
        - file2.mp4

    I want this:
    Folder 1
    - script.sh
        Folder 2
        - file1.mp4
        - file1.webm
        Folder 3
        - file2.mp4
        - file2.webm
  • bash script with conditional arguments and output pipe not working [duplicate]

    19 décembre 2022, par Pavel

    Can u please help me with bash script for ffmpeg ?
Trying to create condition based on args to play OR save media to file, so I've created this kind of IF :

    


    #!/bin/bash

if [ "$1" == "play" ]; then
    POSTFIX="-f matroska - | mpv -"
else
    POSTFIX="-y $OUTPUT"
fi

ffmpeg \
  # skipped personal ffmpeg stuff
  "$POSTFIX"


    


    Now when I try to run it with "play" argument it says :

    


    Unrecognized option 'f matroska - | mpv -'.


    


    So if I add this POSTFIX both variants to command everything works fine...

    


    It looks like something in my bash screens this args or something like that ? Also I don't see in error this dash symbol before f option

    


  • tests : remove stale fate-update.sh script

    1er juin 2014, par Timothy Gu
    tests : remove stale fate-update.sh script
    

    This is the same as 5a15602a4e99c730036c33b467f60248889219e1, which
    accidentally did not get merged.

    Signed-off-by : Timothy Gu <timothygu99@gmail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] tests/fate-update.sh