[FFmpeg] Change arguments to record M3U

This commit is contained in:
David Zhuang 2016-06-29 23:15:28 -04:00
parent 2d542c2cd3
commit fd93b0380d

View File

@ -219,16 +219,18 @@ def ffmpeg_download_stream(files, title, ext, params={}, output_dir='.'):
ffmpeg_params.append(v)
print('Downloading streaming content with FFmpeg, press Ctrl+C to stop recording...')
ffmpeg_params = [FFMPEG] + LOGLEVEL + ['-y', '-i']
ffmpeg_params = [FFMPEG] + ['-y', '-i']
ffmpeg_params.append(files) #not the same here!!!!
if FFMPEG == 'avconv': #who cares?
ffmpeg_params += ['-c', 'copy', output]
else:
ffmpeg_params += ['-c', 'copy', '-bsf:a', 'aac_adtstoasc', '-bsf:v', 'h264_mp4toannexb', output]
ffmpeg_params += ['-c', 'copy', '-bsf:a', 'aac_adtstoasc']
ffmpeg_params.append(output)
print(' '.join(ffmpeg_params))
subprocess.call(ffmpeg_params)
return True
@ -252,7 +254,7 @@ def ffmpeg_play_stream(player, url, params={}):
if FFMPEG == 'avconv': #who cares?
ffmpeg_params += ['-c', 'copy', '|']
else:
ffmpeg_params += ['-c', 'copy', '-bsf:a', 'aac_adtstoasc', '-bsf:v', 'h264_mp4toannexb', '|']
ffmpeg_params += ['-c', 'copy', '-bsf:a', 'aac_adtstoasc', '|']
ffmpeg_params += [player, '-']