linkkf 로직수정중
This commit is contained in:
@@ -116,7 +116,11 @@ class SupportFfmpeg(object):
|
||||
header_count = 0
|
||||
if self.proxy is None:
|
||||
if self.headers is None:
|
||||
command = [self.__ffmpeg_path, '-y', '-i', self.url, '-c', 'copy', '-bsf:a', 'aac_adtstoasc']
|
||||
if platform.system() == 'Windows':
|
||||
command = [self.__ffmpeg_path, '-y', '-i', f'"{self.url}"', '-c', 'copy', '-bsf:a', 'aac_adtstoasc']
|
||||
else:
|
||||
command = [self.__ffmpeg_path, '-y', '-i', self.url, '-c', 'copy', '-bsf:a', 'aac_adtstoasc']
|
||||
|
||||
else:
|
||||
headers_command = []
|
||||
tmp = ""
|
||||
@@ -136,9 +140,15 @@ class SupportFfmpeg(object):
|
||||
if len(tmp) > 0:
|
||||
headers_command.append('-headers')
|
||||
headers_command.append(f'{tmp}')
|
||||
command = [self.__ffmpeg_path, '-y'] + headers_command + ['-i', self.url, '-c', 'copy', '-bsf:a', 'aac_adtstoasc']
|
||||
if platform.system() == 'Windows':
|
||||
command = [self.__ffmpeg_path, '-y'] + headers_command + ['-i', f'"{self.url}"', '-c', 'copy', '-bsf:a', 'aac_adtstoasc']
|
||||
else:
|
||||
command = [self.__ffmpeg_path, '-y'] + headers_command + ['-i', self.url, '-c', 'copy', '-bsf:a', 'aac_adtstoasc']
|
||||
else:
|
||||
command = [self.__ffmpeg_path, '-y', '-http_proxy', self.proxy, '-i', self.url, '-c', 'copy', '-bsf:a', 'aac_adtstoasc']
|
||||
if platform.system() == 'Windows':
|
||||
command = [self.__ffmpeg_path, '-y', '-http_proxy', self.proxy, '-i', f'"{self.url}"', '-c', 'copy', '-bsf:a', 'aac_adtstoasc']
|
||||
else:
|
||||
command = [self.__ffmpeg_path, '-y', '-http_proxy', self.proxy, '-i', self.url, '-c', 'copy', '-bsf:a', 'aac_adtstoasc']
|
||||
|
||||
|
||||
if platform.system() == 'Windows':
|
||||
@@ -159,7 +169,7 @@ class SupportFfmpeg(object):
|
||||
return
|
||||
except:
|
||||
pass
|
||||
#logger.error(' '.join(command))
|
||||
logger.error(' '.join(command))
|
||||
command = SupportSubprocess.command_for_windows(command)
|
||||
|
||||
if platform.system() == 'Windows' and header_count > 1:
|
||||
@@ -216,8 +226,8 @@ SET CRLF=^
|
||||
else:
|
||||
if os.path.exists(self.temp_fullpath):
|
||||
os.remove(self.temp_fullpath)
|
||||
except Exception as exception:
|
||||
logger.error('Exception:%s', exception)
|
||||
except Exception as e:
|
||||
logger.error(f"Exception:{str(e)}")
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
arg = {'type':'last', 'status':self.status, 'data' : self.get_data()}
|
||||
@@ -347,6 +357,7 @@ SET CRLF=^
|
||||
return data
|
||||
|
||||
def send_to_listener(self, **arg):
|
||||
print(arg)
|
||||
if self.total_callback_function != None:
|
||||
self.total_callback_function(**arg)
|
||||
if self.callback_function is not None and self.callback_function != self.total_callback_function:
|
||||
|
||||
Reference in New Issue
Block a user