Skip to content

Commit

Permalink
Update ts_download_v6.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fulln authored Aug 27, 2020
1 parent c0ecebd commit bfbfbc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hls/ts_download_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def assemble_mp4(path,parentPath,resName):
else:
#使用ffmpeg将ts合并为mp4
# command = 'ffmpeg -i "concat:%s" -acodec copy -vcodec copy -absf aac_adtstoasc %s'% (input_file,output_file)
command = r'ffmpeg -i %s\%s.m3u8 %s' % (path,resName,videoPath)
# command = 'ffmpeg -y -f concat -i %s -crf 18 -ar 48000 -vcodec libx264 -c:a aac -r 25 -g 25 -keyint_min 25 -strict -2 %s' % (concatfile, path)
command = "ffmpeg -allowed_extensions ALL -protocol_whitelist \"file,http,crypto,tcp\" "
command += ' -y -i %s\%s.m3u8 -bsf:a aac_adtstoasc -c copy %s' % (path,resName,videoPath)
#指行命令
os.system(command)
print(r"执行完成,视屏文件%s已经生成" % (videoPath))
Expand Down

0 comments on commit bfbfbc3

Please sign in to comment.