mirror of https://github.com/OpenVidu/openvidu.git
openvidu-test-e2e: Add lossless flag to getFileUrl method
parent
f19a9129ba
commit
06fc88f2b0
|
@ -195,7 +195,7 @@ public class OpenViduTestE2e {
|
||||||
containers.add(rtspServerContainer);
|
containers.add(rtspServerContainer);
|
||||||
|
|
||||||
final String RTSP_PATH = "live";
|
final String RTSP_PATH = "live";
|
||||||
String fileUrl = getFileUrl(videoCodec != null, audioCodec != null);
|
String fileUrl = getFileUrl(videoCodec != null, audioCodec != null, true);
|
||||||
String codecs = getCodecs(videoCodec, audioCodec);
|
String codecs = getCodecs(videoCodec, audioCodec);
|
||||||
String rtspServerIp = rtspServerContainer.getContainerInfo().getNetworkSettings().getIpAddress();
|
String rtspServerIp = rtspServerContainer.getContainerInfo().getNetworkSettings().getIpAddress();
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ public class OpenViduTestE2e {
|
||||||
*/
|
*/
|
||||||
public String startSrtServer(String videoCodec, String audioCodec) throws Exception {
|
public String startSrtServer(String videoCodec, String audioCodec) throws Exception {
|
||||||
|
|
||||||
String fileUrl = getFileUrl(videoCodec != null, audioCodec != null);
|
String fileUrl = getFileUrl(videoCodec != null, audioCodec != null, true);
|
||||||
String codecs = getCodecs(videoCodec, audioCodec);
|
String codecs = getCodecs(videoCodec, audioCodec);
|
||||||
|
|
||||||
String ffmpegCommand = "ffmpeg -i " + fileUrl + " " + codecs + " -strict -2 -f mpegts srt://:" + RTSP_SRT_PORT
|
String ffmpegCommand = "ffmpeg -i " + fileUrl + " " + codecs + " -strict -2 -f mpegts srt://:" + RTSP_SRT_PORT
|
||||||
|
@ -293,14 +293,20 @@ public class OpenViduTestE2e {
|
||||||
return " " + codecs + " ";
|
return " " + codecs + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getFileUrl(boolean withVideo, boolean withAudio) throws Exception {
|
private String getFileUrl(boolean withVideo, boolean withAudio, boolean lossless) 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_640x360_30fps_normal_fastdecode.mkv";
|
fileUrl = lossless ?
|
||||||
|
"https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_1080p_60fps_normal.mp4" :
|
||||||
|
"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_640x360_30fps_normal_noaudio_fastdecode.mkv";
|
fileUrl = lossless ?
|
||||||
|
"https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_640x360_30fps_normal_noaudio_fastdecode.mkv" :
|
||||||
|
"https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_1080p_60fps_normal_noaudio.mp4";
|
||||||
} else if (withAudio) {
|
} else if (withAudio) {
|
||||||
fileUrl = "https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_1080p_60fps_normal_onlyaudio_fastdecode.flac";
|
fileUrl = lossless ?
|
||||||
|
"https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_1080p_60fps_normal_onlyaudio_fastdecode.flac" :
|
||||||
|
"https://s3.eu-west-1.amazonaws.com/public.openvidu.io/bbb_sunflower_1080p_60fps_normal_onlyaudio.mp3";
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("Must have audio or video");
|
throw new Exception("Must have audio or video");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue