Recherche avancée

Médias (91)

Autres articles (112)

  • 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 ) (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (14004)

  • Revision 32596 : minuscules et fin pour aujourd’hui

    1er novembre 2009, par fil@… — Log

    minuscules et fin pour aujourd’hui

  • Video conversion with ffmpeg to target Android and iOS mobile devices

    17 novembre 2017, par Lee Brindley

    I’m building a react native app for both Android and IOS, the back-end API is written with NodeJS.

    Users may upload video from their phones, once uploaded the user and their friends will be able to view the video - so the videos need to be stored in a format which is playable on both Android & IOS.

    My question relates to the conversion of video, uploaded by the user. I developed a similar app a couple of years ago ; I used the repo node-fluent-ffmpeg which provides a nice API to interact with FFmpeg.

    In the previous project (which was a web app), I converted the uploaded videos into two files, one .mp4 and one .webm - if a user uploaded an mp4, then I would skip the mp4 step, likewise if they uploaded a .webm.

    This was kind of slow. Now I’ve come across the same requirement years later, after some research I think I was wrong to convert the videos to the last project.

    I’ve read that I can simply use FFmpeg to change the container format of the videos, which is a much faster process than converting them from scratch.

    The video conversion code I used last time went something along the lines of :

    var convertVideo = function (source, format, output, success, failure, progress) {

       var converter = ffmpeg(source);

       var audioCodec = "libvorbis";

       if (format.indexOf("mp4") != -1) {
           audioCodec = "aac";
       }

       converter.format(format)
           .withVideoBitrate(1024)
           .withAudioCodec(audioCodec)
           .on('end', success)
           .on('progress', progress)
           .on('error', failure);

       converter.save(output);
    };

    Usage :

    Convert to mp4 :

    convertVideo("PATH_TO_VIDEO", "mp4", "foo.mp4", () => {console.log("success");});

    Convert to webm :

    convertVideo("PATH_TO_VIDEO", "webm", "foo.webm", () => {console.log("success");});

    Can anyone point out a code smell here regarding the performance of this operation ? Is this code doing a lot more than it should achieve cross-platform compatibility between IOS and Android ?

    Might be worth mentioning that support for older OS versions is not such a big deal in this project.

  • Continuous RTMP Streaming with FFmpeg Without Restarting the Process for New Videos

    3 avril 2024, par 刘小佳

    I'm facing a challenge with my workflow and would appreciate any guidance or solutions you might have. My business scenario involves a service that periodically generates new video files locally (e.g., 1.mp4, 2.mp4, ...). These files are then streamed to an RTMP server using FFmpeg, and clients pull the stream via HTTP-FLV for playback.

    


    My goal is to ensure continuous streaming between video files without restarting the FFmpeg process each time a new video is ready to be streamed. Restarting FFmpeg for each new file introduces a disconnect in the client playback, which I'm trying to avoid to maintain stream continuity.

    


    I've explored several approaches based on the FFmpeg Concatenate wiki (https://trac.ffmpeg.org/wiki/Concatenate), but haven't achieved the desired outcome :
    
Approach 1 :
    
Using a list.txt file with ffconcat version 1.0 and dynamically updating the file (next.mp4) being played :

    


    ffconcat version 1.0
file next.mp4
file next.mp4


    


    And then streaming with :
ffmpeg -re -stream_loop -1 -f concat -i list.txt -flush_packets 0 -f flv rtmp://xxx
    
However, when attempting to replace next.mp4 (e.g., moving 2.mp4 to next.mp4 during the streaming of 1.mp4), I encountered a "device busy" error.
    
Approach 2 :
    
Using a nested list approach where list1.txt includes 1.mp4 and list2.txt, and vice versa :

    


    // list1.txt
ffconcat version 1.0
file '1.mp4'
file 'list2.txt'
// list2.txt
ffconcat version 1.0
file '2.mp4'
file 'list1.txt'


    


    Streaming with : ffmpeg -re -stream_loop -1 -f concat -i list1.txt -flush_packets 0 -f flv rtmp://xxx
    
In this setup, I tried modifying list1.txt to replace 1.mp4 with 3.mp4 during the streaming of 2.mp4, but FFmpeg would loop back to 1.mp4 and 2.mp4 before streaming 3.mp4 in the next cycle.

    


    Am I missing something in my methods ? Does anyone have a better approach to fulfill this requirement ? Any help would be greatly appreciated !