
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (69)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)
Sur d’autres sites (10019)
-
Improve bash script for checking when ffmpeg hangs streaming IP cam rtsp to youtube
15 octobre 2022, par shakespeareBackground



I have a garden IP cam id like to stream live to youtube, so i decided to use ffmpeg to achieve this.



The problem



Whenever my IP cam restarts or loses connection ; ffmpeg will get stuck on the same frame and not resume once the IP cam is back online.



My solution



I have the ffmpeg output logged to a file, then have a script fetch the last line of the log every few seconds and compares frame numbers. If the frame numbers match, it kills ffmpeg process and starts another ffmpeg process.



My question



Is there a better way more efficient way ?



logchecker.sh



#/bin/bash
while true
do
 frameA=$(tail /home/daniel/output.txt -n 1 | sed -nr 's/.*frame=(.*)fps.*/\1/p')
 echo "$frameA"
 sleep 3
 frameB=$(tail /home/daniel/output.txt -n 1 | sed -nr 's/.*frame=(.*)fps.*/\1/p')
 echo "$frameB"

 if [ "$frameA" = "$frameB" ]
 then
 echo "Camera has hung"
 pkill ffmpeg
 echo "killed ffmpeg..."
 echo "Waiting 30 secs"
 sleep 30
 bash /home/daniel/ffmpeg.sh &
 echo "started ffpmeg.."
 echo "Waiting 30 secs"
 sleep 30
 else 
 echo "proceed"
 fi

 sleep 2
done




ffmpeg.sh



#!bin/bash
sleep 30
ffmpeg -f lavfi -i anullsrc -rtsp_transport udp -i rtsp://user:password@url:5544/live0.264 -bufsize 5000k -c:v copy -c:a mp3 -b:a 1 -f flv rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx 2> /home/daniel/output.txt



-
ffmpeg won't save the file when executed from a php page
6 septembre 2015, par TayaxI wrote few lines of codes today to create an video from an image with ffmpeg.
the command works well directly on my server and the file is saved at the good place, but when running it from PHP, the process goes, but the file won’t save for some reason.
Here is the code I use :
$ffmpegcmd= "/usr/bin/ffmpeg -loop 1 -y -i /home/mysite/www/forwork/simpletext.jpg -c:v libx264 -t 30 -pix_fmt yuv420p /home/mysite/www/forwork/movie.avi 2>&1";
exec($ffmpegcmd, $output);
print_r($output);And here is the answer I get :
Array ( [0] => ffmpeg version git-2015-09-06-db18b3d Copyright (c) 2000-2015 the FFmpeg developers
[1] => built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
[2] => configuration: --prefix=/usr/ffmpeg_build --extra-cflags=-I/usr/ffmpeg_build/include --extra-ldflags=-L/usr/ffmpeg_build/lib --bindir=/usr/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
[3] => libavutil 55. 0.100 / 55. 0.100
[4] => libavcodec 57. 0.100 / 57. 0.100
[5] => libavformat 57. 0.100 / 57. 0.100
[6] => libavdevice 57. 0.100 / 57. 0.100
[7] => libavfilter 6. 0.100 / 6. 0.100
[8] => libswscale 4. 0.100 / 4. 0.100
[9] => libswresample 2. 0.100 / 2. 0.100
[10] => libpostproc 54. 0.100 / 54. 0.100
[11] => Input #0, image2, from '/home/mysite/www/forwork/simpletext.jpg':
[12] => Duration: 00:00:00.04, start: 0.000000, bitrate: 10414 kb/s
[13] => Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
[14] => /home/mysite/www/forwork/movie.avi: Permission denied )I chmod the forwork directory to 755 but it won’t change anything.
help troubleshooting this would be greatly appreciate. Thanks
-
Extract Video Meta Data from First Few MB on S3
22 août 2016, par David WilliamsI have a large collection of video files on S3. I also have application servers running in AWS running a Java webapp. From those application servers, I would like to be able to extract metadata from each video file such as is provided by the Quicktime movie inspector :
Source: /home/me/foo.mov
Format: H.264, 1920x1080
FPS: 29.97
Data Size: 16.8 MB
Data Rate: 6.70 Mbit/sNow, I can clearly get this information from ffmpeg :
$ ffmpeg -i /home/me/foo.mov
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/me/foo.mov':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1mp42
creation_time : 2014-06-30 22:40:08
Duration: 00:00:20.02, start: 0.000000, bitrate: 6698 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 6696 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2014-06-30 22:39:09
handler_name : GPAC ISO Video HandlerI could easily parse out the equivalent fields to the Quicktime output ! But, this would require I have the file locally. Is it possible to do this from the first few MB (or some other mechanism) of a file hosted on S3 without downloading the whole thing locally ? The goal here is to extract the same fields as the quicktime inspector from a file on S3. Any ideas ?