diff options
author | Joar Wandborg <git@wandborg.com> | 2012-08-12 01:57:00 +0200 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2012-08-12 01:57:00 +0200 |
commit | 549000d9911938b88328e15196ff6b3b00fff740 (patch) | |
tree | c691a9134e5099a1728f32a50d5c9ed57584afe9 | |
parent | 089508d07b29eadefefb9851ad1b5b7292b8e9b2 (diff) | |
download | mediagoblin-549000d9911938b88328e15196ff6b3b00fff740.tar.lz mediagoblin-549000d9911938b88328e15196ff6b3b00fff740.tar.xz mediagoblin-549000d9911938b88328e15196ff6b3b00fff740.zip |
Audio support now creates OGG instead of WAV
While creating the spectrogram, and alternative version of the audio
file has been needed. Before this, it has been a WAV format file, the
issue with WAV is that it takes a lot of space. Starting with this it
will be an OGG file.
Rejoice :)
-rw-r--r-- | mediagoblin/media_types/audio/processing.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mediagoblin/media_types/audio/processing.py b/mediagoblin/media_types/audio/processing.py index 18edbf1a..fada083f 100644 --- a/mediagoblin/media_types/audio/processing.py +++ b/mediagoblin/media_types/audio/processing.py @@ -99,12 +99,13 @@ def process_audio(entry): original=os.path.splitext( queued_filepath[-1])[0])) - with tempfile.NamedTemporaryFile(suffix='.wav') as wav_tmp: - _log.info('Creating WAV source for spectrogram') + with tempfile.NamedTemporaryFile(suffix='.ogg') as wav_tmp: + _log.info('Creating OGG source for spectrogram') transcoder.transcode( queued_filename, wav_tmp.name, - mux_string='wavenc') + mux_string='vorbisenc quality={0} ! oggmux'.format( + audio_config['quality'])) thumbnailer = AudioThumbnailer() |