
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (36)
-
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (5393)
-
rtmpproto : Add function to read a number response
14 octobre 2014, par Uwe L. Kornrtmpproto : Add function to read a number response
Packets that contain a number as a result to a rtmp function call are
structured the same way (String, Number, Null, Number). This new method
also includes more bounds checks to better handle packets that are not
structured as expected.Signed-off-by : Martin Storsjö <martin@martin.st>
-
How to setup my complex filter with zoompan and xfade for ffmpeg using Fluent-FFmpeg .complexFilter method ?
20 août 2024, par Rémy Groleaui'm using fluent-ffmpeg with nodejs. My problem is the setup of my complex filter.


const filters = Array.from({ length: imageCount - 1 }).map((_, i) => {
 const rndInt = Math.floor(Math.random() * 1000) + 1

 return {
 zoompanFilter1: {
 filter: 'zoompan',
 options: {
 z: 'min(zoom+0.001,1.3)',
 d: `${imageDuration * 60}`, 
 x: `iw/2-iw*(1/2-${rndInt}/100)*iw/zoom`, 
 y: `ih/2-ih*(1/2-${rndInt}/100)*ih/zoom`, 
 s: '1080x1920', // Output size
 fps: '60'
 },
 inputs: `[${i}:v]`,
 outputs: `zoomed${i}`
 },
 zoompanFilter2: {
 filter: 'zoompan',
 options: {
 z: 'min(zoom+0.001,1.3)', 
 d: `${imageDuration * 60}`, 
 x: 'iw/2-iw*(1/2-33/100)*iw/zoom',
 y: 'ih/2-ih*(1/2-33/100)*ih/zoom',
 s: '1080x1920', // Output size
 fps: '60'
 },
 inputs: [`${i + 1}:v`],
 outputs: `zoomed${i + 1}`
 },
 xfadeFilter: {
 filter: 'xfade',
 options: {
 transition: 'fade', // Crossfade transition effect
 duration: '0.5', // Duration of crossfade in seconds
 offset: `${imageDuration - 1}` // Offset to start the crossfade
 },
 inputs: [`zoomed${i + 1}`, `zoomed${i}`],
 outputs: `crossfaded${i}`
 },
 };
 });



This is my complete code :


