Skip to content

Commit

Permalink
Add support for AVI media container
Browse files Browse the repository at this point in the history
  • Loading branch information
brarcher committed Sep 17, 2018
1 parent ead8b99 commit 00d82ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
public enum MediaContainer
{
// Video and audio:
AVI("avi", "avi", "video/avi", Arrays.asList(VideoCodec.AVI), Arrays.asList(AudioCodec.MP3)),
FLV("flv", "flv", "video/x-flv", Collections.singletonList(VideoCodec.H264), Arrays.asList(AudioCodec.AAC, AudioCodec.MP3, AudioCodec.NONE)),
MKV("matroska", "mkv", "video/x-matroska", Arrays.asList(VideoCodec.H264, VideoCodec.MPEG4, VideoCodec.MPEG2, VideoCodec.MPEG1), Arrays.asList(AudioCodec.AAC, AudioCodec.MP3, AudioCodec.OPUS, AudioCodec.NONE)),
MP4("mp4", "mp4", "video/mp4", Arrays.asList(VideoCodec.H264, VideoCodec.MPEG4, VideoCodec.MPEG2, VideoCodec.MPEG1), Arrays.asList(AudioCodec.AAC, AudioCodec.MP3, AudioCodec.NONE)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*/
public enum VideoCodec
{
// This is the built-in avi encoder instead of using the external libxvid library.
AVI("mpeg4", "AVI", Arrays.asList("-vtag", "xvid"), null),
// The 'preset' setting for h264 is changed from its default of 'medium'. The
// 'faster' setting reduces encoding times by ~73% while only reducing quality
// a near imperceptible amount. This seems like a good trade-off for encoding
Expand Down
1 change: 1 addition & 0 deletions app/src/test/shell/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ def verifyAudioStream(test, stream):

# VideoTest = collections.namedtuple("VideoTest", ["filename", "mediaContainer", "formatName", "extension", "videoCodec", "videoBitrateK", "resolution", "fps", "audioCodec", "audioCodecName", "audioSampleRate", "audioBitrateK", "audioChannel"])
videoTests = []
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "avi", "avi", "avi", "mpeg4", "2000", "360x240", "19", "mp3", "mp3", "22050", "100", "2"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "mp4", "mp4", "mp4", "h264", "2000", "360x240", "19", "aac", "aac", "22050", "100", "2"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "matroska", "matroska", "mkv", "h264", "2000", "180x120", "24", "aac", "aac", "22050", "50", "1"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "flv", "flv", "flv", "h264", "2000", "180x120", "24", "aac", "aac", "22050", "50", "1"))
Expand Down

0 comments on commit 00d82ec

Please sign in to comment.