Recherche avancée

Médias (91)

Autres articles (21)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (4410)

  • avformat : add demuxer for argonaut games' ASF format

    26 janvier 2020, par Zane van Iperen
    avformat : add demuxer for argonaut games' ASF format
    

    Adds support for the custom ASF container used by some Argonaut Games'
    games, such as 'Croc ! Legend of the Gobbos', and 'Croc 2'.

    Can also handle the sample files in :
    https://samples.ffmpeg.org/game-formats/brender/part2.zip

    Signed-off-by : Zane van Iperen <zane@zanevaniperen.com>

    • [DH] Changelog
    • [DH] libavformat/Makefile
    • [DH] libavformat/allformats.c
    • [DH] libavformat/argo_asf.c
    • [DH] libavformat/version.h
  • delphi firemonkey + FFmpeg Fill image/Tbitmap with data of AVFRAME->pixelformat->YUV420P

    9 février 2020, par coban

    I have managed to create a simple Video player using SDL2 + FFmpeg libraries with Delphi VCL. It’s about the same as ffplay.exe but not a Console app.
    I’ve noticed that FFmpeg (I might be wrong) converts/scales (sws_scale) source pixelformat(any) -> to destination -> YUV420P faster than to any other format.

    What I want to achieve is some kind of a (video)surface, where over I can put other components, like for example a TProgressbar. SDL has a function sdl_createwindowfrom which can turn a tpanel into video(surface/window) where it is possible to put any component over it. But this function is only for windows.

    Maybe I am looking in the wrong direction to achieve what I want, if so, any hint is welcome.
    I was thinkin of drawing the data retrieved in pixelformat yuv420p to a TBitmap of a Timage, this way I won’t need SDL2 library, and I will be able to put any other component above, in this case, Timage. Or another component which might be faster.

    It seems like I need to convert the YUV420P into BGRA format, because TBitmap does not seem to support any YUV format, worse is FIREMONKEY tbitmap is always BGRA format, changing to other format is not possible.

    In first case, I need a function to convert yuv420 to BGRA, can anyone help with this, is there a component/package/function for this which I could use ? Or maybe is it anyhow possible to use yuv420p format directly without converting ?
    I tried to convert some SDL2 functions from SDL2 source (C/C++) to Delphi functions but it’s to complicate for me, specially with my knowledge of C/C++. In SDL2 there are methods/functions implemented for converting RGB <-> YUV. (Why did I ever start Delphi programming ? my mistake).

    BTW, I already tried TMediaplayer, it’s drawing video(picture) above everything, nothing else than the video is visible.


    I’ve made an attempt, what I don’t understand is where to get/what is "y_stride, uv_stride and rgb_stride"
    Some variable declarations and/or assignments can be incorrect, need to debug the values, but first I need to know what to pass for the above variables.


       procedure STD_FUNCTION_NAME(width, height:Cardinal;Y, U, V:PByte; Y_stride, UV_stride:Cardinal;
                             RGB:PByte;     RGB_stride:Cardinal;yuv_type:YCbCrType;
                           YUV_FORMAT,RGB_FORMAT:Word);
    var param:PYUV2RGBParam;
     y_pixel_stride,
     uv_pixel_stride,
     uv_x_sample_interval,
     uv_y_sample_interval:Word;

     x, ys:Cardinal;
     y_ptr1,y_ptr2,u_ptr,v_ptr:PByte;
     rgb_ptr1,rgb_ptr2:PByte;

     u_tmp,v_tmp,r_tmp,
     g_tmp,b_tmp:Cardinal;
     y_tmp:Integer;
    begin
    param := @(YUV2RGB[integer( yuv_type)]);
    if YUV_FORMAT = YUV_FORMAT_420
    then begin
     y_pixel_stride      := 1;
     uv_pixel_stride     := 1;
     uv_x_sample_interval:= 2;
     uv_y_sample_interval:= 2;
    end;
    if YUV_FORMAT = YUV_FORMAT_422
    then begin
     y_pixel_stride        := 2;
     uv_pixel_stride       := 4;
     uv_x_sample_interval  := 2;
     uv_y_sample_interval  := 1;
    end;
    if YUV_FORMAT = YUV_FORMAT_NV12
    then begin
     y_pixel_stride        := 1;
     uv_pixel_stride       := 2;
     uv_x_sample_interval  := 2;
     uv_y_sample_interval  := 2;
    end;


    //for(y=0; y&lt;(height-(uv_y_sample_interval-1)); y+=uv_y_sample_interval)
    ys := 0;
    while ys &lt; height-(uv_y_sample_interval-1) do
    begin
       y_ptr1  := Y+ys*Y_stride;
     y_ptr2  := Y+(ys+1)*Y_stride;
     u_ptr   := U+(ys div uv_y_sample_interval)*UV_stride;
     v_ptr   := V+(ys div uv_y_sample_interval)*UV_stride;

       rgb_ptr1:=RGB+ys*RGB_stride;

       if uv_y_sample_interval > 1
     then rgb_ptr2:=RGB+(ys+1)*RGB_stride;


       //for(x=0; x&lt;(width-(uv_x_sample_interval-1)); x+=uv_x_sample_interval)
    x := 0;
    while x&lt;(width-(uv_x_sample_interval-1)) do
       begin
           // Compute U and V contributions, common to the four pixels

           u_tmp := (( u_ptr^)-128);
           v_tmp := (( v_ptr^)-128);

           r_tmp := (v_tmp*param.v_r_factor);
           g_tmp := (u_tmp*param.u_g_factor + v_tmp*param.v_g_factor);
           b_tmp := (u_tmp*param.u_b_factor);

           // Compute the Y contribution for each pixel

           y_tmp := ((y_ptr1[0]-param.y_shift)*param.y_factor);
           PACK_PIXEL(RGB_FORMAT,y_tmp,r_tmp, g_tmp, b_tmp, rgb_ptr1);

           y_tmp := ((y_ptr1[y_pixel_stride]-param.y_shift)*param.y_factor);
           PACK_PIXEL(RGB_FORMAT,y_tmp,r_tmp, g_tmp, b_tmp, rgb_ptr1);

           if uv_y_sample_interval > 1
     then begin
       y_tmp := ((y_ptr2[0]-param.y_shift)*param.y_factor);
       PACK_PIXEL(RGB_FORMAT,y_tmp,r_tmp, g_tmp, b_tmp, rgb_ptr2);

       y_tmp := ((y_ptr2[y_pixel_stride]-param.y_shift)*param.y_factor);
       PACK_PIXEL(RGB_FORMAT,y_tmp,r_tmp, g_tmp, b_tmp, rgb_ptr2);
           end;

           y_ptr1 := y_ptr1 + 2*y_pixel_stride;
           y_ptr2 := y_ptr2 + 2*y_pixel_stride;
           u_ptr  := u_ptr  + 2*uv_pixel_stride div uv_x_sample_interval;
           v_ptr  := v_ptr  + 2*uv_pixel_stride div uv_x_sample_interval;
     x := x + uv_x_sample_interval
       end;

       //* Catch the last pixel, if needed */
       if (uv_x_sample_interval = 2) and (x = (width-1))
       then begin
           // Compute U and V contributions, common to the four pixels

           u_tmp := (( u_ptr^)-128);
           v_tmp := (( v_ptr^)-128);

           r_tmp := (v_tmp*param.v_r_factor);
           g_tmp := (u_tmp*param.u_g_factor + v_tmp*param.v_g_factor);
           b_tmp := (u_tmp*param.u_b_factor);

           // Compute the Y contribution for each pixel

           y_tmp := ((y_ptr1[0]-param.y_shift)*param.y_factor);
           PACK_PIXEL(RGB_FORMAT,y_tmp,r_tmp, g_tmp, b_tmp, rgb_ptr1);

           if uv_y_sample_interval > 1
     then begin
             y_tmp := ((y_ptr2[0]-param.y_shift)*param.y_factor);
       PACK_PIXEL(RGB_FORMAT,y_tmp,r_tmp, g_tmp, b_tmp, rgb_ptr2);
             //PACK_PIXEL(rgb_ptr2);
           end;
       end;
    ys := ys +uv_y_sample_interval;
    end;

    //* Catch the last line, if needed */
    if (uv_y_sample_interval = 2) and (ys = (height-1))
    then begin
       y_ptr1 :=Y+ys*Y_stride;
    u_ptr  :=U+(ys div uv_y_sample_interval)*UV_stride;
    v_ptr  :=V+(ys div uv_y_sample_interval)*UV_stride;

       rgb_ptr1:=RGB+ys*RGB_stride;

       //for(x=0; x&lt;(width-(uv_x_sample_interval-1)); x+=uv_x_sample_interval)
    x := 0;
    while x &lt; (width-(uv_x_sample_interval-1)) do
       begin
           // Compute U and V contributions, common to the four pixels

           u_tmp := (( u_ptr^)-128);
           v_tmp := (( v_ptr^)-128);

           r_tmp := (v_tmp*param.v_r_factor);
           g_tmp := (u_tmp*param.u_g_factor + v_tmp*param.v_g_factor);
           b_tmp := (u_tmp*param.u_b_factor);

           // Compute the Y contribution for each pixel

           y_tmp := ((y_ptr1[0]-param.y_shift)*param.y_factor);
           //PACK_PIXEL(rgb_ptr1);
     PACK_PIXEL(RGB_FORMAT,y_tmp,r_tmp, g_tmp, b_tmp, rgb_ptr1);
           y_tmp := ((y_ptr1[y_pixel_stride]-param.y_shift)*param.y_factor);
           //PACK_PIXEL(rgb_ptr1);
     PACK_PIXEL(RGB_FORMAT,y_tmp,r_tmp, g_tmp, b_tmp, rgb_ptr1);

           y_ptr1 := y_ptr1 + 2*y_pixel_stride;
           u_ptr  := u_ptr  + 2*uv_pixel_stride div uv_x_sample_interval;
           v_ptr  := v_ptr  + 2*uv_pixel_stride div uv_x_sample_interval;

     x := x + uv_x_sample_interval
       end;

       //* Catch the last pixel, if needed */
       if (uv_x_sample_interval = 2) and (x = (width-1))
       then begin
           // Compute U and V contributions, common to the four pixels

           u_tmp := (( u_ptr^)-128);
           v_tmp := (( v_ptr^)-128);

           r_tmp := (v_tmp*param.v_r_factor);
           g_tmp := (u_tmp*param.u_g_factor + v_tmp*param.v_g_factor);
           b_tmp := (u_tmp*param.u_b_factor);

           // Compute the Y contribution for each pixel

           y_tmp := ((y_ptr1[0]-param.y_shift)*param.y_factor);
           //PACK_PIXEL(rgb_ptr1);
     PACK_PIXEL(RGB_FORMAT,y_tmp,r_tmp, g_tmp, b_tmp, rgb_ptr1);
       end;
    end;

    end ;

  • Why after rendering with ffmpeg, file size did not decrease ?

    15 avril 2021, par ptrra

    PROBLEM : After rendering a certain video with ffmpeg file size increased from 4GB to 6GB.
    &#xA;ORIGINAL VIDEO : EE1.mkv
    &#xA;FFMPEG COMMAND : ffmpeg -i EE1.mkv -c:a copy -c:v libx264 -crf 23 -preset medium -profile:v high out.mp4
    &#xA;QUESTIONS : Why did the file size increase ? What am I doing wrong ?

    &#xA;

     !DETAILS !
    &#xA;After a few years I made about 30 gaming videos (130GB) and with the current covid-19 situation I started recording my online classes (about 40 videos or 150GB). Now because I'm lacking space on my 1TB external HDD I started getting into ffmpeg. Before I was only using obs-studio and not good parameters for recording.

    &#xA;

    I was using CBR mode for recording, either 5000KB or 15000KB bit rate with varying x264 presets and profiles because I was also experimenting with them. Usually superfast preset with high profile. So I wanted to convert all those videos with ffmpeg using CRF 23, medium preset and high profile. A note that when I'm recording with obs-studio it's set to record in matroska format (.mkv).

    &#xA;

    When I was rendering my online classes videos with these settings I managed to achieve 10x better compression with the same quality. And when rendering my gaming videos I managed to achieve up to 3x better compression with the same quality. However there is this one video that when rendered with the same parameters the file size increases.

    &#xA;

    The EE1.mkv should be recorded with CBR 15000KB bit rate, with superfast preset and high profile. Also the game that is recorded in this video is Empire Earth which needs around 8000KB for it to look good. Everything more than 8000KB is not needed.

    &#xA;

    Thank you all for your help.

    &#xA;