| 67 | | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq = video_info(inFile) |
|---|
| | 67 | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq, vpar = video_info(inFile) |
|---|
| 72 | | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq = video_info(videotest) |
|---|
| | 72 | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq, vpar = video_info(videotest) |
|---|
| 82 | | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq = video_info(inFile) |
|---|
| | 82 | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq, vpar = video_info(inFile) |
|---|
| 136 | | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq = video_info(inFile) |
|---|
| | 136 | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq, vpar = video_info(inFile) |
|---|
| 166 | | return [] #pass all resolutions to S3/HD, except heights greater than conf height |
|---|
| 167 | | # else, optres is enabled and resizes SD video to the "S2" standard on S3/HD. |
|---|
| | 166 | #pass all resolutions to S3, except heights greater than conf height |
|---|
| | 167 | if not vpar == None: |
|---|
| | 168 | # adjust for pixel aspect ratio, if set, because TiVo expects square pixels |
|---|
| | 169 | if vpar<1.0: |
|---|
| | 170 | return ['-s', str(width) + 'x' + str(int(math.ceil(height/vpar)))] |
|---|
| | 171 | elif vpar>1.0: |
|---|
| | 172 | # FFMPEG expects width to be a multiple of two |
|---|
| | 173 | return ['-s', str(int(math.ceil(width*vpar/2.0)*2)) + 'x' + str(height)] |
|---|
| | 174 | return [] |
|---|
| | 175 | # else, optres is enabled and resizes video to the "S2" standard. |
|---|
| 168 | 176 | elif (rwidth, rheight) in [(4, 3), (10, 11), (15, 11), (59, 54), (59, 72), (59, 36), (59, 54)]: |
|---|
| 169 | 177 | debug_write(__name__, fn_attr(), ['File is within 4:3 list.']) |
|---|
| 281 | | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq = video_info(inFile) |
|---|
| | 289 | type, width, height, fps, millisecs, kbps, akbps, acodec, afreq, vpar = video_info(inFile) |
|---|
| 342 | | info_cache[inFile] = (mtime, (True, True, True, True, True, True, True, True, True)) |
|---|
| | 350 | info_cache[inFile] = (mtime, (True, True, True, True, True, True, True, True, True, True)) |
|---|
| 344 | | return True, True, True, True, True, True, True, True, True |
|---|
| | 352 | return True, True, True, True, True, True, True, True, True, True |
|---|
| 357 | | info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None)) |
|---|
| 358 | | return None, None, None, None, None, None, None, None, None |
|---|
| | 365 | info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None, None)) |
|---|
| | 366 | return None, None, None, None, None, None, None, None, None, None |
|---|
| 368 | | info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None)) |
|---|
| | 376 | info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None, None)) |
|---|
| 370 | | return None, None, None, None, None, None, None, None, None |
|---|
| | 378 | return None, None, None, None, None, None, None, None, None, None |
|---|
| 378 | | info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None)) |
|---|
| | 386 | info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None, None)) |
|---|
| 380 | | return None, None, None, None, None, None, None, None, None |
|---|
| | 388 | return None, None, None, None, None, None, None, None, None, None |
|---|
| 387 | | info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None)) |
|---|
| | 395 | info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None, None)) |
|---|
| 389 | | return None, None, None, None, None, None, None, None, None |
|---|
| | 397 | return None, None, None, None, None, None, None, None, None, None |
|---|
| 450 | | info_cache[inFile] = (mtime, (codec, width, height, fps, millisecs, kbps, akbps, acodec, afreq)) |
|---|
| 451 | | debug_write(__name__, fn_attr(), ['Codec=', codec, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, ' kbps=', kbps, ' akbps=', akbps, ' acodec=', acodec, ' afreq=', afreq]) |
|---|
| 452 | | return codec, width, height, fps, millisecs, kbps, akbps, acodec, afreq |
|---|
| | 458 | #get par. |
|---|
| | 459 | rezre = re.compile(r'.*Video: .+PAR ([0-9]+):([0-9]+) DAR [0-9:]+.*') |
|---|
| | 460 | x = rezre.search(output) |
|---|
| | 461 | if x and x.group(1)!="0" and x.group(2)!="0": |
|---|
| | 462 | vpar = float(x.group(1))/float(x.group(2)) |
|---|
| | 463 | else: |
|---|
| | 464 | vpar = None |
|---|
| | 465 | |
|---|
| | 466 | info_cache[inFile] = (mtime, (codec, width, height, fps, millisecs, kbps, akbps, acodec, afreq, vpar)) |
|---|
| | 467 | debug_write(__name__, fn_attr(), ['Codec=', codec, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, ' kbps=', kbps, ' akbps=', akbps, ' acodec=', acodec, ' afreq=', afreq, ' par=', vpar]) |
|---|
| | 468 | return codec, width, height, fps, millisecs, kbps, akbps, acodec, afreq, vpar |
|---|