Changeset 9f34edfb6ed984322cc29e50c18ae0f9d0061744
- Timestamp:
- 02/03/08 09:21:40 (1 year ago)
- git-parent:
[4fab8f80c789835f562985b959bf62de32165194], [1fd7a5108a139eaf0789128034cd8cde662dfc25]
- Files:
-
- config.py (modified) (6 diffs)
- plugins/video/transcode.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
config.py
r19219d5 r1fd7a51 91 91 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 -' 92 92 93 def getHDtivos(): # tsn's of High Definition Tivo's 94 return ['648', '652'] 93 def getHDtivos(tsn): # tsn's of High Definition Tivo's 94 if tsn and tsn[:3] in ['648', '652']: 95 return True 96 return False 95 97 96 98 def getValidWidths(): … … 128 130 return nearestTivoHeight(height) 129 131 except NoOptionError: #defaults for S3/S2 TiVo 130 if tsn and tsn[:3] in getHDtivos():132 if getHDtivos(tsn): 131 133 return 720 132 134 else: … … 144 146 return nearestTivoWidth(width) 145 147 except NoOptionError: #defaults for S3/S2 TiVo 146 if tsn and tsn[:3] in getHDtivos():148 if getHDtivos(tsn): 147 149 return 1280 148 150 else: … … 162 164 return str(min(audiobr, getMaxAudioBR(tsn))) + 'k' 163 165 except NoOptionError: #defaults for S3/S2 TiVo 164 if tsn and tsn[:3] in getHDtivos():166 if getHDtivos(tsn): 165 167 return '384k' 166 168 else: … … 176 178 return config.get('Server', 'video_br') 177 179 except NoOptionError: #defaults for S3/S2 TiVo 178 if tsn and tsn[:3] in getHDtivos():180 if getHDtivos(tsn): 179 181 return '8192k' 180 182 else: … … 203 205 return int(int(strtod(config.get('Server', 'max_audio_br'))/1000)/64)*64 204 206 except NoOptionError: 205 if tsn and tsn[:3] in getHDtivos():207 if getHDtivos(tsn): 206 208 return int(448) #default to 448, max supported by HD TiVo's 207 209 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
