Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (58)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

Sur d’autres sites (6753)

  • opencv3.1 python VideoCapture black screen

    3 mai 2017, par alex

    i’m trying to use opencv3.1 with python3.5
    following this official)tutorial
    http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html#display-video

    the camera led is "on" but the window doesn’t show any image (black)

    my current enviroment :
    - windows 10
    - python 3.5.2 (32bit)
    - numpy 1.12.0b1 (32bit) binaries downloaded from : http://www.lfd.uci.edu/ gohlke/pythonlibs/
    - opencv 3.1.0 (32bit) binaries downloaded from : http://www.lfd.uci.edu/ gohlke/pythonlibs/

    they seem installed correctly !

    as the tutorial says :

    Note Make sure proper versions of ffmpeg or gstreamer is installed. Sometimes, it is a headache to work with Video Capture mostly due to wrong installation of ffmpeg/gstreamer.

    i’ve no ffmpeg installed !!! so i suppose this is the cause of my problem
    so the questions are :
    1) which version of ffmpeg is needed ?
    2) how install ffmpeg on windows ? it seems a setup doesn’t exist(there is a binary section with a zip file ? how to use it after unzipped ?)
    3) is possible to see(in some way) if the opencv binaries(that i’ve downloaded) were compiled with ffmpeg support(flag ?)

    PS : i’ve tried to add the ffmpeg folder path the the PATH enviroment variable but nothing change

  • python3 openCV VideoCapture only black image (Raspbian Stretch)

    21 juin 2018, par PrimuS

    I have a little python function that analyzes a video, chunks it into one image per second and gives me the most dominant color for that image. (Code can be found here : https://github.com/primus852/python-movie-barcode)

    This works great on my Windows testing environment. However, on my Rasbian Stretch Raspberry Pi Setup it only produces a black image, as the source seems to be black.

    I compiled OpenCV (3.4.1) myself with this great article : https://www.pyimagesearch.com/2017/09/04/raspbian-stretch-install-opencv-3-python-on-your-raspberry-pi/, and it worked perfectly fine. I am using python3 and a virtualenv.

    I tried adding the ffmpeg package : apt install ffmpeg, to no avail.

    2 ideas

    • I compiled the openCV source without support for mkv/mp4/similar ? If so, how would I check that and can I just "re-compile" the whole package ?
    • I am missing codecs, where would I be able to check that ?

    The crucial code (I think) is this :

    cap = cv2.VideoCapture(full_path) are there other options that do not break the majority of my code ? I read about skvideo.io from scikit-video but that does not seem to work with my code...

    I am new to python, any hint is appreciated

    // EDIT, I think it is not a duplicate because I pass the I get no error that the capture cannot be opened and :

    OpenCV FFMPEG support :

    • python -c "import cv2; print(cv2.getBuildInformation())" | grep -i ffmpeg
      • returns : FFMPEG: YES

    FFMPEG Codec :

    • ffmpeg -codecs | grep -i avc (file is using AVC)
      • returns : DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_mmal h264_vdpau ) (encoders: libx264 libx264rgb h264_omx h264_vaapi )

    File PATH

    It exists and the path is correct...

    Any other ideas ? Could it possibly the virtualenv ?

    //EDIT2

    Tried with an AVI file

    works...

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