什么是运动?:运动是一个deamon应用程序,它允许Linux用户根据运动检测或时间设置记录网络摄像机和ipcams的图片。关于如何设置稳定版本的教程可以找到这里。这是运动网站和文档
我的设置:我使用的是一个便宜的Hikvision 2032 IP相机,它被设置为IP 192.168.1.199。其主流(H264)是:
(它在VLC中工作得很好)
正如有人告诉我的,its在当前的稳定版本(3.2.12)中不支持H264。但是最新的开发人员构建具有一定的集成性,并且有一个对其进行优化的分支。
但是,安装这些构建是非常复杂的,我试图在下面的帖子中收集我逐步获得的提示:
编辑:在这个阶段,我下载了Git版本MrDave推荐我在下面,我认为我有所有的依赖。在遵循我收集的指令中的步骤之后,它最终以1080x720分辨率工作。
在使用1920x1080时,我在将文件保存到图像文件夹时遇到了问题:
nuc@nuc:/usr/local/etc$ motion
[0] [NTC] [ALL] conf_load: Processing thread 0 - config file /usr/local/etc/motion.conf
[0] [ALR] [ALL] conf_cmdparse: Unknown config option "sdl_threadnr"
[0] [NTC] [ALL] motion_startup: Motion trunkREVUNKNOWN Started
[0] [NTC] [ALL] motion_startup: Logging to syslog
[0] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC)
[0] [NTC] [ENC] ffmpeg_init: ffmpeg LIBAVCODEC_BUILD 3562596 LIBAVFORMAT_BUILD 3555176
[0] [NTC] [ALL] main: Thread 1 is from /usr/local/etc/motion.conf
[0] [NTC] [ALL] main: Thread 1 is device: rtsp://192.168.1.199:554/ISAPI/streaming/channels/101?auth=YWRtaW46MTIzNDU= input -1
[0] [NTC] [ALL] main: Stream port 8081
[0] [NTC] [ALL] main: Waiting for threads to finish, pid: 9028
[1] [NTC] [ALL] motion_init: Thread 1 started , motion detection Enabled
[1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://192.168.1.199:554/ISAPI/streaming/channels/101?auth=YWRtaW46MTIzNDU=)
[0] [NTC] [STR] httpd_run: motion-httpd testing : IPV4 addr: 127.0.0.1 port: 8080
[0] [NTC] [STR] httpd_run: motion-httpd Bound : IPV4 addr: 127.0.0.1 port: 8080
[0] [NTC] [STR] httpd_run: motion-httpd/trunkREVUNKNOWN running, accepting connections
[0] [NTC] [STR] httpd_run: motion-httpd: waiting for data on 127.0.0.1 port TCP 8080
[1] [NTC] [NET] netcam_rtsp_open_context: Using tcp transport
[1] [NTC] [NET] netcam_connect_rtsp: Camera connected
[1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items
[1] [ALR] [NET] netcam_handler_loop: Camera handler thread [2] started
[1] [NTC] [STR] http_bindsock: motion-stream testing : IPV4 addr: 127.0.0.1 port: 8081
[1] [NTC] [STR] http_bindsock: motion-stream Bound : IPV4 addr: 127.0.0.1 port: 8081
[1] [NTC] [ALL] motion_init: Started motion-stream server in port 8081 auth Disabled
Memoryaccesserror (core image written).avi和jpg在完全分辨率是空的或没有可用的,如果我试图打开。
发布于 2014-08-27 07:09:12
为了获得rtsp和H264支持,您需要从源代码构建应用程序。源的主版本位于https://github.com/sackmotion。然而,有许多分叉的这个来源,实现各种功能,包括RTSP/H 264。如果您查看git中的图形/网络选项卡,您可以看到这些版本,并确定哪个最适合您的情况。如果您不熟悉从源代码构建,可以在安装文件中的以下https://github.com/Mr-Dave/motion中找到编译和生成运动的基本说明。这些指示已经用12.04进行了验证,但可能需要稍作修改才能使用14.04。
请注意,对于您引用的摄像机,您引用的命令行可能不正确。我为这个相机观察到的格式是rtsp://user:pwd@ipaddress:554/streaming/channels/1 (用于主流)或rtsp://user:pwd@ipaddress:554/streaming/channels/2 (用于次流)。在设置运行中的摄像机之前,您应该使用VLC或avplay验证连接字符串。一旦确认在任何一个应用程序中都可以工作,您就可以将连接字符串直接复制到motion.conf文件中,作为netcam。
最后,如果要为这台相机节省CPU资源,最好设置运动以监视较小的SD次级流,并使用配置选项触发外部录制应用程序,以便在发生运动时以本机格式记录主HD流。
https://askubuntu.com/questions/514828
复制相似问题