
Recherche avancée
Médias (21)
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (72)
-
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 -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (7267)
-
Anomalie #3375 (Nouveau) : Espace Privé > Recherche > Cas d’une recherche numérique
19 janvier 2015, par xdjuj -La révision 20305 semble induire une erreur sur la recherche :
- https://core.spip.net/projects/spip/repository/revisions/20305La boucle conditionnelle ajoutée considère que si le ENV recherche est numérique, alors il doit forcément rechercher cette valeur dans les tables objets comme étant un id_objet : table articles avec id_article=#ENVid / table rubriques avec id_rubrique=#ENVid, etc.
Si l’un de mes champs (normaux ou extra) possède un chiffre (par exemple un ISBN ou même pour d’autres besoins, un ID quelconque) alors il n’est pas remonté par la recherche car bloqué dans la boucle conditionnelle.
Je pense que le comportement attendu devrait être :
- si j’identifie un numeric => je cherche dans les id_objets PUIS dans les différents champs / champs extra => j’affiche le toutActuellement, on est bloqué dans la recherche dans les id_objet.
-
Wrapping an existing RTP stream with RTSP
12 janvier 2015, par NeverbirthI have a RTP multicast stream from ffmpeg that requires users to use external SDP files, as this sometimes becomes a problem I was thinking of wrapping the stream using RTSP.
I have an application that already makes some management for the RTP stream, so it would be useful to have the RTSP wrapper inside it as well, although I don’t want the wrapper to do anything beyond delivering the SDP information. Right now I’d say I’m correctly delivering the SDP information (otherwise it’s stuck in that request), however I’m not getting any PLAY command, the player is stuck after the SETUP request, so I guess my reply is wrong, but after testing many different values for the Transport header I haven’t been able to get anything beyond this point.
This is the SDP :
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 236.0.0.1
t=0 0
a=tool:libavformat 56.7.102
m=video 2000 RTP/AVP 96
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1This is a sample SETUP request from VLC :
SETUP rtsp://127.0.0.1:34343/live.sdp/ RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.1.5 (LIVE555 Streaming Media v2014.05.27)
Transport: RTP/AVP;multicast;client_port=2000-2001And one of many replies I’ve tried :
RTSP/1.0 200 OK
CSeq: 4
Transport: RTP/AVP;multicast;client_port=2000-2001;source=236.0.0.1;port=2000-2001
Session: 0456804596I’ve tried using destination instead of source, server_port instead of port, also, although the RTP multicast port is 2000, I’ve seen the streaming is also using other ports like 57927 and 57928, so I’ve tried those ones as well, etc.
-
Corrupt AVFrame returned by libavcodec
2 janvier 2015, par informer2000As part of a bigger project, I’m trying to decode a number of HD (1920x1080) video streams simultaneously. Each video stream is stored in raw yuv420p format within an AVI container. I have a Decoder class from which I create a number of objects within different threads (one object per thread). The two main methods in Decoder are
decode()
andgetNextFrame()
, which I provide the implementation for below.When I separate the decoding logic and use it to decode a single stream, everything works fine. However, when I use the multi-threaded code, I get a segmentation fault and the program crashes within the processing code in the decoding loop. After some investigation, I realized that the data array of the
AVFrame
filled ingetNextFrame()
contains addresses which are out of range (according to gdb).I’m really lost here ! I’m not doing anything that would change the contents of the
AVFrame
in my code. The only place where I attempt to access the AVFrame is when I callsws_scale()
to convert the color format and that’s where the segmentation fault occurs in the second case because of the corruptAVFrame
. Any suggestion as to why this is happening is greatly appreciated. Thanks in advance.The
decode()
method :void decode() {
QString filename("video.avi");
AVFormatContext* container = 0;
if (avformat_open_input(&container, filename.toStdString().c_str(), NULL, NULL) < 0) {
fprintf(stderr, "Could not open %s\n", filename.toStdString().c_str());
exit(1);
}
if (avformat_find_stream_info(container, NULL) < 0) {
fprintf(stderr, "Could not find file info..\n");
}
// find a video stream
int stream_id = -1;
for (unsigned int i = 0; i < container->nb_streams; i++) {
if (container->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
stream_id = i;
break;
}
}
if (stream_id == -1) {
fprintf(stderr, "Could not find a video stream..\n");
}
av_dump_format(container, stream_id, filename.toStdString().c_str(), false);
// find the appropriate codec and open it
AVCodecContext* codec_context = container->streams[stream_id]->codec; // Get a pointer to the codec context for the video stream
AVCodec* codec = avcodec_find_decoder(codec_context->codec_id); // Find the decoder for the video stream
if (codec == NULL) {
fprintf(stderr, "Could not find a suitable codec..\n");
return -1; // Codec not found
}
// Inform the codec that we can handle truncated bitstreams -- i.e.,
// bitstreams where frame boundaries can fall in the middle of packets
if (codec->capabilities & CODEC_CAP_TRUNCATED)
codec_context->flags |= CODEC_FLAG_TRUNCATED;
fprintf(stderr, "Codec: %s\n", codec->name);
// open the codec
int ret = avcodec_open2(codec_context, codec, NULL);
if (ret < 0) {
fprintf(stderr, "Could not open the needed codec.. Error: %d\n", ret);
return -1;
}
// allocate video frame
AVFrame *frame = avcodec_alloc_frame(); // deprecated, should use av_frame_alloc() instead
if (!frame) {
fprintf(stderr, "Could not allocate video frame..\n");
return -1;
}
int frameNumber = 0;
// as long as there are remaining frames in the stream
while (getNextFrame(container, codec_context, stream_id, frame)) {
// Processing logic here...
// AVFrame data array contains three addresses which are out of range
}
// freeing resources
av_free(frame);
avcodec_close(codec_context);
avformat_close_input(&container);
}The
getNextFrame()
method :bool getNextFrame(AVFormatContext *pFormatCtx,
AVCodecContext *pCodecCtx,
int videoStream,
AVFrame *pFrame) {
uint8_t inbuf[INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
char buf[1024];
int len;
int got_picture;
AVPacket avpkt;
av_init_packet(&avpkt);
memset(inbuf + INBUF_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
// read data from bit stream and store it in the AVPacket object
while(av_read_frame(pFormatCtx, &avpkt) >= 0) {
// check the stream index of the read packet to make sure it is a video stream
if(avpkt.stream_index == videoStream) {
// decode the packet and store the decoded content in the AVFrame object and set the flag if we have a complete decoded picture
avcodec_decode_video2(pCodecCtx, pFrame, &got_picture, &avpkt);
// if we have completed decoding an entire picture (frame), return true
if(got_picture) {
av_free_packet(&avpkt);
return true;
}
}
// free the AVPacket object that was allocated by av_read_frame
av_free_packet(&avpkt);
}
return false;
}The lock management callback function :
static int lock_call_back(void ** mutex, enum AVLockOp op) {
switch (op) {
case AV_LOCK_CREATE:
*mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
pthread_mutex_init((pthread_mutex_t *)(*mutex), NULL);
break;
case AV_LOCK_OBTAIN:
pthread_mutex_lock((pthread_mutex_t *)(*mutex));
break;
case AV_LOCK_RELEASE:
pthread_mutex_unlock((pthread_mutex_t *)(*mutex));
break;
case AV_LOCK_DESTROY:
pthread_mutex_destroy((pthread_mutex_t *)(*mutex));
free(*mutex);
break;
}
return 0;
}