
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 (75)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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
Sur d’autres sites (9959)
-
Why does the official LibAV 12 video example not work properly ?
11 avril 2021, par TheNeuronalCoderI would say the title is quite self-explanatory, but I nearly completely copied the example given by LibAV right here and yet the output video it produced was not playable. Why is it not playable ? Am I using the wrong file extension ? I do not understand what I could have possibly done wrong here and there's little to no documentation I could find for how to encode mp4 video in C++.


#include 
#include 
#include 
#include "libavcodec/avcodec.h"
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"

static void encode(AVCodecContext *enc_ctx, AVFrame *frame, AVPacket *pkt, FILE *outfile) {
 int ret;
 ret = avcodec_send_frame(enc_ctx, frame);
 if (ret < 0) {
 fprintf(stderr, "error sending a frame for encoding\n");
 exit(1);
 }
 while (ret >= 0) {
 ret = avcodec_receive_packet(enc_ctx, pkt);
 if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
 return;
 else if (ret < 0) {
 fprintf(stderr, "error during encoding\n");
 exit(1);
 }
 printf("encoded frame %3"PRId64" (size=%5d)\n", pkt->pts, pkt->size);
 fwrite(pkt->data, 1, pkt->size, outfile);
 av_packet_unref(pkt);
 }
}

int main() {
 const char *filename = "animation.mp4";
 const AVCodec *codec;
 AVCodecContext *c = NULL;
 int i, ret, x, y;
 FILE *f;
 AVFrame *picture;
 AVPacket *pkt;
 uint8_t endcode[] = { 0, 0, 1, 0xb7 };
 if (argc <= 1) {
 fprintf(stderr, "Usage: %s <output file="file">\n", argv[0]);
 exit(0);
 }
 avcodec_register_all();
 codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);
 if (!codec) {
 fprintf(stderr, "codec not found\n");
 exit(1);
 }
 c = avcodec_alloc_context3(codec);
 picture = av_frame_alloc();
 pkt = av_packet_alloc();
 if (!pkt)
 exit(1);
 c->bit_rate = 400000;
 c->width = 352;
 c->height = 288;
 c->time_base = (AVRational){1, 25};
 c->framerate = (AVRational){25, 1};
 c->gop_size = 10;
 c->max_b_frames=1;
 c->pix_fmt = AV_PIX_FMT_YUV420P;
 if (avcodec_open2(c, codec, NULL) < 0) {
 fprintf(stderr, "could not open codec\n");
 exit(1);
 }
 f = fopen(filename, "wb");
 if (!f) {
 fprintf(stderr, "could not open %s\n", filename);
 exit(1);
 }
 picture->format = c->pix_fmt;
 picture->width = c->width;
 picture->height = c->height;
 ret = av_frame_get_buffer(picture, 32);
 if (ret < 0) {
 fprintf(stderr, "could not alloc the frame data\n");
 exit(1);
 }

 for(i=0;i<25;i++) {
 fflush(stdout);
 ret = av_frame_make_writable(picture);
 if (ret < 0)
 exit(1);

 for(y=0;yheight;y++) {
 for(x=0;xwidth;x++) {
 picture->data[0][y * picture->linesize[0] + x] = x + y + i * 3;
 }
 }

 for(y=0;yheight/2;y++) {
 for(x=0;xwidth/2;x++) {
 picture->data[1][y * picture->linesize[1] + x] = 128 + y + i * 2;
 picture->data[2][y * picture->linesize[2] + x] = 64 + x + i * 5;
 }
 }

 picture->pts = i;
 encode(c, picture, pkt, f);
 }

 encode(c, NULL, pkt, f);

 fwrite(endcode, 1, sizeof(endcode), f);
 fclose(f);
 avcodec_free_context(&c);
 av_frame_free(&picture);
 av_packet_free(&pkt);
 return 0;
}
</output>


-
Find the files that have been modified in last 24 Hours only once(skip if its modified more than once) [duplicate]
4 janvier 2020, par Vijay ChandraThis question already has an answer here :
Im using this command to get all modified files in the last 24 hours in ubuntu,
find -type f -name "*.mp4" -mtime -1 -printf "%f\n"
How can i modify this to detect same file only once which means if same file is modified more than 1 time in the last 24 hours,It shouldnt consider this file,It should skip the file,Is there anyway to do this ?
I need this to create a watermarking script which will find the latest files within 24hours and save the list to a txt file and with the help of this text file,I use ffmpeg to watermark the videos and move them to original location.If i do this,the find command is considering the new updated video as modified file and adding watermark again and again,The process isnt getting stopped,Someone please help to fix this.My code is attached below :
#!/bin/bash find -type f -name "*.mp4" -mtime -1 -printf "%f\n" >> /home/domain.com/public_html/admin_panel/public_html/uploads/mp4/temp/file.txt filename='/home/domain.com/public_html/admin_panel/public_html/uploads/mp4/temp/file.txt' all_lines=`cat $filename` for item in $all_lines; do cp $item /home/domain.com/public_html/admin_panel/public_html/uploads/mp4/temp ffmpeg -i $item -i watermark.png -filter_complex "[1][0]scale2ref=w='iw*30/100':h='ow/mdar'[wm][vid];[vid][wm]overlay=(main_w-overlay_w):(main_h-overlay_h)"
-y /home/domain.com/public_html/admin_panel/public_html/uploads/mp4/temp/$item
done -
How to add a color gradient to black and white in ffmpeg
4 mai 2016, par AxiverseI’m converting a sequences of image files to video using ffmpeg. They are black and white representing a range of data. I want to apply a color gradient to the videos, something like black->white becomes black->red->orange->white.
How do I do this with ffmpeg ?