Question
Hi,
I wanna know if it's possible to run motion with a saved video as input, and how, where should i set the video path??
Environment
Motion version: |
3.2.7 |
ffmpeg version: |
|
Libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
suse 10.1 |
--
MiguelRealpe - 29 Nov 2006
Answer
Motion only support yuv420p , yuv422 and rgb colorspace palettes ( widely used in
V4L ,
V4L2 ) and JPEG files so the short answer is
NO but ...
you can always use some tricks.
Extract all the JPEG of the video with ffmpeg or transcode and feed motion using some script or C daemon, i.ex :
While ffmpeg is extracting jpeg images from the saved video a script is taking those files and move/rename to an static file locate in apache root directory,
motion has as input ( using netcam_url parameter ) a local url of your apache pointing that file (
).
ffmpeg -y -t 00:00:10.00 -i movie.avi 'img%d.jpg'
This will extract images from first 10 seconds of the movie creating files : img1.jpg , img2.jpg ... img10.jpg, img11.jpg ... img250.jpg
Of course there're other ways ... that is just a proof of concept.
--
AngelCarpintero - 30 Nov 2006