async function createVideo() {
 // Escape file paths for Windows
 const videoPath = path.resolve(__dirname+ '/output.mp4').replace(/\\/g, '\\\\');
 const audioPath = path.resolve(__dirname+ '/output.mp3').replace(/\\/g, '\\\\');
 const backgroundMusicPath = path.resolve(__dirname+ '/background-music.mp3').replace(/\\/g, '\\\\');

 const command = ffmpeg();

 const imagesDir = path.join(__dirname, 'images');
 const images = fs.readdirSync(imagesDir)
 .filter(file => /.(jpg|jpeg|png)$/i.test(file)) // Filter image files
 .sort() // Sort filenames to ensure the correct order
 .map(file => path.join(imagesDir, file));

 images.map((image) => command.input(image))

 const imageCount = images.length;
 const audioDuration = await getAudioDurationInSeconds(audioPath);
 const imageDuration = Math.round(audioDuration / imageCount)

 const filters = Array.from({ length: imageCount - 1 }).map((_, i) => {
 const rndInt = Math.floor(Math.random() * 1000) + 1

 return {
 zoompanFilter1: {
 filter: 'zoompan',
 options: {
 z: 'min(zoom+0.001,1.3)', // Reset zoom to 1.0
 d: `${imageDuration * 60}`, // Duration of the zoom effect
 x: `iw/2-iw*(1/2-${rndInt}/100)*iw/zoom`, // Center x
 y: `ih/2-ih*(1/2-${rndInt}/100)*ih/zoom`, // Center y
 s: '1080x1920', // Output size
 fps: '60'
 },
 inputs: `[${i}:v]`,
 outputs: `zoomed${i}`
 },
 zoompanFilter2: {
 filter: 'zoompan',
 options: {
 z: 'min(zoom+0.001,1.3)', // Reset zoom to 1.0
 d: `${imageDuration * 60}`, // Duration of the zoom effect
 x: 'iw/2-iw*(1/2-33/100)*iw/zoom', // Center x
 y: 'ih/2-ih*(1/2-33/100)*ih/zoom', // Center y
 s: '1080x1920', // Output size
 fps: '60'
 },
 inputs: [`${i + 1}:v`],
 outputs: `zoomed${i + 1}`
 },
 xfadeFilter: {
 filter: 'xfade',
 options: {
 transition: 'fade', // Crossfade transition effect
 duration: '0.5', // Duration of crossfade in seconds
 offset: `${imageDuration - 1}` // Offset to start the crossfade
 },
 inputs: [`zoomed${i + 1}`, `zoomed${i}`],
 outputs: `crossfaded${i}`
 },
 };
 });

 command
 .input(audioPath)
 .input(backgroundMusicPath)
 .outputOptions([
 '-pix_fmt', 'yuv420p',
 '-c:v', 'libx264',
 '-c:a', 'aac',
 '-y',
 '-t', `${audioDuration}`,
 '-r', '60',
 '-s', '1080x1920',
 '-preset', 'ultrafast',
 '-map', '[final_video]',
 '-map', '[mixed_audio]',
 ])
 .complexFilter([
 // Apply zoompan filters and xfade transitions
 ...filters.flatMap(({ zoompanFilter1, zoompanFilter2, xfadeFilter }) => [
 zoompanFilter1,
 zoompanFilter2,
 xfadeFilter,
 ]),
 {
 filter: 'concat',
 options: {
 n: imageCount - 1, // Number of videos to concatenate
 v: 1, // Video streams
 a: 0 // No audio streams
 },
 inputs: filters.map((_, i) => `crossfaded${i}`),
 outputs: 'video_sequence'
 },
 {
 filter: 'curves',
 options: 'preset=increase_contrast',
 inputs: 'video_sequence',
 outputs: 'curves'
 },
 {
 filter: 'subtitles',
 options: `./subtitles.ass:fontsdir=./fonts/:force_style='FontName=Montserrat Black Italic,FontSize=17,MarginL=10,MarginV=25,Alignment=10,Spacing=0.2,Outline=0.1,Shadow=1.5'`,
 inputs: '[curves]',
 outputs: 'final_video'
 },
 {
 filter: 'volume',
 options: 0.3, // Adjust the volume to 25% of the original
 inputs: `${imageCount + 1}:a`,
 outputs: 'background_music_adjusted'
 },
 // Apply the amix filter to mix the two audio inputs
 {
 filter: 'amix',
 options: {
 inputs: 2,
 duration: 'first',
 dropout_transition: 0,
 weights: '1 0.25',
 normalize: 0
 },
 inputs: [`${imageCount}:a`, 'background_music_adjusted'],
 outputs: 'mixed_audio'
 },
 ])
 .save(videoPath)
 .on('progress', function(progress) {
 console.log('Processing: ' + progress.percent + '% done');
 })
 .on('end', function(stdout, stderr) {
 // emptyFolder(imagesDir)
 console.log('Transcoding succeeded !');
 }) 
 .on('error', function(err) {
 console.error('Une erreur s\'est produite :', err.message);
 });
}



My problem is i see the 1 image then the transition and i see the 2 image. After that i'm suppose to see the 3 image but i see the 2 image.


I don't understand what i'm doing wrong...


i tried switching the
inputs: [
zoomed$i + 1,
zoomed$i]
toinputs: [
zoomed$i,
zoomed$i+1]
but it just showed the next image and not a loop of consecutive images.

-
How to calculate the number of frames extracted at certain FPS ?
3 juillet 2021, par jonesI have a bunch of videos in a folder at different fps. I need to calculate the number of frames that can be extracted at 0.5 fps.


Its kind of a simple mathematical problem, I need help on the formula.


Thanks