Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (46)

  • Personnaliser les catégories

    21 juin 2013, par

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (11061)

  • How can a desktop node.js app play audio that may be controlled by the user like a media player ? [closed]

    19 février, par eedefeed

    I'm building a playlist manager that plays music. How can Node.JS play audio files quickly, reliably and with all the basic level features you would expect from a media player, namely :

    


      

    • play
    • 


    • pause
    • 


    • seek
    • 


    • stop
    • 


    • adjust volume
    • 


    


    I'm targetting windows/linux, but a Windows-only solution but be okay (for now.)

    


    I have tried a number of libraries and methods to play audio but it seems none of them are good enough :

    


      

    • Audic : it's reasonably good, but buggy. The play and pause functions sometimes get switched around. I also recall that there are some issues with uncaught exceptions somewhere in the dependencies that crash the entire app.
    • 


    • OBS : since the app is designed with broadcasting in mind, I've tried to use OBS's API to get it to play media. Unfortunately, it sometimes stops playback during some tracks, which is surprising since its underlying library, FFmpeg, plays them without issue.
    • 


    • node-groove : seems like its underlying library, libgroove, only supports linux. I can't find any builds to download, regardless.
    • 


    


    Attempts to use Speaker (which seems pretty good) have also failed because all the decoders have big issues :

    


      

    • Anything using lame - I want support for all audio, not specific formats.
    • 


    • fluent-FFmpeg - this is a wrapper around FFmpeg's CLI interface. It has no play/pause function, but bonus library fluent-FFmpeg-util adds this feature. Unfortunately, its pause takes about 4 seconds to work, which I'm guessing is to do with a buffer being exhausted. This is just too latent. Seek would also work by stopping the CLI process and reloading the file, which seems massively inefficient.
    • 


    • Node Vlc - promising but ancient library that gives me reams of node-gyp errors on install. Poorly documented and no explanation of what the library to do
    • 


    • VLC Client - this library has uncaught exceptions that crash the app. Wrapping in try/catch doesn't help.
    • 


    • sound play - doesn't support play/pause
    • 


    


    NPM's search function is filled with audio players designed to work in browsers, but I'm not building a web app. I guess it's an option but it seems inelegant to the point of rediculous.

    


    So it seems the best option centres around FFmpeg. FFmpeg has libraries, and I'm aware that node has ways to hook into those libraries via some sort of C or C++ compatibility layer. Unfortunately, official documentation is rather dense. Different unofficial guides seem to be recommending conflicting approaches (and might be dated), and it's difficult to work out whether myriad technologies are working in tandem or are alternatives, renames or replacements : node-gyp, node-api, addons, windows-build-tools, nan, C vs C++, Visual Studio. It's difficult to make any decisions or know where to start.

    


    Perhaps, also, another option is to use a Python library to interact with FFmpeg, since initial searches have indicated this might be possible. I wouldn't know whether this is a good option.

    


    So my question is : what's my best option to play audio ? Is it another NPM module that I'm not aware of ? Is it a compatibility layer with FFmpeg libraries ?

    


  • MP4 file delays to play on browser (ffmpeg with movflags)

    3 septembre 2021, par Mak

    We are trying to make FFMPEG to run with the "-movflags frag_keyframe+empty_moov" option. We do this because we don't have the input video file on a persistent disk, since we use serverless, and original video files are like 40GB+ (so we are basically streaming the video in fragments to ffmpeg and outputting the mp4 also in fragments).

    


    The problem is, when we transcode files to mp4, the resulting mp4 files delays to start playing on browsers, it takes like 5 seconds on Chrome. (example mp4 file)

    


    So we need to fix this so the mp4 files would play faster on the browser. (like a normal mp4).

    


    ffmpeg output log

    


    ffmpeg -i [SIGNED_URL] -filter_complex "[0]scale=-1:360[s0]" -map "[s0]" -f mp4 -ac 1 -ar 44100 -b:a 128k -b:v 1M -bufsize 1M -c:a aac -c:v libx264 -maxrate 1M -movflags +faststart+frag_keyframe+empty_moov+default_base_moof -


    


  • How to play FFMPEG sound sample with OpenAL ?

    22 mars 2016, par Asim

    I am using FFMPEG to load Audio Video from File. It works with video, but I don’t know how to play audio samples.

    Here is my code to get audio samples :

    m_AdotimeBase = (int64_t(m_Adocdec_ctx->time_base.num) * AV_TIME_BASE) / int64_t(m_Adocdec_ctx->time_base.den);  
    if(!m_Adofmt_ctx)
    {
       //AfxMessageBox(L"m_timeBase");
       return FALSE ;
    }
    int64_t seekAdoTarget = int64_t(m_currFrame) * m_AdotimeBase;  


    if(av_seek_frame(m_Adofmt_ctx, -1, seekAdoTarget, AVSEEK_FLAG_ANY) < 0)
    {
       /*CString st;
       st.Format(L"%d",m_currFrame);
       AfxMessageBox(L"av_seek_frame "+st);*/
       m_currFrame = m_totalFrames-1;
       return FALSE ;
    }

    if ((ret = av_read_frame(m_Adofmt_ctx, &packet)) < 0)
           return FALSE;
    if (packet.stream_index == 0)      
    {
       ret = avcodec_decode_audio4(m_Adocdec_ctx, &in_AdeoFrame, &got_frame, &packet);
       if (ret < 0)
       {
           av_free_packet(&packet);
           return FALSE;
       }
    }

    My problem is I want to listen that sample using OPENAL.

    I would appreciate any tutorials or references on the subject.