
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (62)
-
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
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 -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)
Sur d’autres sites (12156)
-
Overlay a video and an image over a background video and shift that background video's position to the right
4 août 2023, par sybrI'm currently working on a way to improve my production process for the videos that I'm making. I usually edit videos using two folders full of clips. Being able to automate putting these together in Premiere would save me a lot of time.


I'm using the FFMpegCORE C# library, as well as Xabe.FFMpeg to achieve what I'm trying to do, and I've currently reached the point of creating two separate videos using the clips I mentioned earlier.


The final step that I need to solve is to overlay the overlay video (overlay.mp4) over the background video (background.mp4), add an overlay image to add a clean divider (overlay.png) between the edges of the videos, and to somehow shift the position of the background video 33% to the right (background.mp4).


This is the script I've come up with so far :


ffmpeg -i overlay.mp4 -i background.mp4 -i overlay.png -filter_complex \ 
"[1:v]scale=608:1080[a]; [0:v]pad=1920:1080[b]; [b][a]overlay[out]; \
[out][2:v]overlay[out]; [0][1]amix[a];" \
-map [out] -map [a] -c:v libx264 -crf 30 -pix_fmt yuv420p -y output.mp4



Is there a way to shift the background video to the right ? Or should I manually edit the video files ?


Would love some help here, also eager to learn more about FFmpeg, so some explanation would be highly appreciated !


Edit :


Just found the solution, padding the background video for 33% and then cropping the final out back to 1920x1080 seemed to do the trick !


ffmpeg -i overlay.mp4 -i background.mp4 -i overlay.png -filter_complex "[1:v]scale=608:1080[a]; [0:v]pad=2560:0:x=1920:y=1080[b]; [b][a]overlay[out]; [out][2:v]overlay[out]; [out]crop=1920:1080:0:0[out]; [0][1]amix[a];" -map [out] -map [a] -c:v libx264 -crf 30 -pix_fmt yuv420p -y output.mp4



-
Fluent ffmpeg not running synchronously
14 mai 2022, par sciencaholicI am writing a program where I need to process a video multiple times using ffmpeg. The ffmpeg codes (below) are inside a 'then' statement of a promise.



ffmpeg(path)
 .size('640x?')
 .aspect('1:1')
 .autopad('#682BAB')
 .saveToFile(`${userDirPath}/11-${userFileName}`)
 .on('end', () => {
 ffmpeg()
 .input('test-11-start.mp4')
 .mergeAdd(`${userDirPath}/11-${userFileName}`)
 .mergeAdd('test-11-end.mp4')
 .mergeToFile(`${userDirPath}/11-final-${userFileName}`, 'temp/')
 .on('end', () => console.log('FFmpeg done!'));
 });




There is another ffmpeg function after this (same, but with a different aspect ratio) and then, a 'then' statement with some other functions.



The problem is that this ffmpeg function runs asynchronously, and the next statements (which use the resulting file of ffmpeg func) are executed before it finishes executing and so I want it to run synchronously. I've tried async await (below) but it still runs asynchronously. What is wrong with code ?



async function ffmpegMerge() {
 try {
 await ffmpeg(path)
 .size('640x?')
 .aspect('1:1')
 .autopad('#682BAB')
 .saveToFile(`${userDirPath}/11-${userFileName}`)
 .on('end', () => {
 ffmpeg()
 .input(`test-11-start.mp4`)
 .mergeAdd(`${userDirPath}/11-${userFileName}`)
 .mergeAdd(`test-11-end.mp4`)
 .mergeToFile(`${userDirPath}/11-final-${userFileName}.mp4`, 'temp/')
 .on('end', () => console.log('FFmpeg done!'));
 })
 }
 catch (err) {
 return Promise.reject(new Error(err));
 }
}



-
ffmpeg kit flutter IOS No such filter : 'drawtext' Error
6 août 2023, par Patel MilanI am using ffmpeg_kit_flutter and apply drawtext filter on video but i am getting errors
No such filter: 'drawtext'


input video link is input.mp4


This command it working


ffmpeg -y -i input.mp4 -filter_complex '[0]scale=540:-1[s];[s]drawtext=text='your_text_here':fontsize=24:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2' output.mp4



code sample is bellow


/// Create Video With Text
Future<void> createVideoWithText() async {
 final file = File('${(await getTemporaryDirectory()).path}/output.mp4');
 String outPut = file.path;

 String command = "-y -i $inputFilePath -filter_complex '[0]scale=540:-1[s];[s]drawtext=text='MY_TEXT':fontsize=24:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2' $outPut";

 FFmpegKit.executeAsync(
 command,
 (session) async {
 final returnCode = await session.getReturnCode();

 if (ReturnCode.isSuccess(returnCode)) {
print('Success full add text on video');
 }else{print('Error to adding text on video');}
 },
 );
}
</void>