sh 记录Foscam IP摄像机实时馈送

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 记录Foscam IP摄像机实时馈送相关的知识,希望对你有一定的参考价值。

#!/bin/bash
# recordCam.sh
# ------------
# This script saves the live video from the Foscam IP camera to a full-quality mp4 file.
# I chose to split the files every 15 minutes (900 seconds), to quickly find the time I need.
# Note: audio is not saved as my cameras don't have a microphone connected to them.
# -----------
# Author: @LucaTNT
# License: BSD

# Uncomment this line if you're having trouble with zero-sized files (tipically happens on low end cameras), thanks Eric! (https://lucatnt.com/2014/08/record-and-archive-video-from-ip-cameras/#comment-48019)
# killall -INT ffmpeg

# The file name. I use the date to make finding files easier.
name="`date +%Y-%m-%d_%H.%M`"

# Where the videos will be saved
BASEpath='/path/to/surveillance/folder'
RECpath=$BASEpath'/video'

# Save the streams using ffmpeg at 30 fps, stopping the capture after 900 seconds (15 minutes). Add more lines if you have more than 2 cameras
ffmpeg -i rtsp://username:password@192.168.1.201:80/videoMain -r 30  -vcodec copy -an -t 900 $RECpath/cam01/$name.mp4 </dev/null >/dev/null 2>/tmp/cam01.log &
ffmpeg -i rtsp://username:password@192.168.1.202:80/videoMain -r 30  -vcodec copy -an -t 900 $RECpath/cam02/$name.mp4 </dev/null >/dev/null 2>/tmp/cam02.log &

以上是关于sh 记录Foscam IP摄像机实时馈送的主要内容,如果未能解决你的问题,请参考以下文章

在 iPhone 上处理 GPU(金属)和 CPU(OpenCV)上的摄像头馈送数据

在 ARSCNView 中禁用实时摄像机源?

基于 OpenCV 的网络实时视频流传输

如何将 Vignette CIFilter 应用于 iOS 中的实时摄像机源?

OpenCV 从摄像头裁剪实时提要

来自 Foscam FI9805W 的 Java openCV 3.0 VideoCapture rtsp 流