Changeset c269ecd868906465fe97d80f39bbebb7f045efec
- Timestamp:
- 11/02/07 22:10:07
(1 year ago)
- Author:
- Jason Michalski <armooo@armooo.net>
- git-committer:
- Jason Michalski <armooo@armooo.net> 1194059407 +0000
- git-parent:
[17cdf2c9c1109255cbf69c7adf09760c8280ab6b]
- git-author:
- Jason Michalski <armooo@armooo.net> 1194059407 +0000
- Message:
Maxbit fix
You can now set a max bit rate and buff size.
Should fix the HD > 17M bitrate problems
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r17cdf2c |
rc269ecd |
|
| 89 | 89 | return '4096K' |
|---|
| 90 | 90 | |
|---|
| | 91 | def getMaxVideoBR(): |
|---|
| | 92 | try: |
|---|
| | 93 | return config.get('Server', 'max_video_br') |
|---|
| | 94 | except NoOptionError: #default to 17M |
|---|
| | 95 | return '17M' |
|---|
| | 96 | |
|---|
| | 97 | def getBuffSize(): |
|---|
| | 98 | try: |
|---|
| | 99 | return config.get('Server', 'bufsize') |
|---|
| | 100 | except NoOptionError: #default 1024k |
|---|
| | 101 | return '1024k' |
|---|
| | 102 | |
|---|
| r915194e |
rc269ecd |
|
| 10 | 10 | AUDIO_BR = Config.getAudioBR() |
|---|
| 11 | 11 | VIDEO_BR = Config.getVideoBR() |
|---|
| | 12 | MAX_VIDEO_BR = Config.getMaxVideoBR() |
|---|
| | 13 | BUFF_SIZE = Config.getBuffSize() |
|---|
| | 14 | |
|---|
| 12 | 15 | FFMPEG = Config.get('Server', 'ffmpeg') |
|---|
| 13 | 16 | |
|---|
| … | … | |
| 46 | 49 | |
|---|
| 47 | 50 | def transcode(inFile, outFile, tsn=''): |
|---|
| 48 | | cmd = [FFMPEG, '-i', inFile, '-vcodec', 'mpeg2video', '-r', '29.97', '-b', VIDEO_BR] + select_aspect(inFile, tsn) + ['-comment', 'pyTivo.py', '-ac', '2', '-ab', AUDIO_BR,'-ar', '44100', '-f', 'vob', '-' ] |
|---|
| | 51 | cmd = [ FFMPEG, |
|---|
| | 52 | '-i', inFile, |
|---|
| | 53 | '-vcodec', 'mpeg2video', |
|---|
| | 54 | '-r', '29.97', |
|---|
| | 55 | '-b', VIDEO_BR, |
|---|
| | 56 | '-maxrate', MAX_VIDEO_BR, |
|---|
| | 57 | '-bufsize', BUFF_SIZE |
|---|
| | 58 | ] + select_aspect(inFile, tsn) + [ |
|---|
| | 59 | '-comment', 'pyTivo.py', |
|---|
| | 60 | '-ac', '2', |
|---|
| | 61 | '-ab', AUDIO_BR, |
|---|
| | 62 | '-ar', '44100', |
|---|
| | 63 | '-f', 'vob', |
|---|
| | 64 | '-' ] |
|---|
| | 65 | |
|---|
| 49 | 66 | debug_write(['transcode: ffmpeg command is ', ''.join(cmd), '\n']) |
|---|
| 50 | 67 | ffmpeg = subprocess.Popen(cmd, stdout=subprocess.PIPE) |
|---|