Recherche avancée

Médias (91)

Autres articles (84)

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

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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (10910)

  • How to use FFMPEG for a cutaway with audio crossfade ?

    14 mai 2016, par jreikes

    I’m trying to do a "cutaway" (change camera angles) using FFMPEG. I have HLS video from a left camera and a right camera. The start times are a little out of sync, so the left video actually started recording 4.21 seconds after the right video started recording. I’m trying to show the right video from the start to the 5 second mark and then cut over to the left video from its 0.79 second mark until the 5.79 second mark (which would have been the 5-10 second range on the right camera).

    I realize these cuts probably fall on p-frames — that’s part of the test here. I want to see if FFMPEG will properly insert the necessary i-frame to make a smooth cut.

    Finally, to get a smooth final product, I’m trying to do a 1-second audio crossfade during the transition (there’s no need for any video fades).

    I’m new at FFMPEG. I tried the following, but it didn’t work. Anyone know what the correct command would have been ?

    ffmpeg -i right.m3u8 -ss 0 -t 5 -i left.m3u8 -ss 0.79 -t 5 -async 1 -filter_complex acrossfade=d=1:c1=exp:c2=exp mixed.m3u8
  • Opencv/FFMPEG retrieving wrong fps while streaming cameras

    15 avril 2016, par Romanzo Criminale

    I’ve have been trying to retrieve the fps information from different camera stream via RTSP. This is done using the OpenCV library which uses the libavormat provided by ffmpeg. However it seems I can’t rely on the information returned by libav depending on the codec or the camera used. I would like to get a better understanding about how this frame rate are computed etc...

    OpenCV is trying to retrieve the fps of the stream using different properties of AVStream, r_frame_rate, avg_frame_rate and time_base.

    double CvCapture_FFMPEG::get_fps() const
    {
    #if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(54, 1, 0)
     double fps = r2d(ic->streams[video_stream]->avg_frame_rate);
    #else
     double fps = r2d(ic->streams[video_stream]->r_frame_rate);
    #endif

    #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0)
     if (fps &lt; eps_zero)
     {
       fps = r2d(ic->streams[video_stream]->avg_frame_rate);
     }
    #endif

    if (fps &lt; eps_zero)
    {
     fps = 1.0 / r2d(ic->streams[video_stream]->codec->time_base);
    }

    return fps;
    }

    I tried two different camera brands and two different codecs H264, and JPEG. Here are the results, I get :

    Camera 1 running at 15fps (default value)

    camera 1, jpeg

    • r_frame_rate = 15/1
    • avg_frame_rate = 0/0
    • time_base = 1/ 90000
    • tick_per_frame = 1

    camera 1, h264

    • r_frame_rate = 15/1

    • avg_frame_rate = 15/2

    • time_base = 1/ 90000

    • tick_per_frame = 2

    Camera 2 running at 25fps default but the fps is changed within the rtsp url to 12

    camera 2, jpeg

    • r_frame_rate = 12/1

    • avg_frame_rate = 0/0

    • time_base = 1/ 90000

    • tick_per_frame = 1

    camera 2, h264 running at 12fps

    • r_frame_rate = 25/1

    • avg_frame_rate = 0/0

    • time_base = 1/ 90000

    • tick_per_frame = 2

    Also i tried streaming using ffmpeg command line

    ffmpeg -i rtsp://url

    and it seems that only jpeg can return the expected fps.

    Here are the questions have been asking myself :

    1/ what’s really r_frame_rate ?
    It says in the api "[i]it is the smallest frame rate that can accurately represent all timestamps. For example, if you have mixed 25 and 30 fps content, then
    will be 150 (it is the least common multiple).[/i]" I doesn’t make sense to me that it the same time the smallest frame rate (25) and the least common multiple (150).

    2/ How is the avg_frame_rate computed ?
    I had a look at the code but couldn’t really figure out how is this average computed. It seems that most of the time this is returning 0.

    3/ Is there a bug getting the frame rate while using h264 ?
    Using jpeg, it looks like r_frame_RATE can return the actual fps value, but h264 will not work. Are those information not available using h264 ?

    Any help would be appreciated, I spent two days trying to understand why i wasn’t getting the correct values but at this point i’m pretty stuck.
    Thanks in advance !

  • Queuing multiple video files as a single live video stream with nodejs and ffmpeg

    24 avril 2016, par bomtempi

    i would like to stream a video with node nodejs using multiple little video sequences that are created on the fly.
    It means that the server queues multiple files, but the client must see it as only one single stream.

    Why would i need such feature ?

    I have an application that creates images on the fly on the server, and i need to send them as a single video to the client, as if it was on a live source.
    I cannot use ffmpeg to concatenate these files and convert them to a single video because i don’t have the complete sequence.

    I can do the trick with images sequences, using "multipart/x-mixed-replace" content-type, in a mjpeg format. Here is how i do :

    http.createServer(function(req, stream) {
     stream.writeHead(200, {
       'Content-Type': 'multipart/x-mixed-replace;boundary=myboundary',
       'Cache-Control': 'no-cache',
       'Expires': '-1',
       'Connection': 'close',
       'Pragma': 'no-cache'
     });

     setInterval(function() {

       var data = ... // here launch the function to get the binary data from the latest image created on the server

       stream.write("--myboundary\r\n");
       stream.write("Content-Type: image/jpeg\r\n");
       stream.write("Content-Length: " + data.length + "\r\n");
       stream.write("\r\n");
       stream.write(data);
       stream.write("\r\n");
     }, 300);

    }).listen(port, function() {

    });

    The problem with this format is that it has no sound.
    I tried to serve the sound from a different endpoint, and use ffmpeg to assemble them in live and send them back to the server where it will be forwarded to a new endpoint containing the sound and video, but after just a few seconds the video becomes more and more laggy and freezes.

    So that is why i thought that i should start by generating small videos on the server, by taking the 24 or 30 latest images created on the fly, concatenate them with ffmpeg and queue them on nodejs. That would just add approximately 1 second delay to the client.

    Thanks for your help !