diff --git a/tests/videodinges/unit/models/test_get_short_name_of_transcoding_type.py b/tests/videodinges/unit/models/test_get_short_name_of_transcoding_type.py
index fea697d..1831ae4 100644
--- a/tests/videodinges/unit/models/test_get_short_name_of_transcoding_type.py
+++ b/tests/videodinges/unit/models/test_get_short_name_of_transcoding_type.py
@@ -8,5 +8,6 @@ class GetShortNameOfTranscodingTypeTestCase(SimpleTestCase):
self.assertEqual(result, 'vp8')
def test_gets_transcoding_by_transcoding_object(self):
- result = get_short_name_of_transcoding_type(TranscodingType(name='Looooong naaaaame', short_name='shrt nm'))
- self.assertEqual(result, 'shrt nm')
\ No newline at end of file
+ result = get_short_name_of_transcoding_type(TranscodingType(name='Looooong naaaaame', short_name='shrt nm',
+ description='Some Description'))
+ self.assertEqual(result, 'shrt nm')
diff --git a/tests/videodinges/views/test_video.py b/tests/videodinges/views/test_video.py
index aef91b8..b5dedb8 100644
--- a/tests/videodinges/views/test_video.py
+++ b/tests/videodinges/views/test_video.py
@@ -24,7 +24,7 @@ class VideoTestCase(UploadMixin, TestCase):
models.Transcoding,
video=video,
quality='480p',
- type='video/webm',
+ type='video/webm; codecs="vp9, opus"',
url='http://480p.webm',
)
transcoding2 = factories.create(
@@ -38,7 +38,7 @@ class VideoTestCase(UploadMixin, TestCase):
models.Transcoding,
video=video,
quality='720p',
- type='video/webm',
+ type='video/webm; codecs="vp9, opus"',
url='http://720p.webm',
)
transcoding4 = factories.create(
@@ -60,8 +60,8 @@ class VideoTestCase(UploadMixin, TestCase):
self.assertInHTML(
"""""",
content,
)
@@ -96,7 +96,7 @@ class VideoTestCase(UploadMixin, TestCase):
models.Transcoding,
video=video,
quality='480p',
- type='video/webm',
+ type='video/webm; codecs="vp8, vorbis"',
url='http://480p.webm',
)
transcoding2 = factories.create(
@@ -110,7 +110,7 @@ class VideoTestCase(UploadMixin, TestCase):
models.Transcoding,
video=video,
quality='720p',
- type='video/webm',
+ type='video/webm; codecs="vp8, vorbis"',
url='http://720p.webm',
)
transcoding4 = factories.create(
@@ -130,7 +130,7 @@ class VideoTestCase(UploadMixin, TestCase):
self.assertInHTML(
"""""",
content,
@@ -156,7 +156,7 @@ class VideoTestCase(UploadMixin, TestCase):
models.Transcoding,
video=video,
quality='480p',
- type='video/webm',
+ type='video/webm; codecs="vp8, vorbis"',
url='http://480p.webm',
)
transcoding2 = factories.create(
@@ -170,7 +170,7 @@ class VideoTestCase(UploadMixin, TestCase):
models.Transcoding,
video=video,
quality='720p',
- type='video/webm',
+ type='video/webm; codecs="vp8, vorbis"',
url='http://720p.webm',
)
transcoding4 = factories.create(
@@ -191,7 +191,7 @@ class VideoTestCase(UploadMixin, TestCase):
self.assertInHTML(
"""""",
content,
@@ -221,7 +221,7 @@ class VideoTestCase(UploadMixin, TestCase):
models.Transcoding,
video=video,
quality='480p',
- type='video/webm',
+ type='video/webm; codecs="vp8, vorbis"',
upload=movie,
)
@@ -234,7 +234,7 @@ class VideoTestCase(UploadMixin, TestCase):
self.assertInHTML(
"""""".format(url=movie.file.url, image=image.file.url),
content,
diff --git a/videodinges/models.py b/videodinges/models.py
index 8012c9a..2a93f14 100644
--- a/videodinges/models.py
+++ b/videodinges/models.py
@@ -15,6 +15,7 @@ class Quality(NamedTuple):
class TranscodingType(NamedTuple):
name: str
short_name: str
+ description: str
def __str__(self):
return self.name
@@ -27,11 +28,12 @@ qualities = (
)
transcoding_types = (
- TranscodingType(name='video/webm', short_name='vp8'),
- TranscodingType(name='video/webm; codecs="vp8, vorbis"', short_name='vp8'),
- TranscodingType(name='video/webm; codecs="vp9, opus"', short_name='vp9'),
- TranscodingType(name='video/mp4', short_name='h.264'),
- TranscodingType(name='video/mp4; codecs="avc1.64001f,mp4a.40.2"', short_name='h.264'),
+ TranscodingType(name='video/webm', short_name='webm', description='Generic WebM'),
+ TranscodingType(name='video/webm; codecs="vp8, vorbis"', short_name='vp8', description='WebM with VP8 and Vorbis'),
+ TranscodingType(name='video/webm; codecs="vp9, opus"', short_name='vp9', description='WebM with VP9 and Opus'),
+ TranscodingType(name='video/mp4', short_name='h.264', description='Generic MP4 with H.264'),
+ TranscodingType(name='video/mp4; codecs="avc1.64001f,mp4a.40.2"', short_name='h.264',
+ description='MP4 with H.264 (AVC1 profile High, Level 3.1) and AAC-LC'),
)
class Upload(models.Model):
@@ -112,4 +114,4 @@ def get_short_name_of_transcoding_type(transcoding_type: Union[str, TranscodingT
transcoding_type = type_
if isinstance(transcoding_type, TranscodingType):
- return transcoding_type.short_name
\ No newline at end of file
+ return transcoding_type.short_name