
Recherche avancée
Autres articles (84)
-
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 (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (11409)
-
We're Creating a New AI tool and Got Stuck on This 1 Step [closed]
22 février 2024, par DanielThanks for helping with this question,


Anybody who knows PHP, React js, FFmpeg, or Open AI API can help here :


We are currently creating a tool with PHP laravel and React JS. It lets normal creators input a simple text prompt and they'll get a fully original short (30 video fast-paced video) for their channel. But we have an output problem :


- 

- On the output of the videos, there's supposed to be AI generated images that have cool animations in order to make everything more fast paced. But our developers are making animations that are super slow and not dynamic or interesting enough. What open source library/tech could we use to create stunning animations and more action ?! Any suggestions would help here,





We are currently using an FFmpeg to create a video automatically for our users. The videos consists of [images, captions, voiceover, background music, and animations) all generated by our AI tool and put together.


Here's what we want as a video (dynamic, fast paced, and many animations) : https://drive.google.com/file/d/1ONCczJh_Uk9m6oRDPGFQYjJPWUhy8hdV/view?usp=sharing


Here's what we're getting : https://drive.google.com/file/d/1sMKGB88ouTHsEdahc0Zyt8rKEvZWhTco/view?usp=sharing


Thanks for any help here.


-
"How can we use Ffmpeg to apply blur, overlay a logo and waveform, and add a border around a video, step by step ? [closed]
1er février 2024, par itsfaisalkhalidWe're looking to enhance a video using Ffmpeg by implementing several effects sequentially. First, we aim to apply a blur effect to the entire video. Then, we want to overlay a logo and a waveform onto the blurred video. Finally, we need to add a border around the entire composition. This step-by-step process requires precise commands and careful consideration of parameters to achieve the desired result effectively.


I utilized Ffmpeg commands to sequentially apply blur, overlay the logo and waveform, and add a border to the video. I expected each effect to be applied in the specified order, resulting in a visually enhanced video with all desired elements. However, I encountered challenges in properly configuring the parameters for each effect, leading to unexpected results such as misaligned overlays or improper blur intensity.


@echo off
setlocal enabledelayedexpansion

rem Set paths and directories
set "ffmpeg_path=C:\ffmpeg\bin\ffmpeg.exe"
set "input_dir=_input"
set "output_dir=_output"

rem Ensure input and output directories exist
if not exist "%input_dir%" (
 echo Error: Input directory "%input_dir%" not found.
 exit /b 1
)

if not exist "%output_dir%" (
 mkdir "%output_dir%"
)

rem Loop through input directory
for %%t in ("%input_dir%\*.*") DO (

 rem Process each file with ffmpeg
"%ffmpeg_path%" -y -i "%%t" -i logo.png -filter_complex "\
 [0:v]eq=brightness=0.2:saturation=2.0:contrast=1.2, crop=iw/1.2:ih/1.2, \
 boxblur=1:2 [blurred_bg]; \
 [blurred_bg][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h-10)[bg_with_logo]; \
 [0:a]showwaves=s=1080x100:mode=line:colors=white [waveform]; \
 [bg_with_logo][waveform]overlay=10:H-h-10, \
 format=yuv420p[v]; \
 [v]pad=iw+20:ih+20:x=10:y=10:color=white[final_output]" \
 -map "[final_output]" -map 0:a -c:v h264 -c:a aac -b:a 128k -ar 44100 "%output_dir%\temp.mp4"

 rem Check if output file exists
 if exist "%output_dir%\temp.mp4" (
 rem Calculate new MD5 hash
 certutil -hashfile "%output_dir%\temp.mp4" MD5 > "%output_dir%\temp_md5.txt"

 rem Remove ID3 tag metadata
 "%ffmpeg_path%" -i "%output_dir%\temp.mp4" -map_metadata -1 -c:v copy -c:a copy "%output_dir%\%%~nt.mp4"

 rem Clean up temporary files
 del "%output_dir%\temp.mp4"
 del "%output_dir%\temp_md5.txt"
 ) else (
 echo Error: Failed to create output file for "%%~nt"
 )
)

pause




-
Fileupload and ffmpeg processing in one step
22 septembre 2023, par user3142695This is how I handle a file upload in my nodeJS / nestJS application. The file gets directly stored in mongodb using GridFSBucket.


const upload = async (file): Promise<any> => {
 const res = await new Promise(async (resolve, reject) => {
 const { filename, mimetype, createReadStream } = await file

 // Write image to db
 const bucket = new GridFSBucket(this.db)
 const stream = createReadStream()
 const writeStream = bucket.openUploadStream(filename, { contentType: mimetype })
 writeStream.on('finish', async (file) => {
 // do some stuff
 resolve()
 })
 writeStream.on('error', (error) => {
 console.error(error)
 reject(error)
 })
 stream.on('error', (error) => writeStream.destroy(error))
 stream.pipe(writeStream)
 })
 return res
}
</any>


While this is working, I need to convert video files. Therefore I would like to use
ffmpeg
.

Something like (did not test this)


new Promise((resolve, reject) => {
 ffmpeg()
 .input(downloadStream)
 .inputFormat("mp4")
 .setFfprobePath(pathToFfprobe.path)
 .setFfmpegPath(pathToFfmpeg)
 .videoCodec("libx264")
 .audioCodec("libmp3lame")
 .on("error", (err) => {
 console.error(err);
 })
 .save("./??.mp4"); // -> to DB
});



Is it possible to do the upload, processing and db storage in one workflow ? In my code I do the upload and db storing in one step, but I do not get it how to handle the video file processing...