
Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (102)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)
Sur d’autres sites (8135)
-
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 ?


-
Revision dcacce6dd9 : Merge "Save pixels instead of coefficients in intra4x4 RD loop."
27 juillet 2013, par Ronald S. BultjeChanged Paths :
Modify /vp9/encoder/vp9_rdopt.c
Merge "Save pixels instead of coefficients in intra4x4 RD loop." -
Using command line find to encode files and save to same directory
15 janvier 2017, par Ali SamiiI am trying to execute a find bash command to process hundreds of video files that are all named
video-original.mp4
but are in subdirectories of a parent directory.Here’s an example of the directory structure :
videos
├── 01a
│ └── video-original.mp4
├── 01b
│ └── video-original.mp4
├── 02a
│ └── video-original.mp4
├── 02b
│ └── video-original.mp4
├── 03a
│ └── video-original.mp4
└── 03b
└── video-original.mp4I am using the following command :
find ./ -name 'video-original.mp4' -exec bash -c 'ffmpeg -i "$0" -f mp4 -vcodec libx264 -preset veryslow -profile:v high -acodec aac -movflags faststart video.mp4 -hide_banner' {} \;
The problem I am having is that it is saving the file
video.mp4
in the parentvideos
directory, instead of in the subdirectory next to the originalvideo-original.mp4
Afterwards, I want to delete the file
video-original.mp4
. Currently, my process entails waiting for all the videos to be reencoded, and then once complete, issuing a separate command to delete the filevideo-original.mp4
:find ./ -name 'video-original.mp4' -exec bash -c 'rm -rf "$0"' {} \;
And my final step would be to extract a screenshot of the new
video.mp4
at 10 seconds and save it asthumbnail.jpg
. Again, I am currently doing that as a separate step that I execute after the previous two steps are completed.find ./ -name 'video.mp4' -exec bash -c 'ffmpeg -i "$0" -ss 00:00:10 -vframes 1 thumbnail.jpg' {} \;
What I would like to do is combine these three steps into a single command so the end result will be :
videos
├── 01a
│ ├── thumbnail.jpg
│ └── video.mp4
├── 01b
│ ├── thumbnail.jpg
│ └── video.mp4
├── 02a
│ ├── thumbnail.jpg
│ └── video.mp4
├── 02b
│ ├── thumbnail.jpg
│ └── video.mp4
├── 03a
│ ├── thumbnail.jpg
│ └── video.mp4
└── 03b
├── thumbnail.jpg
└── video.mp4Finally, it would be great to save that as a bash script and include it in my path in
/usr/local/bin
or~/bin
as an executable so I could just issue the commandreencode
and it would run. Would be even better if the input file could have any video file, for example,random_name.mp4
orrandom_name.mov
orrandom_name.webm
, basically any video file (but skippingvideo.mp4
at the encoding step).