
Recherche avancée
Autres articles (55)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)
Sur d’autres sites (4910)
-
Extracting all frames of a video using ffmpeg
4 décembre 2013, par Gonzalo SoleraI'm trying to extract all the frames of a video using ffmpeg compiled statically for android. I want to extract all the frames with a lower quality (at jpg format) and then, select the specific frames I want with a higher resolution and extract them at png format.
But the problem is that I need to know exactly at what time is placed the selected frame in order to be able to extract te same frame at higher resolution. When I calcule how much time are between frames (duration_of_the_video/total_frames_extracted) and I multiple it by the number of the frame I want to extract again, the result time isn't the exact time of the frame.How could I extract a specific number of frames of a video using ffmpeg ? I'm trying to extract all the frames but sometimes not all the frames are extracted. For example, I have a 1600 ms long video but when I use this command :
ffmpeg -i file.mp4 -y %d.jpg
it doesn't extract all the frames because it only extracts 45 frames but the frame rate is 30 fps (1600/45 = 35.5555 and 1000/30 = 33.33333).
So, in order to be able to calculate at what time is placed the frame I want, I would need to extract ALL the frames of the video or extract a fixed number of frames (it doesn't matter if some frames are repeated if I can get the time of them).
This is the output when I try to extract all the frames (there should be 48 but there are 45 instead so I can't calculate the exact time...)
I'm not sure If I have explained correctly but I will appreciate any help. Thanks !
-
FFmpeg convert time to frame
3 décembre 2013, par William SeemannDoes anyone know how to convert a timestamp into a frame ? For example, if I wanted the frame number at 2 seconds in a video with a framerate of 30/fps it would be the 60th frame. Here is the code I have so far. However, I don't think it's correct since seek_time has a value of 90 (for a 1 sec target) using a video with a framerate of 23.98 :
int timeUs = 1000000; // 1 sec
AVPacket packet;
AVPacket *pkt = NULL;
int64_t desired_frame_number = -1;
State *state = *ps;
Options opt = option;
int stream_index = state->video_stream;
int64_t seek_time = av_rescale_q(timeUs, AV_TIME_BASE_Q, state->pFormatCtx->streams[stream_index]->time_base);
int64_t seek_stream_duration = state->pFormatCtx->streams[stream_index]->duration;
int flags = 0;
int ret = -1;
// Convert time into frame number
seek_time /= 1000;
printf("seek time: %" PRId64 "\n", seek_time); -
How to reduce latency when streaming x264
10 janvier 2014, par tobsenI would like to produce a
zerolatency
live video stream and play it in VLC player with as little latency as possible.This are the settings I currently use :
x264_param_default_preset( &m_Params, "veryfast", "zerolatency" );
m_Params.i_threads = 2;
m_Params.b_sliced_threads = true;
m_Params.i_width = m_SourceWidth;
m_Params.i_height = m_SourceHeight;
m_Params.b_intra_refresh = 1;
m_Params.b_vfr_input = true;
m_Params.i_timebase_num = 1;
m_Params.i_timebase_den = 1000;
m_Params.i_fps_num = 1;
m_Params.i_fps_den = 60;
m_Params.rc.i_vbv_max_bitrate = 512;
m_Params.rc.i_vbv_buffer_size = 256;
m_Params.rc.f_vbv_buffer_init = 1.1f;
m_Params.rc.i_rc_method = X264_RC_CRF;
m_Params.rc.f_rf_constant = 24;
m_Params.rc.f_rf_constant_max = 35;
m_Params.b_annexb = 0;
m_Params.b_repeat_headers = 0;
m_Params.b_aud = 0;
x264_param_apply_profile( &m_Params, "high" );Using those settings, I have the following issues :
- VLC shows lots of missing frames (see screenshot, "verloren"). I am not sure if this is an issue.
- If I set a value <200ms for the network stream delay in VLC, VLC renders a few frames and than stops to decode/render frames.
- If I set a value >= 200ms for the network stream delay in VLC, everything looks good so far but the latency is, obviously, 200ms, which is too high.
Question :
Which settings (x264lib and VLC) should I use in order to encode and stream with as little latency as possible ?