Recherche avancée

Médias (91)

Autres articles (56)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (11064)

  • parsing different ffmpeg -i output

    11 août 2012, par Jizbo Jonez

    I have a bit of code that gets a video files duration, width, height and framerate which works fine for some videos -

    $output = `ffmpeg -i /var/thismovie.avi`;
    preg_match('/Duration: (.*?),.*?Video:.*?0x.*?([0-9]+)x([[0-9]+).*?([0-9]+) fps/i'
    ,$output , $result);

    The problem is there are other videos that give a slightly different output information, for example the above code works with this output -

    Input #0, avi, from '/var/www/vhosts/thissite.com/httpdocs/video1.avi':
    Duration: 00:00:10.76, start: 0.000000, bitrate: 5180 kb/s
    Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 50 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, s16, 128 kb/s

    but another video gives this info and will not give any results when used with the above code -

    Input #0, avi, from '/var/www/vhosts/thissite.com/httpdocs/video2.avi':
    Duration: 00:00:05.68, start: 0.000000, bitrate: 887 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 640x272 [SAR 1:1 DAR 40:17], 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 128 kb/s

    The difference between the two outputs is in the Stream #0:0 part. The fist output shows 7 different pieces of information separated by a comma, the last output only shows 6 bits. The missing piece of info in the last output is the frame rate (fps) but apparently I can use the value for tbr instead.

    So my question is, how can I modify the code I am using to cover both types of outputs ?

  • ffmpeg YUV to RGB distored color and position

    15 novembre 2012, par user1542140

    Sorry that I still cannot post images for my question since low reputation.

    I use the ffmpeg function to convert the decoded frame, from YUV to RGB24, but the color and resulted image is distorted seriously. Following is my code snip, the frame width and height is (176, 144)

    len = avcodec_decode_video2(c, picture, &got_picture, &avpkt);
       if (got_picture) {
               //...

       AVFrame *pFrameRGB = avcodec_alloc_frame();
       // Determine required buffer size and allocate buffer
       int numBytes=avpicture_get_size(PIX_FMT_RGB24, c->width, c->height);
       uint8_t *buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
       avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, c->width, c->height);

       struct SwsContext *img_convert_ctx = sws_getContext(c->width, c->height, PIX_FMT_YUV420P, c->width, c->height, PIX_FMT_BGR24, SWS_BICUBIC, NULL, NULL, NULL);
       sws_scale(img_convert_ctx, picture->data, picture->linesize, 0, picture->height, pFrameRGB->data, pFrameRGB->linesize);
       sws_freeContext(img_convert_ctx);
       // Save the frame to disk
       if(++frame<=5)
           SaveFrame(pFrameRGB, c->width, c->height, frame);
  • FFMPEG Incompatible sprop-parameter-sets with libstagefright on Android 4.0 for H264

    7 août 2012, par user1582384

    I am having an issue with the RTSP SDP generated by FFMPEG in Android.
    I have the FFMPEG 0.11.1 compiled with NDK and running on Android. I use the FFSERVER to stream an mp4 file locally to the MediaPlayer.

    Here is the generated SDP description :

    08-07 14:04:04.034 : V/rtsp_server(20161) : o=- 0 0 IN IP4 127.0.0.1

    08-07 14:04:04.034 : V/rtsp_server(20161) : s=No Title

    08-07 14:04:04.034 : V/rtsp_server(20161) : c=IN IP4 0.0.0.0

    08-07 14:04:04.034 : V/rtsp_server(20161) : t=0 0

    08-07 14:04:04.034 : V/rtsp_server(20161) : a=tool:libavformat 54.6.100

    08-07 14:04:04.034 : V/rtsp_server(20161) : m=video 0 RTP/AVP 96

    08-07 14:04:04.034 : V/rtsp_server(20161) : b=AS:312

    08-07 14:04:04.034 : V/rtsp_server(20161) : a=x-dimensions:512,384

    08-07 14:04:04.034 : V/rtsp_server(20161) : a=rtpmap:96 H264/90000

    08-07 14:04:04.034 : V/rtsp_server(20161) : a=fmtp:96
    packetization-mode=0 ;profile-level-id=640015 ;sprop-parameter-sets=J2QAH62ECSZuIzSQgSTNxGaSECSZuIzSQgSTNxGaSECSZuIzSQgSTNxGaSEFWuvX1+T+vyfXrrVQgq116+vyf1+T69daq0BAGMg=,KO48sA==

    08-07 14:04:04.034 : V/rtsp_server(20161) : a=control:streamid=0

    08-07 14:04:04.034 : V/rtsp_server(20161) : m=audio 0 RTP/AVP 97

    08-07 14:04:04.034 : V/rtsp_server(20161) : b=AS:29

    08-07 14:04:04.034 : V/rtsp_server(20161) : a=rtpmap:97
    MPEG4-GENERIC/44100/1

    08-07 14:04:04.034 : V/rtsp_server(20161) : a=fmtp:97
    profile-level-id=1 ;mode=AAC-hbr ;sizelength=13 ;indexlength=3 ;indexdeltalength=3 ;
    config=1208

    08-07 14:04:04.034 : V/rtsp_server(20161) : a=control:streamid=1

    Running the same application on Galaxy S2 works since it uses libopencore. But on newer devices it crashes while trying to extract the width and height from the extradata.

    So the problem is with the sprop-parameter-sets.

    My question is why does libstagefright parse the sprop-parameter-sets differently and how could the existing string be converted for compatibility ?