Changeset 10fc438ed2ae7321f1d65c2e91e980c24ea29397

Show
Ignore:
Timestamp:
11/15/07 21:25:08 (1 year ago)
Author:
Jason Michalski <armooo@armooo.net>
git-committer:
Jason Michalski <armooo@armooo.net> 1195183508 +0000
git-parent:

[179402fc8314937e41ca6f971dfd38847c2d2059]

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

Patch from nick@cpanel.net

millisecs not found
files with space in the name

fixes #28
fixes #29

Files:

Legend:

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

    r179402f r10fc438  
    4949    settings['audio_br'] = Config.getAudioBR(tsn) 
    5050    settings['video_br'] = Config.getVideoBR(tsn) 
    51     settings['in_file'] = inFile 
    5251    settings['max_video_br'] = MAX_VIDEO_BR 
    5352    settings['buff_size'] = BUFF_SIZE 
     
    5655    cmd_string = Config.getFFMPEGTemplate(tsn) % settings 
    5756 
    58     cmd = [FFMPEG] + cmd_string.split() 
     57    cmd = [FFMPEG, '-i', inFile] + cmd_string.split() 
    5958 
    6059    debug_write(['transcode: ffmpeg command is ', ' '.join(cmd), '\n']) 
     
    252251    debug_write(['video_info: ffmpeg output=', output, '\n']) 
    253252 
    254     durre = re.compile(r'.*Duration: (.{2}):(.{2}):(.{2})\.(.),') 
    255     d = durre.search(output) 
    256  
    257253    rezre = re.compile(r'.*Video: ([^,]+),.*') 
    258254    x = rezre.search(output) 
     
    299295                fps = '29.97' 
    300296 
    301     millisecs = ((int(d.group(1))*3600) + (int(d.group(2))*60) + int(d.group(3)))*1000 + (int(d.group(4))*100) 
     297    durre = re.compile(r'.*Duration: (.{2}):(.{2}):(.{2})\.(.),') 
     298    d = durre.search(output) 
     299    if d: 
     300        millisecs = ((int(d.group(1))*3600) + (int(d.group(2))*60) + int(d.group(3)))*1000 + (int(d.group(4))*100) 
     301    else: 
     302        millisecs = 0 
     303 
    302304    info_cache[inFile] = (mtime, (codec, width, height, fps, millisecs)) 
    303305    debug_write(['video_info: Codec=', codec, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, '\n']) 
  • pyTivo.conf.dist

    r179402f r10fc438  
    2828#width=1440 
    2929#height=720 
    30 ffmpeg_prams=-i %(in_file)s -vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py -ac 2 -ab %(audio_br)s -ar 44100 -f vob - 
     30ffmpeg_prams=-vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py -ac 2 -ab %(audio_br)s -ar 44100 -f vob - 
    3131 
    3232##Per tivo options