Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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() {
Expand Down
Binary file added src/test/resources/valid.avi
Binary file not shown.
Loading