Skip to content

Commit

Permalink
Merge pull request #140 from brarcher/vp9
Browse files Browse the repository at this point in the history
VP9 video codec support support for MKV and WebM
  • Loading branch information
brarcher authored Oct 27, 2018
2 parents b089864 + 55f9d7a commit 5a10406
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ 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)),
MKV("matroska", "mkv", "video/x-matroska", Arrays.asList(VideoCodec.H264, VideoCodec.MPEG4, VideoCodec.MPEG2, VideoCodec.MPEG1, VideoCodec.VP8, VideoCodec.VP9), 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)),
WEBM("webm", "webm", "video/webm", Arrays.asList(VideoCodec.VP8), Arrays.asList(AudioCodec.OPUS, AudioCodec.VORBIS, AudioCodec.NONE)),
WEBM("webm", "webm", "video/webm", Arrays.asList(VideoCodec.VP8, VideoCodec.VP9), Arrays.asList(AudioCodec.OPUS, AudioCodec.VORBIS, AudioCodec.NONE)),
GIF("gif", "gif", "image/gif", Arrays.asList(VideoCodec.GIF), Collections.EMPTY_LIST),

// Audio only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public enum VideoCodec
MPEG2("mpeg2video", "MPEG-2", Collections.EMPTY_LIST, R.string.codecFastOk),
MPEG1("mpeg1video", "MPEG-1", Collections.EMPTY_LIST, R.string.codecFastLow),
VP8("libvpx", "VP8", Collections.EMPTY_LIST, null),
VP9("libvpx-vp9", "VP9", Collections.EMPTY_LIST, null),
GIF("gif", "GIF", Collections.EMPTY_LIST, null),
;

Expand Down
3 changes: 3 additions & 0 deletions app/src/test/shell/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,11 @@ def verifyAudioStream(test, stream):
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "avi", "avi", "avi", "mpeg4", "mpeg4", "2000", "360x240", "19", "mp3", "mp3", "22050", "100", "2"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "mp4", "mp4", "mp4", "h264", "h264", "2000", "360x240", "19", "aac", "aac", "22050", "100", "2"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "matroska", "matroska", "mkv", "h264", "h264", "2000", "180x120", "24", "aac", "aac", "22050", "50", "1"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "matroska", "matroska", "mkv", "libvpx", "vp8", "2000", "180x120", "24", "aac", "aac", "22050", "50", "1"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "matroska", "matroska", "mkv", "libvpx-vp9", "vp9", "2000", "180x120", "24", "aac", "aac", "22050", "50", "1"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "flv", "flv", "flv", "h264", "h264", "2000", "180x120", "24", "aac", "aac", "22050", "50", "1"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "webm", "webm", "webm", "libvpx", "vp8", "2000", "180x120", "24", "vorbis", "vorbis", "22050", "50", "2"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "webm", "webm", "webm", "libvpx-vp9", "vp9", "2000", "180x120", "24", "vorbis", "vorbis", "22050", "50", "2"))
videoTests.append(VideoTest("SampleVideo_360x240_1mb.mp4", "gif", "gif", "gif", "gif", "gif", "2000", "360x240", "10", None, None, None, None, None))

# AudioTest = collections.namedtuple("AudioTest", ["filename", "mediaContainer", "formatName", "extension", "audioCodec", "audioCodecName", "audioSampleRate", "audioBitrateK", "audioChannel"])
Expand Down

0 comments on commit 5a10406

Please sign in to comment.