Changeset 6009411f575aa843b8e92316e376fe90d1479f15

Show
Ignore:
Timestamp:
02/25/08 18:53:46 (11 months ago)
Author:
KRKeegan <-NOSPAM-kevin@krkeegan.com>
git-committer:
KRKeegan <-NOSPAM-kevin@krkeegan.com> 1203987226 -0800
git-parent:

[9776082563bed7f4e5c92ed1cb75c7427fe97dfd]

git-author:
KRKeegan <-NOSPAM-kevin@krkeegan.com> 1203987226 -0800
Message:

Convert transcode.py to respect config.py reset

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/video/transcode.py

    r6b0c52d r6009411  
    44info_cache = lrucache.LRUCache(1000) 
    55 
    6 debug = config.getDebug() 
    7 BUFF_SIZE = config.getBuffSize(
    8 FFMPEG = config.get('Server', 'ffmpeg') 
     6def ffmpeg_path(): 
     7    return config.get('Server', 'ffmpeg'
     8 
    99videotest = os.path.join(os.path.dirname(__file__), 'videotest.mpg') 
    1010 
    1111def debug_write(data): 
    12     if debug
     12    if config.getDebug()
    1313        debug_out = [] 
    1414        for x in data: 
     
    5050    settings['video_br'] = config.getVideoBR(tsn) 
    5151    settings['max_video_br'] = config.getMaxVideoBR() 
    52     settings['buff_size'] = BUFF_SIZE 
     52    settings['buff_size'] = config.getBuffSize() 
    5353    settings['aspect_ratio'] = ' '.join(select_aspect(inFile, tsn)) 
    5454 
    5555    cmd_string = config.getFFMPEGTemplate(tsn) % settings 
    5656 
    57     cmd = [FFMPEG, '-i', inFile] + cmd_string.split() 
     57    cmd = [ffmpeg_path(), '-i', inFile] + cmd_string.split() 
    5858    print cmd 
    5959    debug_write(['transcode: ffmpeg command is ', ' '.join(cmd), '\n']) 
     
    295295        return True, True, True, True, True, True, True, True, True 
    296296 
    297     cmd = [FFMPEG, '-i', inFile ]  
     297    cmd = [ffmpeg_path(), '-i', inFile ]  
    298298    ffmpeg = subprocess.Popen(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE, stdin=subprocess.PIPE) 
    299299 
     
    404404 
    405405def video_check(inFile, cmd_string): 
    406     cmd = [FFMPEG, '-i', inFile] + cmd_string.split() 
     406    cmd = [ffmpeg_path(), '-i', inFile] + cmd_string.split() 
    407407    ffmpeg = subprocess.Popen(cmd, stdout=subprocess.PIPE) 
    408408    try: