diff --git a/src/main/java/com/github/stickerifier/stickerify/media/MediaHelper.java b/src/main/java/com/github/stickerifier/stickerify/media/MediaHelper.java index 9387f1b..bb799dc 100644 --- a/src/main/java/com/github/stickerifier/stickerify/media/MediaHelper.java +++ b/src/main/java/com/github/stickerifier/stickerify/media/MediaHelper.java @@ -53,7 +53,7 @@ public final class MediaHelper { static final ProcessLocator FFMPEG_LOCATOR = new PathLocator(); private static final int PRESERVE_ASPECT_RATIO = -2; private static final List SUPPORTED_VIDEOS = List.of("image/gif", "video/quicktime", "video/webm", - "video/mp4", "video/x-m4v", "application/x-matroska"); + "video/mp4", "video/x-m4v", "application/x-matroska", "video/x-msvideo"); /** * Based on the type of passed-in file, it converts it into the proper media. diff --git a/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java b/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java index 6b08d1c..59ef4d1 100644 --- a/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java +++ b/src/test/java/com/github/stickerifier/stickerify/media/MediaHelperTest.java @@ -215,6 +215,14 @@ void convertGifVideo() throws Exception { assertVideoConsistency(result, 512, 274, 10F, 1_000L); } + @Test + void convertAviVideo() throws Exception { + var aviVideo = loadResource("valid.avi"); + var result = MediaHelper.convert(aviVideo); + + assertVideoConsistency(result, 512, 512, 30F, 3_000L); + } + @Test void noVideoConversionNeeded() throws Exception { var webmVideo = loadResource("no_conversion_needed.webm"); @@ -319,6 +327,14 @@ void concurrentWebmVideoConversions() { executeConcurrentConversionsOf(webmVideo); } + @Test + @DisplayName("avi videos") + void concurrentAviVideoConversions() { + var aviVideo = loadResource("valid.avi"); + + executeConcurrentConversionsOf(aviVideo); + } + @Test @DisplayName("gif videos") void concurrentGifVideoConversions() { diff --git a/src/test/resources/valid.avi b/src/test/resources/valid.avi new file mode 100644 index 0000000..9fd6ddf Binary files /dev/null and b/src/test/resources/valid.avi differ