Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (85)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6006)

  • YUV4:2:0 conversion to RGB outputs overly green image

    27 février 2023, par luckybroma

    I'm decoding video and getting YUV 420 frames. In order to render them using D3D11, they need to get converted to RGB (or at least I assume that the render target view cannot be YUV itself).

    


    The YUV frames are all in planar format, meaning UV and not packed. I'm creating 3 textures and ShaderResourceViews of type DXGI_FORMAT_R8G8_UNORM. I'm copying each plane from the frame into it's own ShaderResourceView. I'm then relying on the sampler to account for the differences in size between the Y and UV planes. Black/White only looks great. If I add in color though, I get an overly Green Picture :
enter image description here

    


    I'm at a huge loss of what I could be doing wrong.. I've tried switching the UV and planes around, I've also tried tweaking the conversion values. I'm following Microsoft's guide on picture conversion.

    


    Here is my shader :

    


    min16float4 main(PixelShaderInput input) : SV_TARGET
{
    float y = YChannel.Sample(defaultSampler, input.texCoord).r;
    float u = UChannel.Sample(defaultSampler, input.texCoord).r - 0.5;
    float v = VChannel.Sample(defaultSampler, input.texCoord).r - 0.5;

    float r = y + 1.13983 * v;
    float g = y - 0.39465 * u - 0.58060 * v;
    float b = y + 2.03211 * u;

    return min16float4(r, g, b , 1.f);
}


    


    Creating my ShaderResourceViews :

    


    D3D11_TEXTURE2D_DESC texDesc;
    ZeroMemory(&texDesc, sizeof(texDesc));
    texDesc.Width = 1670;
    texDesc.Height = 626;
    texDesc.MipLevels = 1;
    texDesc.ArraySize = 1;
    texDesc.Format = DXGI_FORMAT_R8_UNORM;
    texDesc.SampleDesc.Count = 1;
    texDesc.SampleDesc.Quality = 0;
    texDesc.Usage = D3D11_USAGE_DYNAMIC;
    texDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
    texDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;


    dev->CreateTexture2D(&texDesc, NULL, &pYPictureTexture);
    dev->CreateTexture2D(&texDesc, NULL, &pUPictureTexture);
    dev->CreateTexture2D(&texDesc, NULL, &pVPictureTexture);
    
    D3D11_SHADER_RESOURCE_VIEW_DESC shaderResourceViewDesc;
    shaderResourceViewDesc.Format = DXGI_FORMAT_R8_UNORM;
    shaderResourceViewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
    shaderResourceViewDesc.Texture2D.MostDetailedMip = 0;
    shaderResourceViewDesc.Texture2D.MipLevels = 1;

    dev->CreateShaderResourceView(pYPictureTexture, &shaderResourceViewDesc, &pYPictureTextureResourceView);

    dev->CreateShaderResourceView(pUPictureTexture, &shaderResourceViewDesc, &pUPictureTextureResourceView);
    
    dev->CreateShaderResourceView(pVPictureTexture, &shaderResourceViewDesc, &pVPictureTextureResourceView);



    


    And then How I'm copying the decoded ffmpeg AVFrames :

    


        int height = 626;
    int width = 1670;    

    D3D11_MAPPED_SUBRESOURCE msY;
    D3D11_MAPPED_SUBRESOURCE msU;
    D3D11_MAPPED_SUBRESOURCE msV;
    devcon->Map(pYPictureTexture, 0, D3D11_MAP_WRITE_DISCARD, 0, &msY);

    memcpy(msY.pData, frame->data[0], height * width);
    devcon->Unmap(pYPictureTexture, 0);

    devcon->Map(pUPictureTexture, 0, D3D11_MAP_WRITE_DISCARD, 0, &msU);
    memcpy(msU.pData, frame->data[1], (height*width) / 4);
    devcon->Unmap(pUPictureTexture, 0);


    devcon->Map(pVPictureTexture, 0, D3D11_MAP_WRITE_DISCARD, 0, &msV);
    memcpy(msV.pData, frame->data[2], (height*width) / 4);
    devcon->Unmap(pVPictureTexture, 0);


    


    PS : Happy to provide any more additional requested code ! I just wanted to be concise as possible.

    


  • riff : don’t overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn’t contain that data.

    2 mai 2012, par Hendrik Leppkes
    riff : don’t overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn’t contain that data.
    

    According to the specification on the MSDN [1], 0 is valid for that
    particular field, and it should be ignored in that case.

    [1] : http://msdn.microsoft.com/en-us/library/windows/desktop/dd757714(v=vs.85).aspx

    Bug-Id : 950

    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DBH] libavformat/riffdec.c
  • How to create a video in .net6 [closed]

    22 mai 2023, par mans

    I am trying to create a video from a series of images i .net core (6.0)

    &#xA;

    I am looking for a solution like this :

    &#xA;

    VideoCreator video=new VideoCreator("MyVideo.mp4");&#xA;&#xA;for (int i=0;i&lt;1000;i&#x2B;&#x2B;)&#xA;{&#xA;     var image=getImage();&#xA;     video.addFrame(image);&#xA;}&#xA;video.close();&#xA;

    &#xA;

    I already tried these solutions, and I could not make them work or compile :

    &#xA;

    OpenCVSharp

    &#xA;

    This is compiling properly in .net 6 but is sot reliable when writing videos. I could get a blank video, especially if the getImage function took a long time to return an image (for example, 20 sec) and the above code is run in a thread. All in one : the system did not produce video reliably.

    &#xA;

    AForge.net

    &#xA;

    This library and its related library (Accord.NET) don't work on.net core. My attempt to use them did not produce any compilable software (for example AForge.video.ffmpeg or AForge.Video.VFW) are not available in .net core).

    &#xA;

    So my questions :

    &#xA;

      &#xA;
    1. What is the best way to create a video in .net core reliably ?
    2. &#xA;

    3. I am using .net core as I am using Microsoft ML engine, is the ML engine available for framework ?
    4. &#xA;

    5. My target platform is Windows, is there any way that I can combine .net and framework applications/libraries ?
    6. &#xA;

    &#xA;