Changeset c269ecd868906465fe97d80f39bbebb7f045efec

Show
Ignore:
Timestamp:
11/02/07 22:10:07 (1 year ago)
Author:
Jason Michalski <armooo@armooo.net>
git-committer:
Jason Michalski <armooo@armooo.net> 1194059407 +0000
git-parent:

[17cdf2c9c1109255cbf69c7adf09760c8280ab6b]

git-author:
Jason Michalski <armooo@armooo.net> 1194059407 +0000
Message:

Maxbit fix

You can now set a max bit rate and buff size.
Should fix the HD > 17M bitrate problems

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Config.py

    r17cdf2c rc269ecd  
    8989        return '4096K' 
    9090 
     91def getMaxVideoBR(): 
     92    try: 
     93        return config.get('Server', 'max_video_br') 
     94    except NoOptionError: #default to 17M 
     95        return '17M' 
     96 
     97def getBuffSize(): 
     98    try: 
     99        return config.get('Server', 'bufsize') 
     100    except NoOptionError: #default 1024k 
     101        return '1024k' 
     102 
  • plugins/video/transcode.py

    r915194e rc269ecd  
    1010AUDIO_BR = Config.getAudioBR() 
    1111VIDEO_BR = Config.getVideoBR() 
     12MAX_VIDEO_BR = Config.getMaxVideoBR() 
     13BUFF_SIZE = Config.getBuffSize() 
     14 
    1215FFMPEG = Config.get('Server', 'ffmpeg') 
    1316 
     
    4649 
    4750def transcode(inFile, outFile, tsn=''): 
    48     cmd = [FFMPEG, '-i', inFile, '-vcodec', 'mpeg2video', '-r', '29.97', '-b', VIDEO_BR] + select_aspect(inFile, tsn) +  ['-comment', 'pyTivo.py', '-ac', '2', '-ab', AUDIO_BR,'-ar', '44100', '-f', 'vob', '-' ]    
     51    cmd = [ FFMPEG,  
     52            '-i', inFile,  
     53            '-vcodec', 'mpeg2video',  
     54            '-r', '29.97',  
     55            '-b', VIDEO_BR, 
     56            '-maxrate', MAX_VIDEO_BR, 
     57            '-bufsize', BUFF_SIZE 
     58          ] + select_aspect(inFile, tsn) + [ 
     59            '-comment', 'pyTivo.py',  
     60            '-ac', '2',  
     61            '-ab', AUDIO_BR, 
     62            '-ar', '44100',  
     63            '-f', 'vob',  
     64            '-' ] 
     65 
    4966    debug_write(['transcode: ffmpeg command is ', ''.join(cmd), '\n']) 
    5067    ffmpeg = subprocess.Popen(cmd, stdout=subprocess.PIPE)