
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (50)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (6306)
-
fftools/ffmpeg : add InputStream.index
19 mai 2023, par Anton Khirnov -
Using libavformat to mux H.264 frames into RTP
18 septembre 2021, par DanielB6I have an encoder that produces a series of H.264 I-frames and P-frames. I'm trying to use libavformat to mux and transmit these frames over RTP, but I'm stuck.



My program sends RTP data, but the RTP timestamp increments by 1 each successive frame, instead of 90000/fps. It also doesn't look like it's doing the proper framing for H.264 NAL, since I can't decode the stream as H.264 in Wireshark.



I suspect that I'm not setting up the codec information properly, but it appears in many places in the output format context, so it's unclear what exactly needs to be setup. The examples seem to all copy codec context info from encoders, which isn't my use case.



This is what I'm trying :



int main() {
 AVFormatContext context = avformat_alloc_context();

 if (!context) {
 printf("avformat_alloc_context failed\n");
 return;
 }

 AVOutputFormat *format = av_guess_format("rtp", NULL, NULL);

 if (!format) {
 printf("av_guess_format failed\n");
 return;
 }

 context->oformat = format;

 snprintf(context->filename, sizeof(context->filename), "rtp://%s:%d", "192.168.2.16", 10000);

 if (avio_open(&(context->pb), context->filename, AVIO_FLAG_READ_WRITE) < 0) {
 printf("avio_open failed\n");
 return;
 }

 stream = avformat_new_stream(context, NULL);

 if (!stream) {
 printf("avformat_new_stream failed\n");
 return;
 }

 stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
 stream->codecpar->codec_id = AV_CODEC_ID_H264;
 stream->codecpar->width = 1920;
 stream->codecpar->height = 1080;

 avformat_write_header(context, NULL);

 ...
 write packets
 ...
}




Example write packet :



int write_packet(uint8_t *data, int size) {
 AVPacket p;
 av_init_packet(&p);
 p.data = buffer;
 p.size = size;
 p.stream_index = stream->index;

 av_interleaved_write_frame(context, &p);
}




I've even went so far to build in libx264, find the encoder, and copy the codec context info from there into the stream codecpar, with the same result. My goal is to build without libx264, and any other libs that aren't required, but it isn't clear whether libx264 is required for defaults such as time base.



How can the libavformat RTP muxer be initialized to properly send H.264 frames over RTCP+RTP ?


-
Using libavformat to mux H.264 frames into RTP
22 novembre 2016, par DanielB6I have an encoder that produces a series of H.264 I-frames and P-frames. I’m trying to use libavformat to mux and transmit these frames over RTP, but I’m stuck.
My program sends RTP data, but the RTP timestamp increments by 1 each successive frame, instead of 90000/fps. It also doesn’t look like it’s doing the proper framing for H.264 NAL, since I can’t decode the stream as H.264 in Wireshark.
I suspect that I’m not setting up the codec information properly, but it appears in many places in the output format context, so it’s unclear what exactly needs to be setup. The examples seem to all copy codec context info from encoders, which isn’t my use case.
This is what I’m trying :
int main() {
AVFormatContext context = avformat_alloc_context();
if (!context) {
printf("avformat_alloc_context failed\n");
return;
}
AVOutputFormat *format = av_guess_format("rtp", NULL, NULL);
if (!format) {
printf("av_guess_format failed\n");
return;
}
context->oformat = format;
snprintf(context->filename, sizeof(context->filename), "rtp://%s:%d", "192.168.2.16", 10000);
if (avio_open(&(context->pb), context->filename, AVIO_FLAG_READ_WRITE) < 0) {
printf("avio_open failed\n");
return;
}
stream = avformat_new_stream(context, NULL);
if (!stream) {
printf("avformat_new_stream failed\n");
return;
}
stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
stream->codecpar->codec_id = AV_CODEC_ID_H264;
stream->codecpar->width = 1920;
stream->codecpar->height = 1080;
avformat_write_header(context, NULL);
...
write packets
...
}Example write packet :
int write_packet(uint8_t *data, int size) {
AVPacket p;
av_init_packet(&p);
p.data = buffer;
p.size = size;
p.stream_index = stream->index;
av_interleaved_write_frame(context, &p);
}I’ve even went so far to build in libx264, find the encoder, and copy the codec context info from there into the stream codecpar, with the same result. My goal is to build without libx264, and any other libs that aren’t required, but it isn’t clear whether libx264 is required for defaults such as time base.
How can the libavformat RTP muxer be initialized to properly send H.264 frames over RTCP+RTP ?