Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (61)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (8492)

  • 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 ?

  • 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);
  • 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 ?