Browse Source

fix transcoding to mpeg2... Mpeg-2 can't store mp3 as audio, so

use mp2 for audio...  bump up the bit rate a bit too...  Looks like
the PS3 stores all the data before playing...  Need to add support
for caching the file to disk while it's going...  Looks like a copy
on the PS3 would work, just takes a while on the slow box I'm using..

[git-p4: depot-paths = "//depot/": change = 1110]
replace/b43bf02ddeddd088c0e6b94974ca1a46562eb3db
John-Mark Gurney 17 years ago
parent
commit
ca4a55615d
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      FSStorage.py

+ 6
- 5
FSStorage.py View File

@@ -148,17 +148,18 @@ class DynamTransfer(protocol.ProcessProtocol):
if request.method == 'HEAD':
return ''

audiomp3 = [ '-acodec', 'mp3', '-ab', '192', ]
audiomp2 = [ '-acodec', 'mp2', '-ab', '256', ]
optdict = {
'xvid': [ '-vcodec', 'xvid',
#'-mv4', '-gmc', '-g', '240',
'-f', 'avi', ],
'-f', 'avi', ] + audiomp3,
'mpeg2': [ '-vcodec', 'mpeg2video', #'-g', '60',
'-f', 'mpeg', ],
'-f', 'mpeg', ] + audiomp2,
}
audio = [ '-acodec', 'mp3', '-ab', '192', ]
args = [ 'ffmpeg', '-i', path, '-b', '8000',
args = [ 'ffmpeg', '-i', path, '-b', '4000',
#'-sc_threshold', '500000', '-b_strategy', '1', '-max_b_frames', '6',
] + optdict[vcodec] + audio + [ '-', ]
] + optdict[vcodec] + [ '-', ]
#log.msg(*[`i` for i in args])
self.proc = process.Process(reactor, ffmpeg_path, args,
None, None, self)


Loading…
Cancel
Save