|
@@ -329,8 +329,13 @@ class oa2RtspStartView(TemplateView):
|
|
|
#触发此方法,让摄像头推流到MSG流地址
|
|
|
def runSendRtspMsg(self, UID, PWD, MSG):
|
|
|
# return True
|
|
|
+ logger = logging.getLogger('django')
|
|
|
+ logger.info('开始打印------------摄像头推流到MSG流地址的结果---------------')
|
|
|
+
|
|
|
command = "./pushtool {UID} {PWD} {MSG} 1".format(UID=UID, PWD=PWD, MSG=MSG)
|
|
|
- print('command=>{command}'.format(command=command))
|
|
|
+ # print('command=>{command}'.format(command=command))
|
|
|
+ logger.info('command=>{command}'.format(command=command))
|
|
|
+
|
|
|
try:
|
|
|
back = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE). \
|
|
|
communicate(timeout=10)
|
|
@@ -340,8 +345,6 @@ class oa2RtspStartView(TemplateView):
|
|
|
print("back0----", back[0].decode()) # 注意需要进行解码操作,默认输出的是字节
|
|
|
print("back1----", back[1].decode()) # back是一个元祖,可以通过元祖取值的方式获取结果
|
|
|
|
|
|
- logger = logging.getLogger('django')
|
|
|
- logger.info('开始打印------------摄像头推流到MSG流地址的结果---------------')
|
|
|
logger.info(UID)
|
|
|
logger.info(back[0].decode())
|
|
|
logger.info(back[1].decode())
|