Recherche avancée

Médias (91)

Autres articles (68)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (7731)

  • Building FFMPEG for Visual Studio development

    28 juillet 2016, par gboy

    I’m trying to use ffmpeg in Visual Studio 2013 C++ software (ultimately as part of an OpenCV project) - but right now I’m just trying to get basic FFMPEG functionality. In general, when building in Visual Studio, I build 64—bit software with Multi-threaded DLL runtime libraries. I have built ffmpeg using the general instructions for ’Native Windows compilation using ... MinGW-w64’ at http://ffmpeg.org/platform.html#Windows (I provide a more detailed set of steps I followed below...).

    After building the ffmpeg software on my system, I tried to create a simple ’hello world’ project in Visual Studio 2013. Specifically, I tried to implement the initial tutorial file presented at http://dranger.com/ffmpeg/tutorial01.html. Upon building the project, I get the error :

    c :\msys64\usr\local\ffmpeg\libavutil\common.h(45) : fatal error C1083 : Cannot
    open include file : ’libavutil/avconfig.h’ : No such file or directory

    The following are the detailed steps I took to build ffmpeg and create my basic Visual Studio project :

    ============ Building ffmpeg ===============

    1. Downloaded and intalled msys2-x86_64-20160205.exe from http://msys2.github.io
    2. Ran update-core to update the Msys2 install
    3. Ran pacman -Suu (twice) to complete the update (following the instructions about updating shortcuts, etc.)
    4. Then I quit out of the MSys2 shell and opened the MinGW-w64 Win64 Shell. In this new shell :
    5. Installed the following packages using pacman -S The list of packages I installed is : make, pkg-config, diffutils, mingw-w64-x86_64-yasm, mingw-w64-x86_64-gcc, mingw-w64-x86_64-SDL, git
    6. Then I cd’d into cd /usr/local
    7. Ran git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
    8. I wanted to build the ffmpeg library ’out-of-tree’ of this MSys64 folder. So, in the regular file system of my Windows machine I created a folder at C :\ffmpeg
    9. Back in the Win64 Shell, I cd’d to this new folder : cd /c/ffmpeg
    10. Then ran /usr/loca/ffmpeg/configure --enable-shared
    11. Then make -r
    12. And, finally make install

    Now, if I had to guess, my ’flaw’ was in the options I used when calling the ’configure’ script of ffmpeg. Do I need to use particular options so that I can take the ffmpeg libraries built here and use them as dynamic (DLL) libraries in Visual Studio ?

    ========== Configuring my Visual Studio Project ============

    Here’s how I created a simple hello world project in Visual Studio to see if ffmpeg is working.

    1. I created a new Visual C++ ’Empty Project’ in Visual Studio 2013
    2. I then configured the project properties as follows :

      a. In C/C++ => General => Additional Include Directories, I put

      C :\msys64\usr\local\ffmpeg

      b. In Linker=>General => Additional Library Directories, I pointed to each of the built library folders (basically I pointed at all of the libraries that were built to ensure I was not inadvertently missing the critical one). The list is as follows :

      • C :\ffmpeg\libavcodec
      • C :\ffmpeg\libavdevice
      • C :\ffmpeg\libavfilter
      • C :\ffmpeg\libavformat
      • C :\ffmpeg\libavutil
      • C :\ffmpeg\libswresample
      • C :\ffmpeg\libswscale
      • C :\ffmpeg

      c. In Linker=> Input => Additional Dependencies, I pointed to the particular libraries (again - I pointed to all of the ones present). The list is :

      • avcodec.lib
      • avdevice.lib
      • avfilter.lib
      • avformat.lib
      • avutil.lib
      • swresample.lib
      • swscale.lib
    3. I then created a new source file called ’tut01.c’ and copied/pasted the code from http://dranger.com/ffmpeg/tutorial01.c

    4. Then hit F7 and got the error specified above about not finding avconfig.h

    The above is my best guess as to the steps I need to follow to get this working in Windows (btw, it’s Windows 10, 64-bit) & Microsoft Visual Studio 2013. What should I change to get this basic program to build and run ?

  • skip frame rendering if falling behind

    9 novembre 2016, par Brannon

    I have the code below that uses ffmpeg libraries (v3.1.4 with the Autogen wrapper) to render RTSP video in my application. The code works very well generally. However, the receptical.Write method is not particularly performant. On slow machines my video rendering starts to fall behind. Eventually my buffers fill up and I start to see video corruption. How can I change the code below to skip frames when it starts to fall behind ? If there are multiple frames ready, I really only care to show the frame most recently available — this is live video after all. I believe that the avcodec_send_packet and avcodec_receive_frame methods are approximately 1-to-1.

    while (!token.IsCancellationRequested)
    {
       if (ffmpeg.av_read_frame(pFormatContext, pPacket) != 0)
       {
           // end of the stream
           ffmpeg.av_packet_unref(pPacket);
           ffmpeg.av_frame_unref(pDecodedFrame);
           break;
       }

       if (pPacket->stream_index != pStream->index || (pPacket->flags &amp; ffmpeg.AV_PKT_FLAG_CORRUPT) > 0)
       {
           // this should never happen; we only subscribe to one stream
           // and I believe corrupt packets are automatically discarded
           ffmpeg.av_packet_unref(pPacket);
           ffmpeg.av_frame_unref(pDecodedFrame);
           continue;
       }

       var sendResult = ffmpeg.avcodec_send_packet(pCodecContext, pPacket);
       if (sendResult &lt; 0)
       {
           // one of the possible results is a "buffer full", but I don't think that should happen as long as we call 1-to-1 receive_frame
           ffmpeg.av_packet_unref(pPacket);
           ffmpeg.av_frame_unref(pDecodedFrame);
           _logger.Warn("Failure in FFmpeg avcodec_send_packet: " + sendResult);
           break;
       }

       while (ffmpeg.avcodec_receive_frame(pCodecContext, pDecodedFrame) == 0)
       {
           var src = &amp;pDecodedFrame->data0;
           var dst = &amp;pConvertedFrame->data0;
           var srcStride = pDecodedFrame->linesize;
           var dstStride = pConvertedFrame->linesize;
           ffmpeg.sws_scale(pConvertContext, src, srcStride, 0, height, dst, dstStride);

           sbyte* convertedFrameAddress = pConvertedFrame->data0;

           int linesize = dstStride[0];

           if (receptical == null)
           {
               receptical = writableBitampCreationCallback.Invoke(new DetectedImageDimensions {Width = width, Height = height, Format = DetectedPixelFormat.Bgr24, Linesize = linesize});
           }

           var imageBufferPtr = new IntPtr(convertedFrameAddress);
           receptical.Write(width, height, imageBufferPtr, linesize);

           ffmpeg.av_frame_unref(pDecodedFrame);
       }
       ffmpeg.av_packet_unref(pPacket);
    }
  • Restreaming an rtsp stream through ffmpeg on iOS

    6 avril 2017, par animaonline

    I have an iOS application that displays an rtsp stream from an IP camera on the local network, I would like to restream it to an external server in real time (Wowza to be specific) the server will take care of converting rtsp to HLS so that the users can view the live broadcast on their devices.

    On a computer it would be pretty straight forward :

    ffmpeg [input-options] -i [input-file] [output-options] [output-stream-URI]

    But I need to do it programmatically on iOS, and I’m not really sure if it’s even possible. Anyone ?