Changeset 10fc438ed2ae7321f1d65c2e91e980c24ea29397
- 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
| r179402f |
r10fc438 |
|
| 49 | 49 | settings['audio_br'] = Config.getAudioBR(tsn) |
|---|
| 50 | 50 | settings['video_br'] = Config.getVideoBR(tsn) |
|---|
| 51 | | settings['in_file'] = inFile |
|---|
| 52 | 51 | settings['max_video_br'] = MAX_VIDEO_BR |
|---|
| 53 | 52 | settings['buff_size'] = BUFF_SIZE |
|---|
| … | … | |
| 56 | 55 | cmd_string = Config.getFFMPEGTemplate(tsn) % settings |
|---|
| 57 | 56 | |
|---|
| 58 | | cmd = [FFMPEG] + cmd_string.split() |
|---|
| | 57 | cmd = [FFMPEG, '-i', inFile] + cmd_string.split() |
|---|
| 59 | 58 | |
|---|
| 60 | 59 | debug_write(['transcode: ffmpeg command is ', ' '.join(cmd), '\n']) |
|---|
| … | … | |
| 252 | 251 | debug_write(['video_info: ffmpeg output=', output, '\n']) |
|---|
| 253 | 252 | |
|---|
| 254 | | durre = re.compile(r'.*Duration: (.{2}):(.{2}):(.{2})\.(.),') |
|---|
| 255 | | d = durre.search(output) |
|---|
| 256 | | |
|---|
| 257 | 253 | rezre = re.compile(r'.*Video: ([^,]+),.*') |
|---|
| 258 | 254 | x = rezre.search(output) |
|---|
| … | … | |
| 299 | 295 | fps = '29.97' |
|---|
| 300 | 296 | |
|---|
| 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 | |
|---|
| 302 | 304 | info_cache[inFile] = (mtime, (codec, width, height, fps, millisecs)) |
|---|
| 303 | 305 | debug_write(['video_info: Codec=', codec, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, '\n']) |
|---|
| r179402f |
r10fc438 |
|
| 28 | 28 | #width=1440 |
|---|
| 29 | 29 | #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 - |
|---|
| | 30 | ffmpeg_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 - |
|---|
| 31 | 31 | |
|---|
| 32 | 32 | ##Per tivo options |
|---|