|
|
@@ -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
|