diff --git a/sorter.py b/sorter.py
index 690f5b32bf62ef5aa14a800a234e217b985dc53c..395b4be4163f8355cd973ea92998808f4ae4c8a7 100644
--- a/sorter.py
+++ b/sorter.py
@@ -77,10 +77,10 @@ def split_filename(filename):
 	return filename.replace('_', '-').replace(' ', '-').split('-')
 
 def parse_filename(filename):
-	# filenames: <handle>-<sorter>-<format>.mp4, split at '-' into an array
+	# filenames: <handle>-<sorter>-<format>.<ext>, split at '-' into an array
 	data = {'keywords': []}
 	for chunk in filename:
-		chunk = chunk.replace('.mp4', '')
+		chunk = chunk.replace('.mp4', '').replace('.webm', '')
 		#-<YYMMDD> (date)
 		#-<HHMM> (time)
 		#-<keyword>
@@ -226,7 +226,8 @@ def sort_now():
 					# if the video is in the table "videos" already (with the correct course), skip it
 					if os.path.basename(filename) in ignorefiles:
 						continue
-					if not os.path.splitext(filename)[1] == '.mp4':
+					ext = os.path.splitext(filename)[1]
+					if not ext == '.mp4' and not ext == '.webm':
 						continue
 					matches, fmt = sort_file(filename, course=course, lectures=lectures)
 					dbfilepath = mountpoint['prefix']+course['handle']+'/'+filename