提交 d45fb5d4 authored 作者: zw.wang's avatar zw.wang

feat: [recorder] 修改录制命令

上级 a8dbe4f1
......@@ -22,8 +22,10 @@ def record_thread(stream_url, out_file, thread_name='ffmpeg-log', protocol='rtmp
'ffmpeg',
'-y',
'-v', 'info',
'-rtbufsize', '1m',
'-rw_timeout', '20000000',
'-i', stream_url,
'-movflags', 'faststart+frag_keyframe', # 使mp4支持渐进式下载
'-c', 'copy',
'-f', 'mp4',
out_file
......
......@@ -24,7 +24,7 @@ requires = [
setuptools.setup(
name='isc-video-record',
version='1.0.0b12',
version='1.0.0b13',
description='ISC motion detection playback video stream recording service.',
long_description=long_description,
long_description_content_type='text/markdown',
......
......@@ -23,17 +23,16 @@ client = HikVisionClient(config.get('KEY'), config.get('SECRET'),
def main():
start_time = datetime(2021, 7, 1, 15, 58, 29).astimezone(tz)
start_time = datetime(2021, 7, 5, 14, 33, 56).astimezone(tz)
# start_time = datetime(2021, 5, 28, 9, 10, 59).astimezone(tz)
end_time = datetime(2021, 7, 1, 15, 59, 0).astimezone(tz)
camera_index = '5c8d0e1d572a4904a2c753ec24dfdf41'
end_time = datetime(2021, 7, 5, 14, 34, 15).astimezone(tz)
camera_index = '8f50e406cad6489fac443e034d29a66f'
results = []
try:
res = client.get_cameras_playback_urls(
camera_index,
client.iso_format(start_time), client.iso_format(end_time),
protocol='rtsp'
client.iso_format(start_time), client.iso_format(end_time)
)
results.extend(res)
except PlaybackUrlException as e:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论