
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (41)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne 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 (...)
Sur d’autres sites (6978)
-
How to optimize FFMPEG/ Chromacast video ?
5 août 2021, par HasanRe-broadcast a live broadcast by chromecasting it. The code below delays 5 seconds.


Server I use :
https://instances.vantage.sh/?selected=c5.2xlarge


Can you help me optimize the code ?


chromakey.sh



# Combine two files using a chromakey effects
filter_complex(){
 local videoWith="${1:-1920}" # Video Size
 local videoHeight="${2:-1080}" # Video Size
 local key="${3:-00FF00}" # Colorkey colour - default vaue is 0000FF or green
 local colorSim="${4:-0.2}" # Colorkey similarity level - default value is 0.2
 local colorBlend="${5:-0.1}" # Colorkey blending level - default value is 0.1

 # Update color variable according to user input
 # This makes the matching case insensitive
 if [[ $3 =~ ^[0-9A-F]{6}$ ]]; then
 key=$3
 elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1") = "blue" ]]; then
 key="0000FF"
 elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1") = "green" ]]; then
 key="00FF00"
 elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1") = "red" ]]; then
 key="FF0000"
 elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1") = "purple" ]]; then
 key="0000FF"
 elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1") = "orange" ]]; then
 key="ff9900"
 elif [[ $(tr "[:upper:]" "[:lower:]" <<<"$1") = "yellow" ]]; then
 key="FFFF00"
 fi

 
 filterString="[1:v]scale=$videoWith x $videoHeight,chromakey=0 x $key:$colorSim:$colorBlend[ckout];[0:v]scale=(iw*sar)*max($videoWith/(iw*sar)\,$videoHeight/ih):ih*max($videoWith/(iw*sar)\,$videoHeight/ih), crop=$videoWith:$videoHeight[bg];[bg][ckout]overlay[out]"
 
 printf '%s%s%s%s%s' $filterString
}

ffmpeg -re -stream_loop -1 -i "${1}" -i "${2}" -preset ultrafast -filter_complex "$(filter_complex "${@:4}")" -map '[out]' -c:v libx264 -f flv "${3}"



Usage : ./chromakey.sh mask.mp4 http://example.com/live/broadcast_orj rtmp ://example.com/live/broadcast_greenscreen 1920 1080 green 0.1 0.2


-
ffmpeg - adding Dynamic logo & random position watermark to video ?
9 août 2021, par JackSI am making a tutorial for sending through mail to my uses, and to avoid piracy distribution I thought to put watermarks (
logo.png
) at random places at interval on the videos.

I tried using the command from ffmpeg - Dynamic letters and random position watermark to video ? :


ffmpeg -i input.mp4 \
-vf \
"drawtext=fontfile=font.ttf:fontsize=80:fontcolor=yellow@0.5:text='studentname': \
 x=if(eq(mod(t\,30)\,0)\,rand(0\,(W-tw))\,x): \
 y=if(eq(mod(t\,30)\,0)\,rand(0\,(H-th))\,y)" \
-c:v libx264 -crf 23 -c:a copy output.mp4



But it gave me error :


[NULL @ 0x55c812525600] Unable to find a suitable output format for '\'
\: Invalid argument



-
how to change ffmpeg xstack background color
17 août 2021, par Abdelsalam ElTamawyI creating a 2x2 grid of videos but only had 3 videos. So I created an xstack of these 3 videos. The bottom right corner does not get a video. This causes it to be left to FFmpeg default colour.


Here is the command I use to create the video mosaic :


ffmpeg -i TEST.mkv -i TEST.mkv -i TEST.mkv -filter_complex "
[0:v] scale=960x540 [a0];
[1:v] scale=960x540 [a1];
[2:v] scale=960x540 [a2];
[a0][a1][a2] xstack=inputs=3:layout=0_0|0_h0|w0_0[out]"
 -map "[out]" -f matroska - | ffplay -





How can I make the green corner black or any other colour ?


I'm using FFmpeg version 4.4