
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (67)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (9540)
-
Piwik analytics database : migrating from MySQL to MariaDB
11 novembre 2015, par Piwik Core Team — MetaThis short blog post is an announcement regarding the Piwik technology stack.
Piwik compatible with MySQL and MariaDB
Since our first public release Piwik uses the open source database server MySQL to store the analytics data.
Piwik is also compatible with MariaDB. MariaDB is an enhanced, drop-in replacement for MySQL.
Upgrading to MariaDB
Many users from our community as well as Piwik Scalability Experts have confirmed that using MariaDB for Piwik has several advantages. MariaDB has in some cases significantly improved query performance and reliability of Piwik. Because MariaDB 5.5 is a complete drop-in-replacement for MySQL 5.5, upgrading can be as easy as running
apt-get install mariadb-server
(or equivalent for your platform). Existing third party techologies such as TokuDB (FAQ) and Galera are fully compatible with MariaDB.Learn more about upgrading to MariaDB : Upgrading from MySQL to MariaDB
In the future, Piwik will stay compatible with both MySQL and MariaDB.
-
How to convert to QString from const char* result from ffmpeg C function
18 octobre 2022, par LucasI use the ffmpeg library in c++ / qt project


extern "C" {
 #include <libavformat></libavformat>avformat.h>
 #include <libavutil></libavutil>dict.h>
}



With this I read the media metadata from a local music file. This works quite fine :


avformat_open_input(&format_song, path, NULL, NULL);

while((tag = av_dict_get(format_song->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))){
 std::cout << tag.key << tag.value << std::endl;
 // tag.value is a const char* (but in C!?)
}



Altough the encoding of the
tag.value
seems to be different for files (maybe saved different in the id3tags). Here are some examples of different title values for different files :

"Töhne" [ö]
"Die Ärzte" [Ä]
"Für Immer"



How to convert this to a readable QString ?


There are some problems with the encoding of special characters. For most cases the following works :


QString result = QString(tag->value).normalized(QString::NormalizationForm_C);
//or:
QString result = QString::fromUtf8(tag->value);



But sometimes this results in a U+FFFD � REPLACEMENT CHARACTER for some "Ü" "Ä" "ß" etc. chars.
But in in that cases
fromLocal8Bit
works. So I end up testing for replacement characters and choose a different conversion :

if(result.contains(QChar::ReplacementCharacter)){
 result = QString::fromLocal8Bit(tag->value);
}



I expect there is a better way to do this ?


-
How to set up my complex filter with zoompan and xfade for ffmpeg using Fluent-FFmpeg .complexFilter method ?
21 août 2024, par Rémy GroleauI'm using fluent-ffmpeg with Node.js. 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 supposed to see the 3 image but I see the 2 image.


What am I 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.