
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (96)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
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 -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...)
Sur d’autres sites (6024)
-
FFMPEG - subtitles not showing for the full duration of video
26 juin 2023, par Caio MaiaI could not archive the following :


- 

- Have images loaded from a textfile to create a slideshow.
- Have a background music with volume control.
- Have my voice.mp3 over the bg music.
- Have subtitles in the ass format.
- Have a text shown with drawtext in the full duration of video.
- in only one command, if possible.














The command I tryed is :


ffmpeg.exe -f concat -i images.txt -i bg_music.m4a -i voice.mp3 -filter_complex "[0:v]drawtext=fontfile='fonte.TTF':fontsize=20:fontcolor=white:text='Imagens da internet':x=w-tw-10:y=h-th-10,[0]overlay=10:10,ass=subtitles.txt[out],[1]volume=0.3[a1];[2]volume=2[a2];[a1][a2]amix=inputs=2:duration=shortest[aud]" -map "[out]" -map "[aud]":a -pix_fmt yuv420p -c:v libx264 -c:s mov_text -r 30 -y out.mp4



It works but not for subtitles that are showing only after the first image of th slideshow appears.


the content of images.txt is :


file 'image1.png'
duration 20
file 'image2.png'
duration 5
file 'image3.png'
duration 5



the content of subtitles.txt is


Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.00,0:00:06.00,Default,,0,0,0,,Subscribe!
Dialogue: 0,0:00:07.00,0:00:16.00,Default2,,0,0,0,,Like!
Dialogue: 0,0:00:17.00,0:00:26.00,Default,,0,0,0,,Share!



The problem is that only the "Share !" text is shown.


-
Revision 9bd3be69a4 : Adjust full-pixel search method in real-time mode Use FAST_HEX in speed 5 and 6
8 juillet 2014, par Yunqing WangChanged Paths :
Modify /vp9/encoder/vp9_speed_features.c
Adjust full-pixel search method in real-time modeUse FAST_HEX in speed 5 and 6, which covers more points than
FAST_DIAMOND and improves motion search quality.At speed 6, RTC set borg tests showed slight quality gain (psnr
gain : 0.143%, ssim gain : 0.226%). No noticeable encoding speed
change.Change-Id : Ifa62875d9a52ee382ec494f271382bb77d8c67bf
-
converting images to mp4 using ffmpeg on iphone
29 novembre 2011, par user633901Up till now, i can create mpeg1 but with no luck for mp4.Maybe we can talk and share information.Someone told me that i have to set some flags for using mp4.But i am stuck at using it...
following is the working code :
av_register_all();
printf("Video encoding\n");
/// find the mpeg video encoder
//codec=avcodec_find_encoder(CODEC_ID_MPEG1VIDEO);
codec = avcodec_find_encoder(CODEC_ID_MPEG4);
if (!codec) {
fprintf(stderr, "codec not found\n");
exit(1);
}
c = avcodec_alloc_context();
picture = avcodec_alloc_frame();
// put sample parameters
c->bit_rate = 400000;
/// resolution must be a multiple of two
c->width = 240;
c->height = 320;
//c->codec_id = fmt->video_codec;
//frames per second
c->time_base= (AVRational){1,25};
c->gop_size = 10; /// emit one intra frame every ten frames
c->max_b_frames=1;
c->pix_fmt =PIX_FMT_YUV420P; // PIX_FMT_YUV420P
if (avcodec_open(c, codec) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
f = fopen([[NSHomeDirectory() stringByAppendingPathComponent:@"test.mp4"] UTF8String], "wb");
if (!f) {
fprintf(stderr, "could not open %s\n",[@"test.mp4" UTF8String]);
exit(1);
}
// alloc image and output buffer
outbuf_size = 100000;
outbuf = malloc(outbuf_size);
size = c->width * c->height;
#pragma mark -
AVFrame* outpic = avcodec_alloc_frame();
int nbytes = avpicture_get_size(PIX_FMT_YUV420P, c->width, c->height); //this is half size of numbytes.
//create buffer for the output image
uint8_t* outbuffer = (uint8_t*)av_malloc(nbytes);
#pragma mark -
for(k=0;k<1;k++) {
for(i=0;i<25;i++) {
fflush(stdout);
int numBytes = avpicture_get_size(PIX_FMT_RGBA, c->width, c->height);
uint8_t *buffer = (uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"%d.png", i+1]];
CGImageRef newCgImage = [image CGImage];
CGDataProviderRef dataProvider = CGImageGetDataProvider(newCgImage);
CFDataRef bitmapData = CGDataProviderCopyData(dataProvider);
buffer = (uint8_t *)CFDataGetBytePtr(bitmapData);
///////////////////////////
//outbuffer=(uint8_t *)CFDataGetBytePtr(bitmapData);
//////////////////////////
avpicture_fill((AVPicture*)picture, buffer, PIX_FMT_RGBA, c->width, c->height);
avpicture_fill((AVPicture*)outpic, outbuffer, PIX_FMT_YUV420P, c->width, c->height);//does not have image data.
struct SwsContext* fooContext = sws_getContext(c->width, c->height,
PIX_FMT_RGBA,
c->width, c->height,
PIX_FMT_YUV420P,
SWS_FAST_BILINEAR, NULL, NULL, NULL);
//perform the conversion
sws_scale(fooContext, picture->data, picture->linesize, 0, c->height, outpic->data, outpic->linesize);
// Here is where I try to convert to YUV
// encode the image
out_size = avcodec_encode_video(c, outbuf, outbuf_size, outpic);
printf("encoding frame %3d (size=%5d)\n", i, out_size);
fwrite(outbuf, 1, out_size, f);
free(buffer);
buffer = NULL;
}
// get the delayed frames
for(; out_size; i++) {
fflush(stdout);
out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL);
printf("write frame %3d (size=%5d)\n", i, out_size);
fwrite(outbuf, 1, outbuf_size, f);
}
}
// 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, f);
fclose(f);
free(picture_buf);
free(outbuf);
avcodec_close(c);
av_free(c);
av_free(picture);
//av_free(outpic);
printf("\n");my msn:hieeli@hotmail.com