Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (30)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (5888)

  • Overlaying one video on another one, and making black pixels transparent

    25 janvier 2023, par Michael A

    I'm trying to use FFMPEG to create a video with one video overlayed on top another.

    



    I have 2 MP4s. I need to make all BLACK pixels in the overlay video transparent so that I can see the main video underneath it.

    



    I found two ways to overlay one video on another :

    



    First, the following positions the overlay in the center, and therefore, hides that portion of the main video beneath it :

    



        ffmpeg -i 1.mp4 -vf "movie=2.mp4 [a]; [in][a] overlay=352:0 [b]" combined.mp4 -y


    



    And, this one, places the overlay video on the left, but it's opacity is set to 50% so at least other one beneath it is visible :

    



    ffmpeg -i 1.mp4 -i 2.mp4 -filter_complex "[0:v]setpts=PTS-STARTPTS[top]; [1:v]setpts=PTS-STARTPTS, format=yuva420p,colorchannelmixer=aa=0.5[bottom]; [top][bottom]overlay=shortest=0" -acodec libvo_aacenc -vcodec libx264 out.mp4 -y


    



    My goal is simply to make all black pixels in the overlay (2.mp4) completely transparent. How can this be done.

    


  • Black detect ffmpeg and use in a javascript

    6 février 2023, par sol

    I had an ffmpeg script that allow me to detect black frames from a video file sample from the bottom.

    


    and i want to create a javascript code that will allow me to do the same function sample from the bottom but its not working.

    


    original code from ffmpeg script :

    


    `ffmpeg -i LKE-BLACK.mp4 -vf "blackdetect=d=0.5:pix_th=0.10" -an -f null - 2>&1 | findstr blackdetect > output.txt

    


    node script :

    


    var fs = require('fs');
const ffmpeg = require("ffmpeg.js");

var createStream = fs.createWriteStream("data.txt");
createStream.end();

const transcode = async ({ target: { files }  }) => {
    message.innerHTML = 'Loading ffmpeg-core.js';
    await ffmpeg.load();
    message.innerHTML = 'Start transcoding';
    
    await ffmpeg.transcode('-i', 'LKE-BLACK.mp4', "-vf", "blackdetect=d=0.5:pix_th=0.10", '-an', '-f', 'null - 2>&1', );
    message.innerHTML = 'Complete transcoding';

    fs.writeFile("data.txt", function (err) {
        if (err) throw err;
        console.log('File is created successfully.');
      });
}


    


  • Black video when using ffplay of received data over upd [closed]

    4 février 2023, par Alexandru-Marian Buza

    I'm encoding frames from a id3d11texture2d, and the receive packet size is around 70-80.
When i'm sending over udp, and use ffplay to show the video, i get a black screen.
Resolution and fps are well determined by ffplay.

    


    AcquiredBuffer.Attach(Buffer.MetaData.pSurface);

            ID3D11Texture2D* texture;
            ID3D11Texture2D* stagingTexture;
            AcquiredBuffer->QueryInterface(IID_PPV_ARGS(&texture));
            
            texture->GetDesc(&desc);
            desc.Usage = D3D11_USAGE_STAGING;
            desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
            desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
            desc.BindFlags = 0;
            desc.MiscFlags = 0;
            hr = m_Device->Device->CreateTexture2D(&desc, NULL, &stagingTexture);
            if (stagingTexture != 0) {
                m_Device->DeviceContext->CopyResource(stagingTexture, texture);
                D3D11_MAPPED_SUBRESOURCE mappedData;
                m_Device->DeviceContext->Map(stagingTexture, 0, D3D11_MAP_READ, 0, &mappedData);
                
                memcpy(frame->data[0], mappedData.pData, mappedData.DepthPitch);
                auto ret = avcodec_send_frame(codec, frame);
                if (ret < 0) {
                    writeText("Send frame failed");
                }
                else {
                    while (ret >= 0) {
                        ret = avcodec_receive_packet(codec, packet);
                        for (int i = 0; i < packet->size; i++) {
                            if (packet->data[i] != 0) {
                            }
                        }
                        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
                            break;
                        }
                        else if (ret < 0) {
                            writeText("Error durring encoding");
                        }
                        if (sendto(s, (char*)packet->data, packet->size * sizeof(uint8_t), 0, (sockaddr*)&dest, sizeof(dest)) == SOCKET_ERROR) {
                            writeText("Failed to send frame");
                        }
                        av_packet_unref(packet);
                    }
                }
                
                m_Device->DeviceContext->Unmap(stagingTexture, 0);
                stagingTexture->Release();