From 1fd8104a83b129c3ed056a1904a6193566b8f46c Mon Sep 17 00:00:00 2001 From: JDierkse Date: Fri, 8 May 2020 16:38:41 +0200 Subject: [PATCH] Add WatchBot Video Recording --- Recorder/WatchBotRecorder.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Recorder/WatchBotRecorder.cpp b/Recorder/WatchBotRecorder.cpp index 713d62a..1764d86 100644 --- a/Recorder/WatchBotRecorder.cpp +++ b/Recorder/WatchBotRecorder.cpp @@ -48,23 +48,21 @@ std::string WatchBotRecorder::Snapshot(ctpl::thread_pool* pThreadPool) std::string WatchBotRecorder::Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) { Logging::Log(Logging::Severity::Debug, "WatchBotRecorder Video"); -/* + std::stringstream url; - url << "http://" << m_settings.IpAddress << ":" << m_settings.Port << "/videostream.asf?user=" << m_settings.Username << "&pwd=" << m_settings.Password << "&resolution=64&rate=0"; + url << "http://" << m_settings.IpAddress << ":" << m_settings.Port << "/videostream.asf?user=" << m_settings.Username << "&pwd=" << m_settings.Password; std::stringstream fileName; fileName << m_settings.Path << "/" << m_settings.IpAddress << "/" << GetDateTimeString() << ".mp4"; std::stringstream command; - command << "ffmpeg -i \"" << url.str() << "\" -t 30 -c:v copy -c:a aac -b:a 8k -strict experimental " << fileName.str() << " > /dev/null 2>&1"; + command << ffmpeg << " -i \"" << url.str() << "\" -t 30 -c:v copy -c:a aac -strict experimental " << fileName.str() << " > /dev/null 2>&1"; std::string cmd(command.str()); Logging::Log(Logging::Severity::Debug, cmd); pThreadPool->push( [cmd](int) { int retval = std::system(cmd.c_str()); } ); return fileName.str(); -*/ - return std::string(); } } // namespace Recorder