Recherche avancée

Médias (91)

Autres articles (49)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

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

  • Basic "pass-through" use of FFmpegReader/FFmpegWriter in scikit-video

    6 février 2021, par JonathanZ supports MonicaC

    I am starting to use scikit-video and am having trouble writing files. I have reduced the problem to the simplest possible example

    


    vid_file = "6710185719062326259_stamp_25pct.mp4"
output_file = "out_temp3.mp4"
reader = skvideo.io.FFmpegReader(vid_file)
writer = skvideo.io.FFmpegWriter(output_file)
for frame in reader.nextFrame():
        writer.writeFrame(frame)
writer.close()


    


    I'm playing the files in VLC, and the vid_file is valid but the output file, though playable, is mostly big green blocks (though I can discern some details from the original video in it).

    


    My goal, or course, is to do "interesting" manipulations of the frame before I write it out, but I need to get the "no modifications" version working correctly first. I'm also going to be using this on large files, so the vread/vwrite functions that process an entire file at once are not appropriate.

    


    I'm guessing I need to set the appropriate values in the outputdict parameter for the FFmpegWriter, but there are so many that I don't know where to start. I have tried

    


    writer = skvideo.io.FFmpegWriter(output_file, outputdict={'-crf': '0', '-pix_fmt': 'rgb24'})


    


    (-crf 0 to suppress any compression, -pixfmt rgb24 as that's what FFmpegReader says it delivers by default, but these don't work either.

    


    Any ideas on how to make this work ?

    


    Here's the skvideo.io.ffprobe video information for the input file.

    


    {
    "@index": "0",
    "@codec_name": "h264",
    "@codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
    "@profile": "High",
    "@codec_type": "video",
    "@codec_time_base": "1/30",
    "@codec_tag_string": "avc1",
    "@codec_tag": "0x31637661",
    "@width": "480",
    "@height": "270",
    "@coded_width": "480",
    "@coded_height": "272",
    "@has_b_frames": "2",
    "@pix_fmt": "yuv420p",
    "@level": "21",
    "@chroma_location": "left",
    "@refs": "1",
    "@is_avc": "true",
    "@nal_length_size": "4",
    "@r_frame_rate": "15/1",
    "@avg_frame_rate": "15/1",
    "@time_base": "1/15360",
    "@start_pts": "0",
    "@start_time": "0.000000",
    "@duration_ts": "122880",
    "@duration": "8.000000",
    "@bit_rate": "183806",
    "@bits_per_raw_sample": "8",
    "@nb_frames": "120",
    "disposition": {
        "@default": "1",
        "@dub": "0",
        "@original": "0",
        "@comment": "0",
        "@lyrics": "0",
        "@karaoke": "0",
        "@forced": "0",
        "@hearing_impaired": "0",
        "@visual_impaired": "0",
        "@clean_effects": "0",
        "@attached_pic": "0",
        "@timed_thumbnails": "0"
    },
    "tag": [
        {
            "@key": "language",
            "@value": "und"
        },
        {
            "@key": "handler_name",
            "@value": "VideoHandler"
        }
    ]
}


    


    I will mention that when I ffprobe the output file the only differences I see are 1) the timing data is different, which isn't surprising, and 2) the output file has

    


        "@has_b_frames": "0",
    "@pix_fmt": "yuv444p",


    


    I'm pretty confident the reader is working okay, because if I write out the data with

    


    skimage.io.imsave('x.png', frame,  check_contrast=False)


    


    it looks good.

    


  • I am trying to use ffmpeg to separate audio from video, but after downloading the ffmpeg build I cannot seem to activate it in Power Shell [duplicate]

    19 janvier 2021, par Row Boater

    Ok, look y'all, I am NOT an aspiring programmer. I'm simply trying to separate audio from video of a youtube video I downloaded.

    


    What I've done :

    


    Downloaded YT vid using 4k video Downloader

    


    I downloaded ffmpeg build from https://ffmpeg.org/download.html#build-windows

    


    I downloaded WinZip in order to access the ffmpeg files.

    


    I thought I used winzip correctly, but whenever I paste the command code line recommended to me, ffmpeg -i video.mp4 -c:a pcm_s16le audio.wav, I receive the following :

    


    


    PS C :\Users\user\Videos\4K Video Downloader> ffmpeg -i video.mp4 -c:a
