in src/main/java/com/amazonaws/kinesisvideo/producer/StreamInfo.java [157:200]
public static String codecIdFromContentType(@Nonnull final String contentType) throws KinesisVideoException {
final String lowerCaseContentType = Preconditions.checkNotNull(contentType).toLowerCase();
// TODO: Need to add more types and validate the mappings.
// Video codecs
if (0 == lowerCaseContentType.compareTo("video/x-vnd.on2.vp8")) {
return "V_VP8";
}
if (0 == lowerCaseContentType.compareTo("video/x-vnd.on2.vp9")) {
return "V_VP9";
}
if (0 == lowerCaseContentType.compareTo("video/avc")) {
return "V_MPEG4/ISO/AVC";
}
if (0 == lowerCaseContentType.compareTo("video/h264")) {
return "V_MPEG4/ISO/AVC";
}
if (0 == lowerCaseContentType.compareTo("video/hevc")) {
return "V_MPEGH/ISO/HEVC";
}
if (0 == lowerCaseContentType.compareTo("video/mp4v-es")) {
return "V_MPEG4/ISO/ASP";
}
// Audio codecs
if (0 == lowerCaseContentType.compareTo("audio/mpeg")) {
return "A_MPEG/L3";
}
if (0 == lowerCaseContentType.compareTo("audio/mp4a-latm")) {
return "A_AAC/MPEG4/MAIN";
}
if (0 == lowerCaseContentType.compareTo("audio/vorbis")) {
return "A_VORBIS";
}
throw new KinesisVideoException("Unknown content type to convert.");
}