Add WatchBot Video Recording

This commit is contained in:
2020-05-08 16:38:41 +02:00
parent e65400b335
commit 1fd8104a83
+3 -5
View File
@@ -48,23 +48,21 @@ std::string WatchBotRecorder::Snapshot(ctpl::thread_pool* pThreadPool)
std::string WatchBotRecorder::Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) std::string WatchBotRecorder::Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg)
{ {
Logging::Log(Logging::Severity::Debug, "WatchBotRecorder Video"); Logging::Log(Logging::Severity::Debug, "WatchBotRecorder Video");
/*
std::stringstream url; 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; std::stringstream fileName;
fileName << m_settings.Path << "/" << m_settings.IpAddress << "/" << GetDateTimeString() << ".mp4"; fileName << m_settings.Path << "/" << m_settings.IpAddress << "/" << GetDateTimeString() << ".mp4";
std::stringstream command; 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()); std::string cmd(command.str());
Logging::Log(Logging::Severity::Debug, cmd); Logging::Log(Logging::Severity::Debug, cmd);
pThreadPool->push( [cmd](int) { int retval = std::system(cmd.c_str()); } ); pThreadPool->push( [cmd](int) { int retval = std::system(cmd.c_str()); } );
return fileName.str(); return fileName.str();
*/
return std::string();
} }
} // namespace Recorder } // namespace Recorder