
Recherche avancée
Autres articles (78)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans 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 (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin 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 (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (6383)
-
Having issues parsing cropdetect values from ffmpeg in batch script
23 mars 2024, par Alex SadlerI have this script that I'm trying to write that finds video files in a dir, automatically removes black bars and transcodes to x265...


@echo off
setlocal enabledelayedexpansion

REM Loop through all video files in the current directory
for %%F in (*.mp4, *.avi, *.mkv, *.ts) do (
 echo Processing "%%F"

 REM Use FFMPEG to detect crop values
 for /f "tokens=*" %%a in ('ffmpeg -i "%%F" -vf "cropdetect" -f null - 2^>^&1 ^| find /i "crop="') do (
 set cropfilter=%%a
 )

 REM Extract the crop filter result
 set cropfilter=!cropfilter:*crop=! 
 set cropfilter=!cropfilter: =!

 REM Use the detected crop filter to crop the video
 if not "!cropfilter!"=="" (
 echo Detected crop filter: !cropfilter!
 ffmpeg -i "%%F" -map 0:v:0 -map 0:a:0 -map 0:s? -c:v:0 libx265 -crf 18 -vf "crop=!cropfilter!" -c:a:0 aac -ac 2 -b:a:0 256k -c:a:1 aac -ac 6 -b:a:1 512k -c:s copy "encoded.mkv"
 ) else (
 echo No cropping needed for "%%F".
 )
)

echo Processing complete.
pause



I'm struggling to correctly parse the crop values output from the initial ffmpeg query though. What its grabbing at the moment is :


detect_0@000001ce4b0e2040]x1:0x2:1919y1:131y2:948w:1920h:816x:0y:132pts:625483604t:6949.817822limit:0.094118crop=1920:816:0:132



When I really just need this bit :


crop=1920:816:0:132



So that I can call it in the transcode command.


Thanks in advance.


-
Révision 22431 : echapper les script et les iframe dans l’espace prive, pour eviter de l’injection...
16 octobre 2015, par cedric@yterium.com -
Anomalie #620 (En cours) : maintenir à jour les fonctions tierces incluses dans SPIP (script exter...
7 juillet 2011, par cedric -