From c6bfa47128968b95aacd7d9e14fea42b422fdf63 Mon Sep 17 00:00:00 2001 From: wgw Date: Fri, 1 Feb 2008 15:56:09 -0600 Subject: [PATCH] audiocodec flow descriptions --- plugins/video/transcode.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/video/transcode.py b/plugins/video/transcode.py index 167b589..7cfe0d1 100644 --- a/plugins/video/transcode.py +++ b/plugins/video/transcode.py @@ -64,18 +64,21 @@ def transcode(inFile, outFile, tsn=''): kill(ffmpeg.pid) def select_audiocodec(inFile, tsn = ''): - #check for HD tivo and return compatible audio parameters type, width, height, fps, millisecs, kbps, akbps, acodec = video_info(inFile) + # Default, compatible with all TiVo's codec = '-acodec mp2 -ac 2 -ar 44100' if tsn and tsn[:3] in config.getHDtivos(): + # Is HD Tivo, use ac3 codec = '-acodec ac3 -ar 48000' if acodec == 'liba52': if (not akbps == None and int(akbps) <= config.getMaxAudioBR(tsn)) or \ (inFile[-4:]).lower() == '.mkv': + # compatible codec and bitrate, do not reencode audio codec = '-acodec copy' if acodec == 'mp2': if (not akbps == None and int(akbps) <= config.getMaxAudioBR(tsn)) or \ (inFile[-4:]).lower() == '.mkv': + # compatible codec and bitrate, do not reencode audio codec = '-acodec copy' return codec -- 2.11.4.GIT