
Recherche avancée
Médias (1)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
Autres articles (111)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...)
Sur d’autres sites (8463)
-
How to get accurate time information from ffmpeg audio outputs ?
11 février 2016, par user2192778I want to figure out the best way to have accurate (down to millisecond) time information encoded into a web stream audio recording. So, if I wanted to know what was streaming at exactly 07:57:25 yesterday, I could retrieve that information using my program code. How can I do this in my ffmpeg function ?
So far I have a python script that calls the following ffmpeg function every hour :
ffmpeg -i http://webstreamurl.mp3 -t 01:30:00 outputname.mp3
It will record 1.5 hours of my stream every hour. This leaves me with many 1.5 hour-long clips which together (due to some overlap) will give me audio at every moment.
I don’t know how I will sync these clips with their stream times, however. Is there a way to put timestamps in the audio and have python read it ? Or is there a way to name these output files such that python could calculate the times itself ? Any other way ?
-
How to restart RTMP dump bash script if it closes / dies ?
9 février 2016, par Shashwat SinghI’m using this script to dump a live stream, say "stream1.sh" etc
#! /bin/bash
function INT_cleanup()
{
kill `jobs -p`
exit
}
trap INT_cleanup INT
count=0
while [[ $count < 10 ]] # Try 10 times
do
rtmpdump -r "rtmp://<ipaddress>" -a "live" -f "WIN 11,9,900,117" -W "http://xyz.swf" -p "" -y "xyz" --live | ffmpeg -re -i - -sn -vcodec copy -acodec copy -f flv "<ipaddress>"
count=$((count + 1))
done }
</ipaddress></ipaddress>It runs perfectly fine for 3-4 hours then it quits automatically due to packet loss or something, however if I restart it, it again starts working.
So, What should I do to restart this particular script IF it dies ? Will it require cronjob ? If yes, then please explain how ? -
Correct Use Of avcodec_encode_video2() Flush
5 février 2016, par mFeinsteinI have a camera sending pictures to a callback function and I want to make a movie with this pictures using
FFmpeg
. I have followed thedecoding_encoding
example here but am not sure how to use thegot_output
for flushing the encoder and getting the delayed frames.- Shoud I encode all my camera’s pictures when they arrive, and later when I want to stop capturing and close the video, I do the flush loop ?
Or
- Should I do the flush periodically, let’s say, every 100 pictures received ?
My video capture program could be running for hours, so I am worried about how this delayed frames work in memory consumption, if they stack up there until the flush, this could take all my memory.
This is the encoding performed by the example, it makes 25 dummy
Frames
for 1 second of video, and later, in the end, it loop throughavcodec_encode_video2()
looking forgot_output
for delayed frames :///// Prepare the Frame, CodecContext and some aditional logic.....
/* encode 1 second of video */
for (i = 0; i < 25; i++) {
av_init_packet(&pkt);
pkt.data = NULL; // packet data will be allocated by the encoder
pkt.size = 0;
fflush(stdout);
/* prepare a dummy image */
/* Y */
for (y = 0; y < c->height; y++) {
for (x = 0; x < c->width; x++) {
frame->data[0][y * frame->linesize[0] + x] = x + y + i * 3;
}
}
/* Cb and Cr */
for (y = 0; y < c->height/2; y++) {
for (x = 0; x < c->width/2; x++) {
frame->data[1][y * frame->linesize[1] + x] = 128 + y + i * 2;
frame->data[2][y * frame->linesize[2] + x] = 64 + x + i * 5;
}
}
frame->pts = i;
/* encode the image */
ret = avcodec_encode_video2(c, &pkt, frame, &got_output);
if (ret < 0) {
fprintf(stderr, "Error encoding frame\n");
exit(1);
}
if (got_output) {
printf("Write frame %3d (size=%5d)\n", i, pkt.size);
fwrite(pkt.data, 1, pkt.size, f);
av_free_packet(&pkt);
}
}
/* get the delayed frames */
for (got_output = 1; got_output; i++) {
fflush(stdout);
ret = avcodec_encode_video2(c, &pkt, NULL, &got_output);
if (ret < 0) {
fprintf(stderr, "Error encoding frame\n");
exit(1);
}
if (got_output) {
printf("Write frame %3d (size=%5d)\n", i, pkt.size);
fwrite(pkt.data, 1, pkt.size, f);
av_free_packet(&pkt);
}
}
///// Closes the file and finishes.....