
Recherche avancée
Autres articles (67)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (7123)
-
parsing different ffmpeg -i output
11 août 2012, par Jizbo JonezI 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/sbut 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/sThe 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 user1542140Sorry 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 user1582384I 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/108-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=120808-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 ?