
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (55)
-
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...) -
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (6267)
-
Revision d205335060 : [svc] Finalize spatial svc first pass rate control 1. Save stats for each
19 mars 2014, par Minghai ShangChanged Paths :
Modify /examples/vp9_spatial_scalable_encoder.c
Modify /test/svc_test.cc
Modify /vp9/encoder/vp9_firstpass.c
Modify /vp9/encoder/vp9_firstpass.h
Modify /vp9/encoder/vp9_onyx_if.c
Modify /vp9/encoder/vp9_onyx_int.h
Modify /vp9/encoder/vp9_svc_layercontext.h
Modify /vpx/src/svc_encodeframe.c
Modify /vpx/vpx_encoder.h
[svc] Finalize spatial svc first pass rate control1. Save stats for each spatial layer
2. Add frame buffer management for svc first pass rc
3. Set default spatial layer to 1
4. Flush encoder at the end of stream in test app
This only supports spatial svc.
Change-Id : Ia89cfa87bb6394e6c0405b921d86c426d0a0c9ae -
How to paint on a video frame by frame and save it using flutter ?
20 septembre 2022, par Maxence BourdinThe goal is to analyse a video frame by frame and apply a painting on each of those frames. Then save the video and be able to play it.


Do you know if such a thing is possible in flutter ? I've heard about ffmpeg package but I'm not too sure if that's possible with it.


-
How to save image from the middle of a video ?
29 octobre 2017, par puppon -suI need to make a thumbnail for a video, to seek to the 25% of a video and save the image. Here is what I’m doing right now, but it only saves black image.
#include
#include <libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>dict.h>
int main (int argc, char **argv)
{
av_register_all();
AVFormatContext *pFormatCtx = avformat_alloc_context();
int res;
res = avformat_open_input(&pFormatCtx, "test.mp4", NULL, NULL);
if (res) {
return res;
}
avformat_find_stream_info(pFormatCtx, NULL);
int64_t duration = pFormatCtx->duration;
// Find the first video stream
int videoStream=-1;
for(int i=0; inb_streams; i++) {
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) {
videoStream=i;
break;
}
}
if(videoStream==-1) {
return -1;
}
AVCodecContext *pCodecCtxOrig = NULL;
// Get a pointer to the codec context for the video stream
pCodecCtxOrig=pFormatCtx->streams[videoStream]->codec;
AVCodec *pCodec = NULL;
// Find the decoder for the video stream
pCodec=avcodec_find_decoder(pCodecCtxOrig->codec_id);
if(pCodec==NULL) {
fprintf(stderr, "Unsupported codec!\n");
return -1; // Codec not found
}
AVCodecContext *pCodecCtx = NULL;
// Copy context
pCodecCtx = avcodec_alloc_context3(pCodec);
if(avcodec_copy_context(pCodecCtx, pCodecCtxOrig) != 0) {
fprintf(stderr, "Couldn't copy codec context");
return -1; // Error copying codec context
}
// Open codec
if(avcodec_open2(pCodecCtx, pCodec, NULL)<0) {
return -1; // Could not open codec
}
AVFrame *pFrame = NULL;
pFrame=av_frame_alloc();
AVFrame *pFrameRGB = NULL;
pFrameRGB=av_frame_alloc();
// Determine required buffer size and allocate buffer
int numBytes=avpicture_get_size(AV_PIX_FMT_RGB24, pCodecCtx->width,
pCodecCtx->height);
uint8_t *buffer = NULL;
buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
// Assign appropriate parts of buffer to image planes in pFrameRGB
// Note that pFrameRGB is an AVFrame, but AVFrame is a superset
// of AVPicture
res = avpicture_fill((AVPicture *)pFrameRGB, buffer, AV_PIX_FMT_RGB24,
pCodecCtx->width, pCodecCtx->height);
if (res<0) {
return;
}
// I've set this number randomly
res = av_seek_frame(pFormatCtx, videoStream, 20.0, AVSEEK_FLAG_FRAME);
if (res<0) {
return;
}
AVPacket packet;
while(1) {
av_read_frame(pFormatCtx, &packet);
if(packet.stream_index==videoStream) {
int frameFinished;
avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
if(frameFinished) {
SaveFrame(pFrameRGB, pCodecCtx->width,
pCodecCtx->height);
break;
}
}
}
avformat_close_input(&pFormatCtx);
return 0;
}
void SaveFrame(AVFrame *pFrame, int width, int height) {
FILE *pFile;
char szFilename[] = "frame.ppm";
int y;
// Open file
pFile=fopen(szFilename, "wb");
if(pFile==NULL)
return;
// Write header
fprintf(pFile, "P6\n%d %d\n255\n", width, height);
// Write pixel data
for(y=0; ydata[0]+y*pFrame->linesize[0], 1, width*3, pFile);
// Close file
fclose(pFile);
}I was following this tutorial http://dranger.com/ffmpeg/tutorial01.html http://dranger.com/ffmpeg/tutorial07.html . It says that it was updated in 2015, but there already are some warnings about deprecated code, for example here :
pFormatCtx->streams[i]->codec
.I got video duration (in microseconds), but I don’t understand what I should send to
av_seek_frame
. Can I somehow use frame number for both duration and seeking, instead of time ?