
Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (74)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (5153)
-
I am a newbie in FFmpeg and I am trying to use FFMPEG to play RTSP stream on Android, but it will play slower and slower
8 mai 2020, par AjaxI am a newbie in FFmpeg and I am trying to use FFMPEG to play RTSP stream on Android, but it will play slower and slower. The picture of my player and video source will increase with the time difference. The video are not synchronized. I'm pulling on the local area network。
The longer it is played, the more the picture of the video source will be. The more it cannot automatically return to the real-time picture like MediaCode's hardware decoding.The decoded picture is in slow motion, and it will freeze after a while.。What causes this ? How can i optimize it。
this is my code



2020-5-8/Problem has been solved


-
mp4 video file generated using ffmpeg, play on desktop but doesn't play on device
9 mai 2014, par NikeshI am generating a video that converts images into .mp4 video file. Every thing works fine. File is also generated as mp4 but the file doesn’t run on android device, says cannot play video.
Please find the attached sample code which convert single jpeg file into video (.mp4)
Please help me to resolve this issue. Thanks.
JNIEXPORT void JNICALL Java_roman10_ffmpegtst_VideoBrowser_videoExample(JNIEnv *pEnv, jobject pObj, char* imagefile,char* videoFile)
{
avcodec_init();
av_register_all();
avcodec_register_all();
AVCodecContext *pOCtx= NULL;
AVCodec *pOCodex = NULL;
LOGE(10,"Start videoExample");
pOCodex = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);
if (!pOCodex) {
LOGE(10,"Cannot find encoder %s", pOCodex);
exit(1);
}
pOCtx= avcodec_alloc_context3(pOCodex);
uint8_t *outbuf;
int i, out_size;
pOCtx->bit_rate = 400000;
pOCtx->width = 640;
pOCtx->height = 480;
AVRational rational = {1,25};
pOCtx->time_base= rational;
pOCtx->gop_size = 10; /* emit one intra frame every ten frames */
pOCtx->max_b_frames=1;
pOCtx->pix_fmt = AV_PIX_FMT_YUV420P;
LOGE(10,"Start avcodec_open2");
int ret = avcodec_open2(pOCtx,pOCodex,NULL);
if(ret < 0)
{
return;
}
LOGE(10,"End avcodec_open2");
AVFormatContext *pIFormatCtx = NULL;
ret = avformat_open_input(&pIFormatCtx, imagefile, NULL, NULL);
if(ret < 0)
{
//Cant't open jpg file
return;
}
av_dump_format(pIFormatCtx, 0, imagefile, 0);
AVCodecContext *pICodecCtx; //output codec context
pICodecCtx = pIFormatCtx->streams[0]->codec;
/*pICodecCtx->width = 640;
pICodecCtx->height = 480;
pICodecCtx->pix_fmt = PIX_FMT_YUV420P;*/
AVCodec *pICodec = avcodec_find_decoder(pICodecCtx->codec_id); //output codec
// Open codec
ret = avcodec_open2(pICodecCtx, pICodec,NULL);
if(ret < 0)
{
//Can't find the decoder
return;
}
AVFrame *pIFrame = avcodec_alloc_frame();
if (!pIFrame)
{
//Can't alloc the input frame
return ;
}
int bufSize = avpicture_get_size(AV_PIX_FMT_YUVJ420P, pICodecCtx->width, pICodecCtx->height);
uint8_t *buffer = (uint8_t *) av_malloc(bufSize * sizeof(uint8_t));
avpicture_fill((AVPicture *) pIFrame, buffer, AV_PIX_FMT_YUVJ420P, pICodecCtx->width, pICodecCtx->height);
FILE *outputFile;
outputFile = fopen(videoFile, "w+");
if (!outputFile) {
LOGE(10,"could not open ");
exit(1);
}
int outbuf_size = 100000;
outbuf = (uint8_t*)malloc(outbuf_size);
AVPacket packet;
int frameFinished;
int framesNumber = 0;
while (av_read_frame(pIFormatCtx, &packet) >= 0)
{
if(packet.stream_index != 0)
continue;
ret = avcodec_decode_video2(pICodecCtx, pIFrame, &frameFinished, &packet);
if (ret > 0)
{
pIFrame->quality = 4;
for(i=0;i<25;i++) {
fflush(stdout);
/* encode the image */
out_size = avcodec_encode_video(pOCtx, outbuf, outbuf_size, pIFrame);
fwrite(outbuf, 1, out_size, outputFile);
}
}
}
/* get the delayed frames */
for(; out_size; i++) {
fflush(stdout);
out_size = avcodec_encode_video(pOCtx, outbuf, outbuf_size, NULL);
fwrite(outbuf, 1, out_size, outputFile);
}
/* add sequence end code to have a real mpeg file */
outbuf[0] = 0x00;
outbuf[1] = 0x00;
outbuf[2] = 0x01;
outbuf[3] = 0xb7;
fwrite(outbuf, 1, 4, outputFile);
fclose(outputFile);
free(outbuf);
avcodec_close(pOCtx);
av_free(pOCtx);
av_free(pIFrame);
} -
Revision 37408 : déplacement de chaines de langue Faire refonctionner l’encodage sonore
18 avril 2010, par kent1@… — Logdéplacement de chaines de langue
Faire refonctionner l’encodage sonore