
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 (15)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
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 -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (3854)
-
lavc/bitstream : templatize for BE/LE
28 janvier 2021, par Anton Khirnov -
FFMPEG save last 10 sec before a movement and next 30secs
2 novembre 2020, par Set1ishI have a surveillance camera that process frame by frame live video. In case of movement, I want to save a video containing the last 10 seconds before the movement and next 30 seconds after the movement.
I beleve (may be I'm wrong), that last 10 second + next 30seconds task, should be obtained without decoding-rencoding process.


I try to use python with fmmpeg pipes, creating a reader and a writer, but the reader seams too slow for the stream and I loose some packets (= loose on video quality for saved file).


Here my code


import ffmpeg
import numpy as np

width = 1280
height = 720


process1 = (
 ffmpeg
 .input('rtsp://.....',rtsp_transport='udp', r='10', t="00:00:30")
 .output('pipe:', format='rawvideo', pix_fmt='yuv420p')
 .run_async(pipe_stdout=True)
)

process2 = (
 ffmpeg
 .input('pipe:', format='rawvideo', pix_fmt='yuv420p', s='{}x{}'.format(width, height))
 .output("prova-02-11-2020.avi", pix_fmt='yuv420p',r='10')
 .overwrite_output()
 .run_async(pipe_stdin=True)
)
while True:
 in_bytes = process1.stdout.read(width * height * 3)
 if not in_bytes:
 break
 in_frame = (
 np
 .frombuffer(in_bytes, np.uint8)
 )

 #In future I will save in_frame in a queue
 out_frame = in_frame
 
 process2.stdin.write(
 out_frame
 .astype(np.uint8)
 .tobytes()
 )

process2.stdin.close()
process1.wait()
process2.wait()



If I run


ffmpeg -i rtsp://... -acodec copy -vcodec copy -t "00:00:30" out.avi



It look that decode-rencode process is done in quick/smart way without loosing any packet.
My dream is to make the same on python for the surveillance camera but intergrating with code that analyse the stream.


I would like that the flow for creating the file, does not requires decoding + enconding. The last 10secs frames are in a queue and, at specific event, the contenet of queue plus next 30secs frames are saved into a avi file


I have the constraints to have realtime motion detection on live streaming


Did you have any comments or suggestion ?


-
doc/filters : move mcdeint above mergeplanes
26 septembre 2015, par Paul B Mahol