aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-03-06 12:05:40 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-03-06 12:05:40 -0600
commit7bf229267d97e536fe4c7c7d09764b90e89e36cd (patch)
treeafe06de323a22a1c885d772bc6a43ba3a5713ec5
parenta99321b9d9e26357b59f820b55b5f3073d8ed53b (diff)
downloadmediagoblin-7bf229267d97e536fe4c7c7d09764b90e89e36cd.tar.lz
mediagoblin-7bf229267d97e536fe4c7c7d09764b90e89e36cd.tar.xz
mediagoblin-7bf229267d97e536fe4c7c7d09764b90e89e36cd.zip
Making a fix so that video codec name switched from "vp8 video" to "vp8"
"vp8 video" is what vp8 is marked as in gstreamer's metadata. However, the browser expects it just as the name "vp8". So fixing that. This commit sponsored by Tyng-Ruey Chuang. Thank you!
-rw-r--r--mediagoblin/media_types/video/models.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/mediagoblin/media_types/video/models.py b/mediagoblin/media_types/video/models.py
index 970ceb75..f696a892 100644
--- a/mediagoblin/media_types/video/models.py
+++ b/mediagoblin/media_types/video/models.py
@@ -78,10 +78,17 @@ class VideoData(Base):
mimetype = "video/ogg"
else:
mimetype = orig_metadata['mimetype']
+
+ video_codec = orig_metadata["tags"]["video-codec"].lower()
+ audio_codec = orig_metadata["tags"]["audio-codec"].lower()
+
+ # We don't want the "video" at the end of vp8...
+ # not sure of a nicer way to be cleaning this stuff
+ if video_codec == "vp8 video":
+ video_codec = "vp8"
+
return '%s; codecs="%s, %s"' % (
- mimetype,
- orig_metadata["tags"]["video-codec"].lower(),
- orig_metadata["tags"]["audio-codec"].lower())
+ mimetype, video_codec, audio_codec)
else:
return video.MEDIA_MANAGER["default_webm_type"]