
Recherche avancée
Autres articles (78)
-
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 ;
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (12712)
-
ffmpeg combine existing filter_complex with upscaleto e.g. 720p
24 novembre 2019, par Tom MeyerCurrently I am combining two videos using this filter :
-filter_complex "[1:v][0:v]scale2ref=main_w:ih[sec][pri]; [sec]setsar=1,drawbox=c=black:t=fill[sec];[pri][sec]hstack[canvas]; [canvas][1:v]overlay=main_w-overlay_w"
The output is the following : test.png (Green is the first video input, orange the second one) The whole video (red) has a format of 1600x540 (That might change depending on the input sizes.)
My question is whether there is a way to upscale this video to maybe 1920x1080 or 1280x720 in the same command. By upscaling I mean to change its size and to fittingly insert black bars on the side/top.
-
Normalise video aspect ratio with ffmpeg
4 juillet 2022, par Benjamin TamasiI'm parsing a video stream from an application that receives an h264 stream and writes it to a file. (The frame data is an unencrypted depacketized H.264 elementary stream).


I use
ffmpeg
to resize it to a fixed resolution. (I overlay it on a black canvas with-f lavfi -i color=c=black:s=1920x1080:r=30
) and-filter_complex [1][0]scale2ref=w='if(gt(mdar\,dar),iw,oh*mdar)':h='if(gt(mdar\,dar),ow/mdar,ih)'[2mp4][base];[base][2mp4]overlay=x='(W-w)/2':y='(H-h)/2':eof_action=pass[vout]


My issue is, that since this stream is coming from a phone's camera, whenever the orientation of the phone changes, the stream's aspect ratio changes. It can go from portrait to landscape, and back, in the same stream. When I open the file in
vlc
, it handles it quite nicely by resizing the window of the player to match the aspect ratio as it changes.

How can I "normalise" the video, so it's always nicely overlayed on my black canvas as the aspect ratio changes ? Currently it's just using the initial aspect ratio, and if that changes mid stream, it will ignore the change, effectively distorting the stream by squishing or stretching it.


Is there some way I can get ffmpeg to do this ?


-
Creating marketing videos
7 juin 2020, par CengizI am trying to create a marketing video with multiple images (png/jpg) after adding texts on every single image and of course with their duration. Therefor, I use several ffmpeg commands, because I am not able to do it with just one command.



How can I define a text and a duration for every image before adding it to the video ?



My example batch file :



!/bin/bash



echo "[Start]"
ffmpeg \
 -i '01.jpg' \
 -vf drawtext="\text='Stack Overflow' : fontcolor=white : fontsize=24 : box=1 : boxcolor=black@0.9 : boxborderw=5 : x=(w-text_w)/2 : y=(h-text_h)/2" \
 -codec:a copy \
 -y 'out-a.mp4'
ffmpeg \
 -i '02.jpg' \
 -vf drawtext="\text='Another Text' : fontcolor=white : fontsize=24 : box=1 : boxcolor=black@0.9 : boxborderw=5 : x=(w-text_w)/2 : y=(h-text_h)/2" \
 -codec:a copy \
 -y 'out-b.mp4'
ffmpeg \
 -i '03.jpg' \
 -vf drawtext="\text='Hello World' : fontcolor=white : fontsize=24 : box=1 : boxcolor=black@0.9 : boxborderw=5 : x=(w-text_w)/2 : y=(h-text_h)/2" \
 -codec:a copy \
 -y 'out-c.mp4'
ffmpeg \
 -i out-*.mp4 \
 -vf scale=768x420 \
 -c:v libx264 \
 -r 30 \
 -pix_fmt yuv420p \
 -y 'output.mp4'
echo "[End]"



Thanks to all
Cengiz