
Recherche avancée
Médias (1)
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (112)
-
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 ;
-
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 (12156)
-
merge multiple ffmpeg commands into one line to make the whole process faster
8 septembre 2020, par user1hjgjhgjhggjhgI want to merge multiple commands into one so that whole processing time would be fastest. What I am doing so far is


- 

-
A video file is uploaded from a webform and and server upload into a temp directory.


if (move_uploaded_file($_FILES[$param]['tmp_name'], $filePath)) {


 return $filePath;
 }



-
add black borders around the video(through ffmpeg command) - video uploads again to a directory


$command_new = "ffmpeg -i $filePath -vf 'scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2,setsar=1' $video_file";
 exec($command_new);



-
optimizing the video(ffmpeg command) - video uploads again to a directory


$cmd_new = "ffmpeg -i $video_file -c:v libx264 -crf 28 $optimizeResultFile";



-
merging the uploaded file with the existing video file present in the database into one and uploading that file into directory(through ffmpeg command)


$command_new = "ffmpeg -i $optimizeResultFile -i $second_video_path -filter_complex '[0:v]pad=iw*2:ih[int];[int][1:v]overlay=W/2:0[vid]' -map [vid] -c:v libx264 -crf 23 -preset veryfast $videomerge";



-
//add custom sound in that final merged video


$cmd_new = "ffmpeg -i $videomerge -i $audio -c:v copy -c:a aac -shortest -map 0:v:0 -map 1:a:0 $with_new_audio";















Is it possible to do all at one command and not in multiple commands. This process takes 1 min to upload a final file. want to make it faster


-
-
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));
 }
}