diff --git a/wagtailvideos/models.py b/wagtailvideos/models.py index b4fc24e..9732b3d 100644 --- a/wagtailvideos/models.py +++ b/wagtailvideos/models.py @@ -173,7 +173,7 @@ def video_tag(self, attrs=None): transcodes = self.get_current_transcodes() sources = [] for transcode in transcodes: - sources.append("".format(transcode.url, transcode.media_format.name)) + sources.append("".format(transcode.url, transcode.media_format)) sources.append("" .format(self.url, self.content_type)) diff --git a/wagtailvideos/transcoders/ffmpeg/ffmpeg.py b/wagtailvideos/transcoders/ffmpeg/ffmpeg.py index 4d91c7d..17e8a0f 100644 --- a/wagtailvideos/transcoders/ffmpeg/ffmpeg.py +++ b/wagtailvideos/transcoders/ffmpeg/ffmpeg.py @@ -128,7 +128,7 @@ def run(self): output_dir = tempfile.mkdtemp() transcode_name = "{0}.{1}".format( - video.filename(include_ext=False), media_format.name + video.filename(include_ext=False), media_format ) output_file = os.path.join(output_dir, transcode_name)