Changeset 22c71e076b9374066aebe1a63e75ee594dab4ea1
- Timestamp:
- 03/09/07 01:59:59
(2 years ago)
- Author:
- KRKeegan <KRKeegan>
- git-committer:
- KRKeegan <KRKeegan> 1173427199 +0000
- git-parent:
[07acc27cef1dccd68e3645a634331d9f6bfc56df]
- git-author:
- KRKeegan <KRKeegan> 1173427199 +0000
- Message:
- Added dlfl's mod to allow for transferring of ".tivo" files
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r46c8bdb |
r22c71e0 |
|
| 108 | 108 | #print type, width, height, fps, millisecs |
|---|
| 109 | 109 | |
|---|
| | 110 | if (inFile[-5:]).lower() == '.tivo': |
|---|
| | 111 | return True |
|---|
| | 112 | |
|---|
| 110 | 113 | if not type == 'mpeg2video': |
|---|
| 111 | 114 | #print 'Not Tivo Codec' |
|---|
| … | … | |
| 124 | 127 | |
|---|
| 125 | 128 | def video_info(inFile): |
|---|
| | 129 | if (inFile[-5:]).lower() == '.tivo': |
|---|
| | 130 | return True, True, True, True, True |
|---|
| 126 | 131 | cmd = [FFMPEG, '-i', inFile ] |
|---|
| 127 | 132 | ffmpeg = subprocess.Popen(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE, stdin=subprocess.PIPE) |
|---|
| … | … | |
| 135 | 140 | codec = x.group(1) |
|---|
| 136 | 141 | else: |
|---|
| 137 | | return None, None, None, None, None, None |
|---|
| | 142 | return None, None, None, None, None |
|---|
| 138 | 143 | |
|---|
| 139 | 144 | rezre = re.compile(r'.*Video: .+, (\d+)x(\d+),.*') |
|---|
| … | … | |
| 143 | 148 | height = int(x.group(2)) |
|---|
| 144 | 149 | else: |
|---|
| 145 | | return None, None, None, None, None, None |
|---|
| | 150 | return None, None, None, None, None |
|---|
| 146 | 151 | |
|---|
| 147 | 152 | rezre = re.compile(r'.*Video: .+, (.+) fps.*') |
|---|
| … | … | |
| 150 | 155 | fps = x.group(1) |
|---|
| 151 | 156 | else: |
|---|
| 152 | | return None, None, None, None, None, None |
|---|
| | 157 | return None, None, None, None, None |
|---|
| 153 | 158 | |
|---|
| 154 | 159 | millisecs = ((int(d.group(1))*3600) + (int(d.group(2))*60) + int(d.group(3)))*1000 + (int(d.group(4))*100) |
|---|