Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (48)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications 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, par

    Certains 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 ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (11066)

  • on('progress') not working - node.js ytdl-core fluent-ffmpeg

    9 juillet 2018, par TheBandolero

    So i’m playing with this libraries ytdl-core and fluent-ffmpeg, and basically i got to this function by modifying some examples to fit what i wanted.

    everything works fine except for the second on('progress', progress => ....) call. The first one works as expected, but the second one looks like it isn’t even reached, since Console.log() inside the second on('progress'....) isn’t logging anything at all.

    Also console doesn’t show any errors throughout the whole function, and the outcome is the expected without any problem, except for the second on('progress') issue.

    I can’t figure out what the problem is, so I hope somebody with more experience can point the problem out to me, since it’s getting quite frustrating now...

    function descargarVideoHD(link) {
           ytdl.getInfo(link, (err, info) => {
               if (err) throw err;

               $('li:contains(' + link + ') .progress').css("visibility", "visible");

               var longitudEnTiempo = parseInt(info.length_seconds);
               let id = ytdl.getURLVideoID(link);
               var titulo = limpiarTituloDelVideo(info.title);

               let stream = ytdl(id, {
                   quality: 'highestaudio',
                   //filter: 'audioonly',
               });

               //var audioOutput = path.resolve(__dirname, 'audio_' + titulo + '.mp4');
               var mainOutput = path.resolve(__dirname, titulo + '.mp4');
               var renameFileName = titulo + '.mp4';

               var audioOutput = path.resolve(__dirname, titulo + '.mp3');

               ffmpeg(stream)
                   //.audioBitrate(128)
                   .audioBitrate(256)
                   .save(`${__dirname}/${titulo}.mp3`)
                   .on('progress', (p) => {
                       //readline.cursorTo(process.stdout, 0);
                       //process.stdout.write(`${p.targetSize}kb downloaded`);
                       var hmsA = p.timemark;
                       var aA = hmsA.split(':');
                       var secondsA = parseInt((+aA[0]) * 60 * 60 + (+aA[1]) * 60 + (+aA[2]));
                       var porcentageA = (((secondsA / longitudEnTiempo) * 100) / 2).toFixed(2);
                       $('li:contains(' + link + ') .progress .determinate').css("width", porcentageA + "%");
                       //console.log(titulo + ' procesado al ' + porcentage + '%');
                   })
                   .on('end', () => {
                       ffmpeg()
                           .input(ytdl(link, {
                               filter: format => {
                                   return format.container === 'mp4' && !format.audioEncoding;
                               }
                           }))
                           .videoCodec('copy')
                           .input(audioOutput)
                           .audioCodec('copy')
                           .save(mainOutput)
                           .on('error', console.error)
                           .on('progress', progress => {
                               console.log('Dentro de OnProgress...');
                               var hms = progress.timemark;
                               console.log('Timemark: ' + hms);
                               var a = hms.split(':');
                               var seconds = parseInt((+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]));
                               console.log('Segundos: ' + seconds);
                               var porcentage = ((((seconds / longitudEnTiempo) * 100) / 2) + 50).toFixed(2);
                               console.log('Procesado al ' + porcentage + '%');
                               $('li:contains(' + link + ') .progress .determinate').css("width", porcentage + "%");
                           }).on('end', () => {
                               fs.unlink(audioOutput, err => {
                                   if (err) {
                                       console.error(err);
                                   }
                                   else {
                                       $('li:contains(' + link + ') .progress .determinate').css("width", "100%");
                                       $('li:contains(' + link + ') .secondary-content.material-icons').text('done');
                                       $('li:contains(' + link + ') .secondary-content.material-icons').addClass('text-green');
                                       /* $('li:contains(' + link + ')').remove();
                                       var indexItem = listaEnlacesYoutube.indexOf(link);
                                       listaEnlacesYoutube.splice(indexItem, 1); */
                                   }
                               });
                           });
                   });
           });
       }
  • The proper way to limit framerate when recording screen on macOS

    5 juillet 2024, par jsx

    macOS 14.5, FFmpeg 7.0.1. To record the screen, if I use the code from Wiki, that is,

    


    ffmpeg -f avfoundation -i 1 output.mp4


    


    the frame rate seems to be so high that when I press q to stop recording, the following message persists until my MacBook Pro starts to noise by its cooler : "[q] command received. Exiting."

    


    My current solution is to add -r after -i :

    


    ffmpeg -f avfoundation -i 1 -r 24 output.mp4


    


    But I heard that a more correct solution is to replace -r with -framerate and to put it before instead of after -i :

    


    

    ffmpeg -f avfoundation -framerate 24 -i 1 output.mp4


    


    Note that I used -framerate as an input option instead of -r 24 as an output option, so I'm telling avfoundation to record at 24fps instead of recording at the default fps and then forcing FFmpeg to drop or duplicate frames to give you the desired 24.

    


    


    This doesn't work for me currently, and appears to be the same as I don't use -r at all.

    


    And so, what is the proper way to fix the "too high framerate" issue when recording the screen on macOS ? Do we need -r or instead -framerate, and where to put it, before or after -i ?

    


    Just in case, here is the log of ffmpeg -f avfoundation -i 1 output.mp4 -v verbose :

    


    https://github.com/jsx97/test/blob/main/ffmpeg.log

    


  • Evolution #4573 (Nouveau) : Enlever Jquery UI du Core

    13 octobre 2020

    Jquery UI (https://jqueryui.com/) n’a plus d’activité maintenue (en tout cas aucune release depuis 4 ans maintenant).

    Il serait opportun de supprimer jQuery_UI du core, et de le remplacer par des librairies spécifiques pour les besoins identifiés.

    Tout d’abord l’usage dans le Core.

    Je crois que l’on utilise :

    le dateur

    À remplacer par https://duetds.github.io/date-picker/ ?
    Voir également la discussion sur Saisies : https://git.spip.net/spip-contrib-extensions/saisies/issues/43

    le sortable

    À remplacer par https://sortablejs.github.io/sortablejs/ ?

    D’autres plugins s’appuient sur d’autres éléments le jQuery-UI :

    - Accordéons et Tabs (Fabrique)
    - Une extension picker multidate (Agenda)
    - ...

    Dans un premier temps, il « suffit » qu’ils mettent le plugin jQueryUi actuel en dépendance...
    Dans un second temps... trouver des alternatives adaptées... et faire en sorte qu’elles soient partageables entre différents plugins si besoin.

    Sur le partageables

    Il pourrait y avoir un plugin du core regroupant des librairies js utilisées régulièrement, comme le faisait le plugin jquery-ui, mais avec différentes librairies plus indépendantes.
    Pourquoi pas. Plutôt que de faire N petits plugins JS.