openvidu-test-e2e: Improve CPU performance by using losless codec ffv1 and flac. Fix some tests also because of mp3 used as source instead of flac.

master
cruizba 2025-02-11 02:28:22 +01:00
parent f785dfd7ad
commit f19a9129ba
2 changed files with 6 additions and 8 deletions

View File

@ -63,9 +63,9 @@ public class OpenViduTestE2e {
// 2. Any extra flags needed for that codec to work // 2. Any extra flags needed for that codec to work
final protected static Map<String, Pair<String, ?>> FFMPEG_VIDEO_CODEC_NAMES = new HashMap<>() { final protected static Map<String, Pair<String, ?>> FFMPEG_VIDEO_CODEC_NAMES = new HashMap<>() {
{ {
put("H264", Pair.of("libx264", "-crf 40")); put("H264", Pair.of("libx264", ""));
put("VP8", Pair.of("libvpx", "-crf 40")); put("VP8", Pair.of("libvpx", ""));
put("VP9", Pair.of("libvpx-vp9", "-crf 40")); put("VP9", Pair.of("libvpx-vp9", ""));
put("MPEG-4", Pair.of("mpeg4", "")); put("MPEG-4", Pair.of("mpeg4", ""));
put("M-JPEG", Pair.of("mjpeg", "-force_duplicated_matrix:v 1 -huffman:v 0")); put("M-JPEG", Pair.of("mjpeg", "-force_duplicated_matrix:v 1 -huffman:v 0"));
// put("AV1", Pair.of("libaom-av1", "")); // NOT SUPPORTED BY THE RTSP SERVER // put("AV1", Pair.of("libaom-av1", "")); // NOT SUPPORTED BY THE RTSP SERVER
@ -296,11 +296,11 @@ public class OpenViduTestE2e {
private String getFileUrl(boolean withVideo, boolean withAudio) throws Exception { private String getFileUrl(boolean withVideo, boolean withAudio) throws Exception {
String fileUrl; String fileUrl;
if (withAudio && withVideo) { if (withAudio && withVideo) {
fileUrl = "https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_1080p_60fps_normal.mp4"; fileUrl = "https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_640x360_30fps_normal_fastdecode.mkv";
} else if (!withAudio && withVideo) { } else if (!withAudio && withVideo) {
fileUrl = "https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_1080p_60fps_normal_noaudio.mp4"; fileUrl = "https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_640x360_30fps_normal_noaudio_fastdecode.mkv";
} else if (withAudio) { } else if (withAudio) {
fileUrl = "https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_1080p_60fps_normal_onlyaudio.mp3"; fileUrl = "https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_1080p_60fps_normal_onlyaudio_fastdecode.flac";
} else { } else {
throw new Exception("Must have audio or video"); throw new Exception("Must have audio or video");
} }

View File

@ -1932,7 +1932,6 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
@Test @Test
@DisplayName("RTSP ingress OPUS") @DisplayName("RTSP ingress OPUS")
@Disabled // Ingress fails with error "Could not write to resource"
void rtspIngressOPUSTest() throws Exception { void rtspIngressOPUSTest() throws Exception {
log.info("RTSP ingress OPUS"); log.info("RTSP ingress OPUS");
String rtspUri = startRtspServer(null, "OPUS"); String rtspUri = startRtspServer(null, "OPUS");
@ -1941,7 +1940,6 @@ public class OpenViduTestAppE2eTest extends AbstractOpenViduTestappE2eTest {
@Test @Test
@DisplayName("RTSP ingress G711") @DisplayName("RTSP ingress G711")
@Disabled // Ingress fails with error "Not found"
void rtspIngressG711Test() throws Exception { void rtspIngressG711Test() throws Exception {
log.info("RTSP ingress G711"); log.info("RTSP ingress G711");
String rtspUri = startRtspServer(null, "G711"); String rtspUri = startRtspServer(null, "G711");