Motion - Support Question 2006x 11x 29x 182849

saved video as input

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 ( current_file.jpg ).

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
Topic revision: r2 - 30 Nov 2006, AngelCarpintero
Copyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.