Autodetect format when transcoding files
This commit is contained in:
parent
3e62f8b361
commit
7f42c1ad44
4 changed files with 24 additions and 3 deletions
|
|
@ -855,8 +855,7 @@ class Upload(models.Model):
|
|||
if not input:
|
||||
return
|
||||
|
||||
input_format = utils.MIMETYPE_TO_EXTENSION[self.mimetype]
|
||||
audio = pydub.AudioSegment.from_file(input, format=input_format)
|
||||
audio = pydub.AudioSegment.from_file(input)
|
||||
return audio
|
||||
|
||||
def save(self, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue