
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (54)
-
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 -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (10427)
-
Get frame time in ffmpeg
30 mai 2013, par Srv19I am trying to make a little video player that has seek bar (with ffmpeg, of course). For that i need function that will, using data from frame and/or packet, get me current time in the video that should be set in seek slider.
It should work like this :
my_time = get_cur_time()
seek(my_time + 10)
assert(my_time+10 == get_cur_time())
seek(my_time - 10)
assert(my_time-10 == get_cur_time())I do understand thatffmpeg does not support precise seeking, so equality here means "something reasonably cloae).
What code have i used for this thus far :
frame_time = frame->pts*av_q2d(video_dec_ctx->time_base) * 1000;
where frame is
AVFrame
and video_dec_ctx isAVCodecContext
.And for seeking :
int fn = ffmpeg::av_rescale(tsms,fmt_ctx->streams[video_stream->index]->time_base.den,
fmt_ctx->streams[video_stream->index]->time_base.num);
int frame = fn/1000;
printf("\t avformat_seek_file to %d\n",frame);
int flags = AVSEEK_FLAG_FRAME;
if (frame < this->frame->pts)
flags |= AVSEEK_FLAG_BACKWARD;
if(ffmpeg::av_seek_frame(fmt_ctx,video_stream->index,frame,flags))
{
printf("\nFailed to seek for time %d",frame);
return false;
}
avcodec_flush_buffers(video_dec_ctx);
int got_frame = 0;
do
if (av_read_frame(fmt_ctx, &pkt) >= 0) {
decode_packet_ro(&got_frame, 0);
av_free_packet(&pkt);
}
else
{
read_cache = true;
pkt.data = NULL;
pkt.size = 0;
break;
}
while(!(got_frame && this->frame->pts >= frame));The code does forward seeking passably, but after any attempt of backward seeking my second assertion fails. After seeking to previous position, my method of getting time does not return position less that one before seeking. That causes my seek slider to work grossly incorrectly.
-
How to seek by msec with ffmpeg ?
26 mai 2014, par Srv19I am trying to seek in video by milliseconds with ffmpeg. I have been trying to use code from this question, which uses
avformat_seek_file
(i use it with -1 for stream number and AVSEEK_FLAG_ANY flag).After that is called, i try to read next frames, that is :
if (av_read_frame(fmt_ctx, &pkt) >= 0)
{
int ret = 0;
if (pkt.stream_index == video_stream_idx) {
/* decode video frame */
ret = avcodec_decode_video2(video_dec_ctx, frame, got_frame, &pkt);
if (ret < 0) {
fprintf(stderr, "Error decoding video frame\n");
return ret;
}
//do something with frame
}However, the
frame->pts
of retrieved frame always holds the time of the frame that was immediatly after last frame that was read before seeking.Edit : In spite of frame->pts forming unbroken sequence, seeking does occur. For some bizarre reason next frame i read is the first one. In fact, after i run :
int got_frame = 0;
do
if (av_read_frame(fmt_ctx, &pkt) >= 0) {
decode_packet_ro(&got_frame, 0);
av_free_packet(&pkt);
}
else
{
read_cache = true;
pkt.data = NULL;
pkt.size = 0;
break;
}
while(!got_frame || this->frame->pts*av_q2d(video_dec_ctx->time_base) * 1000 < tsms);next frame i read is always the first one.
-
ffserver "dimensions not set" when loading stream
29 mai 2013, par GreenGiantI am live streaming a webcam from my raspberry pi using avconv (ffmpeg "replacement")
avconv -f video4linux2 -v debug -r 5 -s 176x144 -i /dev/video0 -vcodec mjpeg http://192.168.0.3:8090/feed1.ffm
to my local network OSX machine (for testing) running ffserver
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000
CustomLog -
NoDaemon
<feed>
File feed1.ffm
FileMaxSize 20M
ACL allow 192.168.0.10
</feed>
<stream>
Feed feed1.ffm
Format mjpeg
NoAudio
VideoQMin 1
VideoQMax 10
VideoSize 176x144
VideoFrameRate 5
</stream>When I start avconv it appears to be streaming to ffserver fine :
Output #0, ffm, to 'http://192.168.0.3:8090/feed1.ffm':
Metadata:
encoder : Lavf55.0.1
Stream #0.0, 0, 1/1000000: Video: mjpeg, yuvj420p, 320x240, 1/5, q=2-31, 200 kb/s, 1000k tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mjpeg)
Press ctrl-c to stop encoding
frame= 108 fps= 18 q=21.7 size= 688kB time=21.60 bitrate= 260.9kbits/sAnd the ffserver status page shows the stream
However when I load
http://localhost:8090/test.mjpeg
in VLC it doesn't play and ffserver spits out :Sat May 25 17:25:34 2013 dimensions not set
Sat May 25 17:25:34 2013 Error writing output header
Sat May 25 17:25:34 2013 127.0.0.1 - - [GET] "/test.mjpeg HTTP/1.1" 200 66I've tried so many different configurations and settings, I'm at a loss to what is causing that error !
Thank you