Recherche avancée

Médias (91)

Autres articles (64)

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

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (7055)

  • Processing video frame by frame in AWS Lambda with Node.js and FFmpeg [closed]

    29 décembre 2023, par Aviato

    I am working on a project where I need to process video frames one at a time in an AWS Lambda function using Node.js. My goal is to avoid storing all frames in memory or the filesystem due to resource constraints. I plan to use the fluent-ffmpeg library or ffmpeg from child processes for video processing.

    &#xA;

    In the past, I used OpenCV to process videos and frames without writing the frames on the disk or storing all the frames at once on the memory itself. But now as I am using node js, its a little hard to set up the code using ffmpeg, etc.

    &#xA;

    Here is a small snippet from what I did with opencv :-

    &#xA;

    import cv2&#xA;&#xA;cap = cv2.VideoCapture(video_file)&#xA;&#xA;out = cv2.VideoWriter(&#x27;output.mp4&#x27;, fourcc, fps, (width, height))&#xA;&#xA;def generate_frame():&#xA;        while cap.isOpened():&#xA;            code, frame = cap.read()&#xA;            if code:&#xA;                yield frame&#xA;            else:&#xA;                print("completed")&#xA;                break&#xA;&#xA;for i, frame in enumerate(generate_frame()):&#xA;          # Now we can process the video frames directly and write them on the output opencv&#xA;          out.write(editing_frames)&#xA;

    &#xA;

    Additionally, I intend to leverage image processing libraries like Sharp and the Canvas API to edit individual frames before assembling the final video. I am looking for help in handling video frames efficiently within the constraints of AWS Lambda.

    &#xA;

    Any insights, code snippets, or recommendations would be greatly appreciated. Thank you !

    &#xA;

  • FPV-Camera Input in Black and White / losses Color on conversion with FFMPEG [closed]

    22 décembre 2023, par LyffLyff

    so we're working on our end-of-school project and it's an FPV-Drone with an Analogue Camera on it. Plan is to send the video feed to a Raspberry Pi running an RTMP-Server from where a Phone-Application can view the live Video of the camera.

    &#xA;

    To convert this analogue Data from the camera we use a USB2.0 Grabber (this one).

    &#xA;

    To create the RTMP Stream from the converted USB-Input we use FFMPEG with the following command :

    &#xA;

    &#xA;

    fmpeg -f v4l2 -input_format yuyv422 -i /dev/video0 -c:v libx264 -crf 20 -preset ultrafast -b:v 2000k -fflags nobuffer -rtmp_live live -f flv rtmp ://192.168.8.107:554/live/stream

    &#xA;

    &#xA;

    It works fine, but the main problems at the moment are :

    &#xA;

      &#xA;
    • the video is in Black and White&#xA;B&W Image Stream
    • &#xA;

    • the stream has a delay of 10-20s depending on the network
    • &#xA;

    &#xA;

    When I'm using the official Software provided by the Reseller I had the same problem, but as soon as it set PAL/BDGHI in the Settings the colour was shown correctly :

    &#xA;

    Settings and Color Image in official software

    &#xA;

    the video is in Black and White

    &#xA;

    Does anyone know what settings there are to correctly decode the feed from the Camera and send the video with the colour over RTMP ? I don't know if this is the right place to ask this question, but I'm running out of ideas and every single decoder I have tried apart from the ones I'm currently using does not work.

    &#xA;

    Any help is greatly appreciated :)

    &#xA;

  • Single-threaded demuxer with FFmpeg API

    7 décembre 2023, par yaskovdev

    I am trying to create a demuxer using FFmpeg API with the next interface :

    &#xA;

    interface IDemuxer&#xA;{&#xA;    void WriteMediaChunk(byte[] chunk);&#xA;&#xA;    byte[] ReadAudioOrVideoFrame();&#xA;}&#xA;

    &#xA;

    The plan is to use it in a single thread like this :

    &#xA;

    IDemuxer demuxer = new Demuxer();&#xA;&#xA;while (true)&#xA;{&#xA;    byte[] chunk = ReceiveNextChunkFromInputStream();&#xA;    &#xA;    if (chunk.Length == 0) break; // Reached the end of the stream, exiting.&#xA;    &#xA;    demuxer.WriteMediaChunk(chunk);&#xA;    &#xA;    while (true)&#xA;    {&#xA;        var frame = demuxer.ReadAudioOrVideoFrame()&#xA;&#xA;        if (frame.Length == 0) break; // Need more chunks to produce the frame. Let&#x27;s add more chunks and try produce it again.&#xA;&#xA;        WriteFrameToOutputStream(frame);&#xA;    }&#xA;}&#xA;

    &#xA;

    I.e., I want the demuxer to be able to notify me (by returning an empty result) that it needs more input media chunks to produce the output frames.

    &#xA;

    It seems like FFmpeg can read the input chunks that I send to it using the read callback.

    &#xA;

    The problem with this approach is that I cannot handle a situation when more input chunks are required using only one thread. I can handle it in 3 different ways in the read callback :

    &#xA;

      &#xA;
    1. Simply be honest that there is no data yet and return an empty buffer to FFmpeg. Then add more data using WriteMediaChunk(), and then retry ReadAudioOrVideoFrame().
    2. &#xA;

    3. Return AVERROR_EOF to FFmpeg to indicate that there is no data yet.
    4. &#xA;

    5. Block the thread and do not return anything. Once the data arrives, unblock the thread and return the data.
    6. &#xA;

    &#xA;

    But all these options are far from ideal :

    &#xA;

    The 1st one leads to FFmpeg calling the callback again and again in an infinite loop hoping to get more data, essentially blocking the main thread and not allowing me to send the data.

    &#xA;

    The 2nd leads to FFmpeg stopping the processing at all. Even if the data appears finally, I won't be able to receive more frames. The only option is to start demuxing over again.

    &#xA;

    The 3rd one kind of works, but then I need at least 2 threads : first is constantly putting new data to a queue, so that FFmpeg could then read it via the callback, and the second is reading the frames via ReadAudioOrVideoFrame(). The second thread may occasionally block if the first one is not fast enough and there is no data available yet. Having to deal with multiple threads makes implementation and testing more complex.

    &#xA;

    Is there a way to implement this using only one thread ? Is the read callback even the right direction ?

    &#xA;