Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (91)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (13417)

  • check media resolution, if resolution is big ffmpeg it, if output is smaller than original delete the original else delete the output

    13 avril 2015, par The Wolf

    I have my storage VPS filled with videos, and hoping I can free up some space, their resolution is pretty big so I decided to re encode them with ffmpeg to a smaller resolution, I am doing every thing manually, first I check using mediainfo test5.mkv the resolution

    ...
    Width                                    : 1 280 pixels
    ...

    if the width is greater than 720 pixels I issue the following command :

    ffmpeg -i 'test5.mkv' -vf scale=720:-2 -acodec copy -vcodec libx264 -scodec copy -threads 12 -crf 28 -x264-params keyint=240:min-keyint=20 -preset:v slow '[Encoded] test5.mkv'

    then after that I delete the original video if the output has smaller size than the original

    I am hoping there is a script that can automate this, like I will run on a directory then, it will look for all .mkv to subdirectories recursively to perform this checks and actions. How to do this ?

    Also, I am worried that it could fail if I reach automation, since there are special characters in the video’s name of some like single quotes, double quotes, or `, so I will it can be escaped properly.

    Thanks !

    After some google I ended up with the following snippet, I am worried if this is enough, but I’m afraid to run it since I am not sure if it would damage my unix

    #!/bin/sh

    for file in *.{mkv}; do
    target="[720p]-${file%.*}.mkv"
    [[ -f "$target" ]] && { echo "skipping $file - $target exists" ; continue; }


    eval $(ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=height,width "$file")
    size=${streams_stream_0_width}x${streams_stream_0_height}
    if [ "$streams_stream_0_width" -ge 720 ]; then
    echo ffmpeg -i "$file" -vf scale=720:-2 -acodec copy -vcodec libx264 -scodec copy -threads 12 -crf 28 -x264-params keyint=240:min-keyint=20 -preset:v slow "$target"

    fi
    done

    can somebody please tell me if my snippet should work ?

    UPDATE

    as it turns out if [ "$streams_stream_0_width" -ge 720 ]; then fails because the width is not integer ? line 10: [: : integer expression expected I am not sure why it is not integer, how can I make it integer ?

  • ffmpeg change resolution by condition

    29 août 2020, par Tom

    I want to change my video resolution with ffmpeg :

    



    -s 852×480


    



    How can I do it only when video width or height greater than 852×480 ?

    



    I want something like this with ffmpeg, not with my programming language :

    



    if video.width > 852:
   resize width and proportionally resize height

if video.height > 480:
   resize height and proportionally resize width

if video.width > 852 and video.height > 480:
   resize height width


    


  • Add Watermark/Convert Video that Dynamically Changes Resolution

    30 août 2020, par MTG

    I have a IP camera video file that dynamically changes resolution (.ts or .mkv format). If I want to convert the video and/or add a watermark, it appears that FFmpeg always selects the resolution the video clip starts with. Is there a way to automatically upscale the video clip export to the highest resolution in the clip ?