
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 (48)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (10206)
-
Restart ffmpeg process using monit if TOTAL CPU is less than 1%
15 mai 2017, par user2201239I have used kind of similar solution like this Restarting ffmpeg process using monit to restart my ffmpeg stream in case it fails for some reason. Remember its not duplicate problem/question, because I have other issues unlike the example question/solution Restarting ffmpeg process using monit, which I’m gonna explain below. So here is my monit configuration :
check process FFMPEGStream with pidfile PATH-to-file/streampid.pid
start program = "PATH-to-file/streambash.sh restart"
stop program = "PATH-to-file/streambash.sh stop"
if TOTAL CPU is less than 1% for 10 cycles then restartHere is my streambash.sh file :
#!/bin/bash
pid_file="PATH-to-file/streampid.pid"
case "$1" in
restart)
PATH-to-file/streambash.sh stop
PATH-to-file/streambash.sh start
;;
start)
rm $pid_file
/usr/bin/ffmpeg -i "INPUT-PATH" -c:v libx264 -b:v 900k -preset ultrafast -aspect 16:9 -s 640x376 -strict experimental -c:a aac -b:a 96k -f flv "RTMP-PATH" &> /dev/null &
ch_pid=$!
echo "Start Stream1: ffmpeg = $ch_pid";
echo $ch_pid > $pid_file
;;
stop)
echo "Stop ffmpeg Stream1";
kill `cat $pid_file` &> /dev/null
;;
*)
echo "Usage: PATH-to-file/streambash.sh {start|stop|restart}"
exit 1
;;
esac
exit 0
echo $pid_fileMonit can start the bash file successfully, but when this condition "if TOTAL CPU is less than 1% for 10 cycles then restart" is matched in monit configuration, it tries to restart, it gives error that process is not running. But in actual the ffmpeg process still runs in the background and I can see that the stream is live on my website. Here is monit logs :
[CET Jan 10 12:55:02] error : 'FFMPEGStream' total cpu usage of 0.4% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:07] error : 'FFMPEGStream' total cpu usage of 0.0% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:12] error : 'FFMPEGStream' total cpu usage of 0.0% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:17] error : 'FFMPEGStream' total cpu usage of 0.4% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:22] error : 'FFMPEGStream' total cpu usage of 0.9% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:27] error : 'FFMPEGStream' total cpu usage of 0.9% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:32] error : 'FFMPEGStream' total cpu usage of 0.0% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:37] error : 'FFMPEGStream' total cpu usage of 0.0% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:42] error : 'FFMPEGStream' total cpu usage of 0.0% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:47] error : 'FFMPEGStream' total cpu usage of 0.4% matches resource limit [cpu usage>1.0%]
[CET Jan 10 12:55:50] info : 'FFMPEGStream' trying to restart
[CET Jan 10 12:55:50] info : 'FFMPEGStream' stop: PATH-to-file/streambash.sh
[CET Jan 10 12:55:51] info : 'FFMPEGStream' start: PATH-to-file/streambash.sh
[CET Jan 10 12:55:56] error : 'FFMPEGStream' process is not running
[CET Jan 10 12:55:58] info : 'FFMPEGStream' trying to restart
[CET Jan 10 12:55:58] info : 'FFMPEGStream' start: PATH-to-file/streambash.sh
[CET Jan 10 12:56:04] error : 'FFMPEGStream' process is not running
[CET Jan 10 12:56:04] info : 'FFMPEGStream' trying to restart
[CET Jan 10 12:56:04] info : 'FFMPEGStream' start: PATH-to-file/streambash.sh
[CET Jan 10 12:56:09] error : 'FFMPEGStream' process is not running
[CET Jan 10 12:56:09] info : 'FFMPEGStream' trying to restart
[CET Jan 10 12:56:09] info : 'FFMPEGStream' start: PATH-to-file/streambash.shMonit keeps trying to restart the process and on each retry, it dumps a new pid to the PATH-to-file/streampid.pid, but as I said it seems, it somehow can stop the actual ffmpeg stream/pid, which keep running in the background.
-
Adding total duration/enable seeking in mp4 AAC audio stream file with FFMPEG
12 avril 2016, par lex82I’m trying to write an AAC audio stream into an mp4 file using the FFMPEG libraries. I am using a custom IO context that writes directly to a socket so I have to set
ioContext->seekable = 0
. To make this work I had to add the "movflags"empty_moov
andfrag_keyframe
when writing the header.After writing the output to a file on the other end of the socket, I can play the file in VLC or Windows Media Player. However, seeking to a specific position in the file is not working properly in both players. WMP also does not show the total duration and VLC only flashes it shortly when reaching the end of the audio.
Is there a way to add more metadata when muxing so the players are able to treat the file as if it was not written as a stream ? Transfer via the socket is not interrupted abruptly, so I could write metadata at the end of the file. I also know the total duration in advance, so I could add it to the header of the file if it was possible. I cannot use the
faststart
flag because this would require output to a seekable file before writing to the socket.Update : I learned that I can set the duration in
AVFormatContext
and I can setnb_frames
andavg_frame_rate
inAVStream
. However, it doesn’t solve my problem. When I set the codecContext flagAV_CODEC_FLAG_QSCALE
, VLC seems to be able to estimate the total time. However, seeking still doesn’t work. -
Adding total duration/enable seeking in mp4 audio stream file with FFMPEG
12 avril 2016, par lex82I’m trying to write an AAC audio stream into an mp4 file using the FFMPEG libraries. I am using a custom IO context that writes directly to a socket so I have to set
ioContext->seekable = 0
. To make this work I had to add the "movflags"empty_moov
andfrag_keyframe
when writing the header.After writing the output to a file on the other end of the socket, I can play the file in VLC or Windows Media Player. However, seeking to a specific position in the file is not working properly in both players. WMP also does not show the total duration and VLC only flashes it shortly when reaching the end of the audio.
Is there a way to add more metadata when muxing so the players are able to treat the file as if it was not written as a stream ? Transfer via the socket is not interrupted abruptly, so I could write metadata at the end of the file. I also know the total duration in advance, so I could add it to the header of the file if it was possible. I cannot use the
faststart
flag because this would require output to a seekable file before writing to the socket.Update : I learned that I can set the duration in
AVFormatContext
and I can setnb_frames
andavg_frame_rate
inAVStream
. However, it doesn’t solve my problem. When I set the codecContext flagAV_CODEC_FLAG_QSCALE
, VLC seems to be able to estimate the total time. However, seeking still doesn’t work.