
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 (25)
-
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 -
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 (...) -
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs.
Sur d’autres sites (5074)
-
PHP ffmpeg Image to Video
2 mars 2021, par Metin SaraçI want to create a Video with Image in php ffmpeg.


My code is as follows,


$video = $ffmpeg->open('image1.jpg');
$video->filters() ->resize(new FFMpeg\Coordinate\Dimension(1080, 1080))->synchronize();
$format = new FFMpeg\Format\Video\X264();
$format->setKiloBitrate(1000)->setAudioChannels(2)->setAudioKiloBitrate(256);
$video->save($format, 'video.avi');



I want total video duration and background sound to my code, but I couldn't find a suitable solution. Can you help me ?


Respects.


-
Extract information about video frames
5 mai 2017, par Sanduni WickramasingheI wrote a code to read a video in encoded domain and able to retrieve information such as size and duration of frames. AVPacket class consist of a variable as data. I can read it but since it is a bite array I can’t use it in readable format. I want to use this data for comparison with another video file. Please help.
void CFfmpegmethods::VideoRead(){
av_register_all();
avformat_network_init();
ofstream outdata;
const char *url = "H:\\Sanduni_projects\\Sample_video.mp4";
AVDictionary *options = NULL;
AVFormatContext *s = avformat_alloc_context(); //NULL;
AVPacket *pkt = new AVPacket();
//open an input stream and read the header
int ret = avformat_open_input(&s, url, NULL, NULL);
//avformat_find_stream_info(s, &options); //finding the missing information
if (ret < 0)
abort();
av_dict_set(&options, "video_size", "640x480", 0);
av_dict_set(&options, "pixel_format", "rgb24", 0);
if (avformat_open_input(&s, url, NULL, &options) < 0){
abort();
}
av_dict_free(&options);
AVDictionaryEntry *e;
if (e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX)) {
fprintf(stderr, "Option %s not recognized by the demuxer.\n", e->key);
abort();
}
int i = 1;
int j = 0;
int64_t duration = 0;
int size = 0;
uint8_t *data = 0; //Unsigned integer type with a width of exactly 8 bits.
int sum = 0;
int total_size = 0;
int total_duration = 0;
int packet_size = 0;
int64_t stream_index = 0;
int64_t bit_rate = 0;
//writing data to a file
outdata.open("H:\\Sanduni_projects\\log.txt");
if (!outdata){
cerr << "Error: file could not be opened" << endl;
exit(1);
}
//Split what is stored in the file into frames and return one for each call
//returns the next frame of the stream
while(1){
int frame = av_read_frame(s, pkt);
if (frame < 0) break;
duration = pkt->duration;
size = pkt->size;
total_size = total_size + size;
total_duration = total_duration + duration;
cout << "frame:" << i << " " << size << " " << duration << endl;
data = pkt->data;
outdata << "Frame: " << i << " ";
outdata << data<< endl;
for (j = 0; j < size; j++){
}
i++;
//pkt_no++;
//outdata << sum << endl;
}
//make the packet free
av_packet_unref(pkt);
delete pkt;
cout << "total size: " << total_size << endl;
cout << "total duration:" << total_duration << endl;
outdata.close();
//Close the file after reading
avformat_close_input(&s);}
-
Anomalie #4424 (Fermé) : Une rubrique est considérée comme publiée si elle a un logo
19 janvier 2020, par nicod _Une rubrique sans article passe au statut "publie" dès qu’on lui ajoute un logo (qui sont maintenant des documents).
Je pense que c’est à la fois côté SPIP, qui compte tous les enfants d’une rubrique, et du côté du plugin médias, qui renvoie le nombre de documents d’une rubrique qu’il faut intervenir.
Mais medias_objet_compte_enfants() renvoie juste un total (sql_countsel), du coup il faudrait peut être lui passer un paramètre pour qu’elle exclue les logos dans certains cas ?