Changeset 6379785af275a63402793579bba70323f0b2a8d7
- Timestamp:
- 02/03/08 09:28:46 (10 months ago)
- git-parent:
[fb9eabd78b86782b341a08f173278793d5598eb1], [1b2d64212d09600494663f5d247c1a06398f4352]
- Files:
-
- config.py (modified) (6 diffs)
- plugins/video/transcode.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
config.py
rfb9eabd r6379785 101 101 return '-vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py %(audio_codec)s -ab %(audio_br)s -f vob -' 102 102 103 def getHDtivos( ): # tsn's of High Definition Tivo's104 return ['648', '652']103 def getHDtivos(tsn): # tsn's of High Definition Tivo's 104 return tsn and tsn[:3] in ['648', '652'] 105 105 106 106 def getValidWidths(): … … 138 138 return nearestTivoHeight(height) 139 139 except NoOptionError: #defaults for S3/S2 TiVo 140 if tsn and tsn[:3] in getHDtivos():140 if getHDtivos(tsn): 141 141 return 720 142 142 else: … … 154 154 return nearestTivoWidth(width) 155 155 except NoOptionError: #defaults for S3/S2 TiVo 156 if tsn and tsn[:3] in getHDtivos():156 if getHDtivos(tsn): 157 157 return 1280 158 158 else: … … 172 172 return str(min(audiobr, getMaxAudioBR(tsn))) + 'k' 173 173 except NoOptionError: #defaults for S3/S2 TiVo 174 if tsn and tsn[:3] in getHDtivos():174 if getHDtivos(tsn): 175 175 return '384k' 176 176 else: … … 186 186 return config.get('Server', 'video_br') 187 187 except NoOptionError: #defaults for S3/S2 TiVo 188 if tsn and tsn[:3] in getHDtivos():188 if getHDtivos(tsn): 189 189 return '8192k' 190 190 else: … … 213 213 return int(int(strtod(config.get('Server', 'max_audio_br'))/1000)/64)*64 214 214 except NoOptionError: 215 if tsn and tsn[:3] in getHDtivos():215 if getHDtivos(tsn): 216 216 return int(448) #default to 448, max supported by HD TiVo's 217 217 else: plugins/video/transcode.py
r6fc56fd r1fd7a51 66 66 def select_audiocodec(tsn = ''): 67 67 #check for HD tivo and return compatible audio parameters 68 if tsn and tsn[:3] in config.getHDtivos():68 if config.getHDtivos(tsn): 69 69 return '-acodec ac3 -ar 48000' 70 70 else: … … 104 104 multiplier4by3 = (4.0 * TIVO_HEIGHT) / (3.0 * TIVO_WIDTH) 105 105 106 if tsn[:3] in config.getHDtivos() and height <= TIVO_HEIGHT and config.getOptres() == False:106 if config.getHDtivos(tsn) and height <= TIVO_HEIGHT and config.getOptres() == False: 107 107 return [] #pass all resolutions to S3/HD, except heights greater than conf height 108 108 # else, optres is enabled and resizes SD video to the "S2" standard on S3/HD. … … 244 244 return False 245 245 246 if tsn[:3] in config.getHDtivos():246 if config.getHDtivos(tsn): 247 247 debug_write(['tivo_compatible: ', inFile, ' you have a S3 skiping the rest of the tests', '\n']) 248 248 return True
