給定一個網路攝像頭 rtsp 播放取流地址:
rtsp://192.168.1.13:554/user=admin&password=&channel=1&stream=0.sdp
我們不像去研究它的sdk功能,因為不同的攝像頭不同,在集成相當多的sdk, 比如我們什么都不要,只要一個簡單的錄制功能
簡單的說就是取流后,保存錄像的功能,
這個時候 ffmpeg就滿足我們的要求,只要一個url就可以直接取流:
再用 nginx搭建一個點播服務器,錄制的視頻就可以點播了,是不是相當簡單,,,,
比如 某個時候我們只想保存某一特定的片段
來吧,上代碼 :
// XeXunRecordDlg.cpp : 實作檔案
//
#include "stdafx.h"
#include "XeXunRecord.h"
#include "XeXunRecordDlg.h"
#include "afxdialogex.h"
#include "CfgDlg.h"
#include "Profile.h"
#include "HtmlFile.h"
#include <tlhelp32.h>
#include "PrintHelp.h"
#define WM_EXPORT_MERGE_NOTIFY (WM_USER+100)
int CXeXunRecordDlg::OpenRtspStream(const char* url, AVFormatContext **ic)
{
AVDictionary* options = NULL;
int ret = -1;
av
CSDN認證博客專家
C/C++
vc/qt
音視頻
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/257723.html
標籤:其他
上一篇:win10亮度進度條不見了
