
Recherche avancée
Autres articles (94)
-
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (6746)
-
How to trim multiple videos and position them to specific position using -filter_complex ?
16 décembre 2023, par Pavlo HolotiukHow do I mix several videos and have them not overlap each other ?
I need to use -filter_complex as I cram many more commands there and seems weird how when I trim video its frames remain and overlap with the other video. I also use tpad to paint the video black where it supposed to be cut but it just makes black images to overlap with other videos instead.


How do I trim and position videos with mix and make sure their frames do not overlap in result ?
Here's the version vithout tpad


./ffmpeg.exe -i input1.mp4 -i input2.mp4 -filter_complex "[0]trim=start=0:end=5[t0];[1]trim=start=5:end=10[t1];[t0][t1]mix=inputs=2" ./output.mp4


It produces such overlapping frames



When adding tpad overlapping changes to mix of frame and black image


./ffmpeg.exe -i input1.mp4 -i input2.mp4 -filter_complex "[0]trim=start=0:end=5[t0];[1]trim=start=5:end=10,setpts=PTS-5/TB,tpad=start_duration=5:start_mode=add:color=black@0x00[t1];[t0][t1]mix=inputs=2" ./output.mp4




The alpha in tpad doesn't seem to do anything either.


-
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 ?