Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (22)

  • Submit enhancements and plugins

    13 avril 2011

    If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
    You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

Sur d’autres sites (4581)

  • Video streaming- control frame rate x264

    3 mars 2017, par H.A

    I’m new to video coding, I found this https://github.com/RafaelPalomar/H264LiveStreamer application code very useful to my project. I want to live stream a webcam over RTP . However, I’m having problem selecting the Frame Per Seconds (FPS). below is the function that controls the encoding param.

    void x264Encoder::initilize()
    {
     x264_param_default_preset(&parameters, "veryfast", "zerolatency");
     parameters.i_log_level =  X264_LOG_DEBUG;
     parameters.i_threads = 1;
     parameters.i_width = 640;
     parameters.i_height = 480;
     parameters.i_fps_num = 25;
     parameters.i_fps_den = 1;
     parameters.i_keyint_max = 25;
     parameters.b_intra_refresh = 1;
     parameters.rc.i_rc_method = X264_RC_CRF;
     parameters.rc.i_vbv_buffer_size = 1000000;
     parameters.rc.i_vbv_max_bitrate = 90000;
     parameters.rc.f_rf_constant = 25;
     parameters.rc.f_rf_constant_max = 35;
     parameters.i_sps_id = 7;
     // the following two value you should keep 1
     parameters.b_repeat_headers = 1;    // to get header before every I-Frame
     parameters.b_annexb = 1; // put start code in front of nal. we will remove start code later
     x264_param_apply_profile(&parameters, "baseline");

     encoder = x264_encoder_open(&parameters);
     x264_picture_alloc(&picture_in, X264_CSP_I420, parameters.i_width, parameters.i_height);
     picture_in.i_type = X264_TYPE_AUTO;
     picture_in.img.i_csp = X264_CSP_I420;
     // i have initilized my color space converter for BGR24 to YUV420 because my opencv video capture gives BGR24 image. You can initilize according to your input pixelFormat
     convertContext = sws_getContext(parameters.i_width,parameters.i_height, PIX_FMT_BGR24, parameters.i_width,parameters.i_height,PIX_FMT_YUV420P, SWS_FAST_BILINEAR, NULL, NULL, NULL);
    }

    I’m using VLC as client whatever number i set i_fps_num to, I always get 12-14 FPS. fore example, in VLC Codec tab shows 25 FPS but in Stream statistics tab it shows it only display 13 FPS on average. here is the X264 encoder output

    x264 [debug]: frame=  72 QP=22.24 NAL=2 Slice:P Poc:144 I:97   P:116  SKIP:987  size=1464 bytes
    x264 [info]: frame I:1     Avg QP:20.06  size: 17848
    x264 [info]: frame P:72    Avg QP:22.12  size:  1337
    x264 [info]: mb I  I16..4: 40.2%  0.0% 59.8%
    x264 [info]: mb P  I16..4:  3.1%  0.0%  2.3%  P16..4:  8.3%  2.0%  0.6%  0.0%  0.0%    skip:83.7%
    x264 [info]: coded y,uvDC,uvAC intra: 53.6% 46.4% 7.4% inter: 3.0% 1.6% 0.0%
    x264 [info]: i16 v,h,dc,p: 11% 65% 12% 12%
    x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 46% 16%  3%  4%  3%  5%  3%  6%
    x264 [info]: i8c dc,h,v,p: 46% 42% 10%  2%
    x264 [info]: kb/s:312.60

    the last frame number that was encoded is 72 while in VLC stream statistics it shows that 133 frames are Displayed and 66 blocks are decoded for 10 seconds streaming in addition the video playback is bursty.

    my question is how to change the x264 parameters to get 25 FPS ?

  • Video streaming- control frame rate x264

    3 mars 2017, par H.A

    I’m new to video coding, I found this https://github.com/RafaelPalomar/H264LiveStreamer application code very useful to my project. I want to live stream a webcam over RTP . However, I’m having problem selecting the Frame Per Seconds (FPS). below is the function that controls the encoding param.

    void x264Encoder::initilize()
    {
     x264_param_default_preset(&parameters, "veryfast", "zerolatency");
     parameters.i_log_level =  X264_LOG_DEBUG;
     parameters.i_threads = 1;
     parameters.i_width = 640;
     parameters.i_height = 480;
     parameters.i_fps_num = 25;
     parameters.i_fps_den = 1;
     parameters.i_keyint_max = 25;
     parameters.b_intra_refresh = 1;
     parameters.rc.i_rc_method = X264_RC_CRF;
     parameters.rc.i_vbv_buffer_size = 1000000;
     parameters.rc.i_vbv_max_bitrate = 90000;
     parameters.rc.f_rf_constant = 25;
     parameters.rc.f_rf_constant_max = 35;
     parameters.i_sps_id = 7;
     // the following two value you should keep 1
     parameters.b_repeat_headers = 1;    // to get header before every I-Frame
     parameters.b_annexb = 1; // put start code in front of nal. we will remove start code later
     x264_param_apply_profile(&parameters, "baseline");

     encoder = x264_encoder_open(&parameters);
     x264_picture_alloc(&picture_in, X264_CSP_I420, parameters.i_width, parameters.i_height);
     picture_in.i_type = X264_TYPE_AUTO;
     picture_in.img.i_csp = X264_CSP_I420;
     // i have initilized my color space converter for BGR24 to YUV420 because my opencv video capture gives BGR24 image. You can initilize according to your input pixelFormat
     convertContext = sws_getContext(parameters.i_width,parameters.i_height, PIX_FMT_BGR24, parameters.i_width,parameters.i_height,PIX_FMT_YUV420P, SWS_FAST_BILINEAR, NULL, NULL, NULL);
    }

    I’m using VLC as client whatever number i set i_fps_num to, I always get 12-14 FPS. fore example, in VLC Codec tab shows 25 FPS but in Stream statistics tab it shows it only display 13 FPS on average. here is the X264 encoder output

    x264 [debug]: frame=  72 QP=22.24 NAL=2 Slice:P Poc:144 I:97   P:116  SKIP:987  size=1464 bytes
    x264 [info]: frame I:1     Avg QP:20.06  size: 17848
    x264 [info]: frame P:72    Avg QP:22.12  size:  1337
    x264 [info]: mb I  I16..4: 40.2%  0.0% 59.8%
    x264 [info]: mb P  I16..4:  3.1%  0.0%  2.3%  P16..4:  8.3%  2.0%  0.6%  0.0%  0.0%    skip:83.7%
    x264 [info]: coded y,uvDC,uvAC intra: 53.6% 46.4% 7.4% inter: 3.0% 1.6% 0.0%
    x264 [info]: i16 v,h,dc,p: 11% 65% 12% 12%
    x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 46% 16%  3%  4%  3%  5%  3%  6%
    x264 [info]: i8c dc,h,v,p: 46% 42% 10%  2%
    x264 [info]: kb/s:312.60

    the last frame number that was encoded is 72 while in VLC stream statistics it shows that 133 frames are Displayed and 66 blocks are decoded for 10 seconds streaming in addition the video playback is bursty.

    my question is how to change the x264 parameters to get 25 FPS ?

  • How to compress webcam videos recorded by html5 MediaRecorder api ?

    19 mai 2017, par JasonY

    I successfully recorded my webcam using MediaRecorder api and the resulting filesizes seemed far too big for their quality.

    For example, for an 8 second video that was 480x640 I got a 1mB file size. That does not seem right.

    My code to record()

    navigator.mediaDevices.getUserMedia({video: true, audio: true})
       .then(function(stream){
           var options = {
               mimeType : "video/webm;codecs=vp9"
               //I don't set bitrate here even if I do the quality is too bad
           }
           var media_recorder = new MediaRecorder(media_stream, options);
           var recorded_data = [];
           media_recorder.ondataavailable = function(e){
                recorded_data.push(e.data);
           }
           media_recorder.onstop = function(e){
               recorded_data.push(e.data);
               var recorded_blob = new Blob(recorded_data, { 'type' : 'video/webm; codecs=vp9' });
               var recorded_video_url = window.URL.createObjectURL(recorded_blob);
               //here I write some code to download the blob from this url through a href
           }
       })

    The file obtained by this method is unreasonably large which makes me wonder if it was even compressed when encoded by VP9 ? A 7 second video is about 870kB !

    Inspecting the file with a mediainfo tool gives me

    General
    Count                                    : 323
    Count of stream of this kind             : 1
    Kind of stream                           : General
    Kind of stream                           : General
    Stream identifier                        : 0
    Count of video streams                   : 1
    Count of audio streams                   : 1
    Video_Format_List                        : VP9
    Video_Format_WithHint_List               : VP9
    Codecs Video                             : V_VP9
    Video_Language_List                      : English
    Audio_Format_List                        : Opus
    Audio_Format_WithHint_List               : Opus
    Audio codecs                             : Opus
    Audio_Language_List                      : English
    Complete name                            : recorded_video.webm
    File name                                : recorded_video
    File extension                           : webm
    Format                                   : WebM
    Format                                   : WebM
    Format/Url                               : http://www.webmproject.org/
    Format/Extensions usually used           : webm
    Commercial name                          : WebM
    Format version                           : Version 2
    Internet media type                      : video/webm
    Codec                                    : WebM
    Codec                                    : WebM
    Codec/Url                                : http://www.webmproject.org/
    Codec/Extensions usually used            : webm
    File size                                : 867870
    File size                                : 848 KiB
    File size                                : 848 KiB
    File size                                : 848 KiB
    File size                                : 848 KiB
    File size                                : 847.5 KiB
    File last modification date              : UTC 2017-05-19 05:48:00
    File last modification date (local)      : 2017-05-19 17:48:00
    Writing application                      : Chrome
    Writing application                      : Chrome
    Writing library                          : Chrome
    Writing library                          : Chrome
    IsTruncated                              : Yes

    Video
    Count                                    : 332
    Count of stream of this kind             : 1
    Kind of stream                           : Video
    Kind of stream                           : Video
    Stream identifier                        : 0
    StreamOrder                              : 1
    ID                                       : 2
    ID                                       : 2
    Unique ID                                : 62101435245162993
    Format                                   : VP9
    Commercial name                          : VP9
    Codec ID                                 : V_VP9
    Codec ID/Url                             : http://www.webmproject.org/
    Codec                                    : V_VP9
    Codec                                    : V_VP9
    Width                                    : 640
    Width                                    : 640 pixels
    Height                                   : 480
    Height                                   : 480 pixels
    Pixel aspect ratio                       : 1.000
    Display aspect ratio                     : 1.333
    Display aspect ratio                     : 4:3
    Frame rate mode                          : VFR
    Frame rate mode                          : Variable
    Language                                 : en
    Language                                 : English
    Language                                 : English
    Language                                 : en
    Language                                 : eng
    Language                                 : en
    Default                                  : Yes
    Default                                  : Yes
    Forced                                   : No
    Forced                                   : No

    Audio
    Count                                    : 272
    Count of stream of this kind             : 1
    Kind of stream                           : Audio
    Kind of stream                           : Audio
    Stream identifier                        : 0
    StreamOrder                              : 0
    ID                                       : 1
    ID                                       : 1
    Unique ID                                : 32224324715799545
    Format                                   : Opus
    Format/Url                               : http://opus-codec.org/
    Commercial name                          : Opus
    Internet media type                      : audio/opus
    Codec ID                                 : A_OPUS
    Codec ID/Url                             : http://opus-codec.org
    Codec                                    : Opus
    Codec                                    : Opus
    Codec/Family                             : PCM
    Channel(s)                               : 1
    Channel(s)                               : 1 channel
    Channel positions                        : Front: C
    Channel positions                        : 1/0/0
    Sampling rate                            : 48000
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Compression mode                         : Lossy
    Delay                                    : 718
    Delay                                    : 718ms
    Delay                                    : 718ms
    Delay                                    : 718ms
    Delay                                    : 00:00:00.718
    Delay, origin                            : Container
    Delay, origin                            : Container
    Language                                 : en
    Language                                 : English
    Language                                 : English
    Language                                 : en
    Language                                 : eng
    Language                                 : en
    Default                                  : Yes
    Default                                  : Yes
    Forced                                   : No
    Forced                                   : No

    What did I do wrong ? Do I have to re-encode it after the chunks get appended ? Is there some attribute I’m missing ? VP9 is supposed to reduce file sizes drastically.