This commit is contained in:
Mr Chen 2019-01-23 20:50:04 +08:00
parent be5fc96998
commit ede5bab112
2 changed files with 4 additions and 7 deletions

View File

@ -23,8 +23,6 @@ Install_qbittorrent()
yum install -y ffmpeg
fi
pip install python-qbittorrent
echo '正在安装脚本文件...' > $install_tmp

View File

@ -106,13 +106,12 @@ class downloadBT(Thread):
def ffmpeg(self, file=''):
md5file = self.md5(file)
m3u8_dir = FILE_TO + '/m3u8/' + md5file
m3u8_dir = FILE_TO + '/m3u8/' + md5file[0:6]
os.system('mkdir -p ' + m3u8_dir)
m3u8_file = m3u8_dir + '/' + md5file + '.m3u8'
m3u8_file = m3u8_dir + '/' + md5file[0:6] + '.m3u8'
tofile = FILE_TO + '/m3u8/' + md5file + '/%03d.ts'
cmd = 'ffmpeg -i ' + file + \
' -c copy -map 0 -f segment -segment_list ' + \
tofile = FILE_TO + '/m3u8/' + md5file[0:6] + '/%03d.ts'
cmd = 'ffmpeg -i ' + file + ' -c copy -map 0 -f segment -segment_list ' + \
m3u8_file + ' -segment_time 5 ' + tofile
print cmd
print self.execShell(cmd)