pcm_s16le audio.wav ffmpeg : The term 'ffmpeg' is not recognized as
the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that
the path is correct and try again. At line:1 char:1

    


      

    • ffmpeg -i video.mp4 -c:a pcm_s16le audio.wav
    • 


    • 

        + CategoryInfo          : ObjectNotFound: (ffmpeg:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException



      


    • 


    


    PS C :\Users\user\Videos\4K Video Downloader>

    


    


    This is all Phoenician to me, but what I take away is that I have not completed some step to fully incorporate the ffmpeg code into my system. I believe that I am not using Winzip correctly.

    


    Thanks for your time.

    


  • Copy ffmpeg d3dva texture resource to shared rendering texture

    10 juin 2020, par Teamol

    I'm using ffmpeg to decode video via d3dva based on this example https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c. I'm able to succesfully decode video. What I need to do next is to render decoded NV12 frame. I have created directx rendering texture based on this example https://github.com/balapradeepswork/D3D11NV12Rendering and set it as shared.

    



        D3D11_TEXTURE2D_DESC texDesc;
    texDesc.Format = DXGI_FORMAT_NV12;              // Pixel format
    texDesc.Width = width;                          // Width of the video frames
    texDesc.Height = height;                        // Height of the video frames
    texDesc.ArraySize = 1;                          // Number of textures in the array
    texDesc.MipLevels = 1;                          // Number of miplevels in each texture
    texDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE; // We read from this texture in the shader
    texDesc.Usage = D3D11_USAGE_DEFAULT;
    texDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED;
    texDesc.CPUAccessFlags = 0;

    hr = device.CreateTexture2D(&texDesc, null, &nv12Texture);
    if (FAILED(hr))
    {
        error("Failed to create NV12 texture (hr: %s)", hr);
        return false;
    }

    // QI IDXGIResource interface to synchronized shared surface.
    IDXGIResource dxgiResource;
    nv12Texture.QueryInterface(&IID_IDXGIResource, cast(void**)&dxgiResource);

    // obtain handle to IDXGIResource object.
    hr = dxgiResource.GetSharedHandle(&sharedHandle);
    dxgiResource.Release();
    dxgiResource = null;

    if (FAILED(hr))
    {
        error("Failed to create NV12 texture shared handle (hr: %s)", hr);
        return false;
    }


    



    I'm then trying to copy nv12 from ffmpeg texture to my rendering texture. exactly as ffmpeg does in function d3d11va_transfer_data.

    



        ID3D11Texture2D hwTexture = cast(ID3D11Texture2D)frame.data[0];

    ID3D11Device hwDevice;
    hwTexture.GetDevice(&hwDevice);

    ID3D11DeviceContext hwDeviceCtx;
    hwDevice.GetImmediateContext(&hwDeviceCtx);

    ID3D11Texture2D sharedTexture;

    HRESULT hr = device.OpenSharedResource(sharedHandle, &IID_ID3D11Texture2D,cast(void**) &sharedTexture);
    if(FAILED(hr))
    {
        error("Failed to obtaion open shared resource.");
        return;
    }

    int index = cast(int)frame.data[1];
    hwDeviceCtx.CopySubresourceRegion(sharedTexture, 0, 0, 0, 0, hwTexture, index, null);


    



    But the rendering window is just green no error no FAILED hr result nothing. I'm able render frames when I'm using sw decoder I just create texture with D3D11_USAGE_DYNAMIC and D3D11_CPU_ACCESS_WRITE.

    



    Here us desc of each texture.

    



    hwTexture desc D3D11_TEXTURE2D_DESC(1280, 720, 1, 20, 103, DXGI_SAMPLE_DESC(1, 0), 0, 512, 0, 0)
nv12Texture desc D3D11_TEXTURE2D_DESC(1280, 720, 1, 1, 103, DXGI_SAMPLE_DESC(1, 0), 0, 8, 0, 2)
sharedTexture desc D3D11_TEXTURE2D_DESC(1280, 720, 1, 1, 103, DXGI_SAMPLE_DESC(1, 0), 0, 8, 0, 2)


    



    Any idea what I'm missing ?