From fd93b0380d0c04c4766e520e53a6256437e39067 Mon Sep 17 00:00:00 2001 From: David Zhuang Date: Wed, 29 Jun 2016 23:15:28 -0400 Subject: [PATCH] [FFmpeg] Change arguments to record M3U --- src/you_get/processor/ffmpeg.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/you_get/processor/ffmpeg.py b/src/you_get/processor/ffmpeg.py index 1d5d850c..a387be0a 100644 --- a/src/you_get/processor/ffmpeg.py +++ b/src/you_get/processor/ffmpeg.py @@ -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, '-']