Changeset 6e2bdccfe6655be1c4887386a36a0ecc2eb3a519
- Timestamp:
- 11/02/07 22:10:27
(1 year ago)
- Author:
- Jason Michalski <armooo@armooo.net>
- git-committer:
- Jason Michalski <armooo@armooo.net> 1194059427 +0000
- git-parent:
[c269ecd868906465fe97d80f39bbebb7f045efec]
- git-author:
- Jason Michalski <armooo@armooo.net> 1194059427 +0000
- Message:
Per tivo audio video bitrates
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rc269ecd |
r6e2bdcc |
|
| 77 | 77 | return 544 |
|---|
| 78 | 78 | |
|---|
| 79 | | def getAudioBR(): |
|---|
| | 79 | def getAudioBR(tsn = None): |
|---|
| | 80 | if tsn and config.has_section('_tivo_' + tsn): |
|---|
| | 81 | try: |
|---|
| | 82 | return config.get('_tivo_' + tsn, 'audio_br') |
|---|
| | 83 | except NoOptionError: |
|---|
| | 84 | pass |
|---|
| | 85 | |
|---|
| 80 | 86 | try: |
|---|
| 81 | 87 | return config.get('Server', 'audio_br') |
|---|
| … | … | |
| 83 | 89 | return '192K' |
|---|
| 84 | 90 | |
|---|
| 85 | | def getVideoBR(): |
|---|
| | 91 | def getVideoBR(tsn = None): |
|---|
| | 92 | if tsn and config.has_section('_tivo_' + tsn): |
|---|
| | 93 | try: |
|---|
| | 94 | return config.get('_tivo_' + tsn, 'video_br') |
|---|
| | 95 | except NoOptionError: |
|---|
| | 96 | pass |
|---|
| | 97 | |
|---|
| 86 | 98 | try: |
|---|
| 87 | 99 | return config.get('Server', 'video_br') |
|---|
| rc269ecd |
r6e2bdcc |
|
| 8 | 8 | TIVO_WIDTH = Config.getTivoWidth() |
|---|
| 9 | 9 | TIVO_HEIGHT = Config.getTivoHeight() |
|---|
| 10 | | AUDIO_BR = Config.getAudioBR() |
|---|
| 11 | | VIDEO_BR = Config.getVideoBR() |
|---|
| 12 | 10 | MAX_VIDEO_BR = Config.getMaxVideoBR() |
|---|
| 13 | 11 | BUFF_SIZE = Config.getBuffSize() |
|---|
| … | … | |
| 49 | 47 | |
|---|
| 50 | 48 | def transcode(inFile, outFile, tsn=''): |
|---|
| | 49 | audio_br = Config.getAudioBR(tsn) |
|---|
| | 50 | video_br = Config.getVideoBR(tsn) |
|---|
| | 51 | |
|---|
| 51 | 52 | cmd = [ FFMPEG, |
|---|
| 52 | 53 | '-i', inFile, |
|---|
| 53 | 54 | '-vcodec', 'mpeg2video', |
|---|
| 54 | 55 | '-r', '29.97', |
|---|
| 55 | | '-b', VIDEO_BR, |
|---|
| | 56 | '-b', video_br, |
|---|
| 56 | 57 | '-maxrate', MAX_VIDEO_BR, |
|---|
| 57 | 58 | '-bufsize', BUFF_SIZE |
|---|
| … | … | |
| 59 | 60 | '-comment', 'pyTivo.py', |
|---|
| 60 | 61 | '-ac', '2', |
|---|
| 61 | | '-ab', AUDIO_BR, |
|---|
| | 62 | '-ab', audio_br, |
|---|
| 62 | 63 | '-ar', '44100', |
|---|
| 63 | 64 | '-f', 'vob', |
|---|
| r93b6782 |
r6e2bdcc |
|
| 6 | 6 | #For windows: ffmpeg=c:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe |
|---|
| 7 | 7 | #For linux: ffmpeg=/usr/bin/ffmpeg |
|---|
| 8 | | ffmpeg=c:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe |
|---|
| 9 | | #ffmpeg=/usr/bin/ffmpeg |
|---|
| | 8 | #ffmpeg=c:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe |
|---|
| | 9 | ffmpeg=/usr/bin/ffmpeg |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | #This will make a large debug.txt file in you base directory. It only debugs |
|---|
| … | … | |
| 31 | 31 | ##Per tivo options |
|---|
| 32 | 32 | # section named _tivo_TSN with the tsn in all caps |
|---|
| 33 | | #[_tivo_2400000DEADBEEF] |
|---|
| | 33 | [_tivo_00000DEADBEEF] |
|---|
| 34 | 34 | |
|---|
| 35 | 35 | #If you want to use 16:9 or 4:3 on this tivo |
|---|
| 36 | 36 | #aspect169=true |
|---|
| | 37 | |
|---|
| | 38 | #audio_br=320K |
|---|
| | 39 | #video_br=12Mi |
|---|
| 37 | 40 | |
|---|
| 38 | 41 | [MyMovies] |
|---|
| … | … | |
| 43 | 46 | #For windows: path=c:\videos |
|---|
| 44 | 47 | #For linux: path=/media |
|---|
| 45 | | path=/media/media/video |
|---|
| | 48 | path=/home/armooo/Videos |
|---|
| 46 | 49 | |
|---|
| 47 | 50 | |
|---|