Commit 983e074f by huangdarwin Committed by Marc Baechinger

Transformer: Add 8k24fps transform test.

Most devices won't support 8k decoding, so they'll skip this test entirely.

As the video is quite short, this test shouldn't be any longer than the nearby,
long-running 4k60 test.

PiperOrigin-RevId: 451423368
parent 1becb45c
...@@ -113,6 +113,16 @@ public final class AndroidTestUtil { ...@@ -113,6 +113,16 @@ public final class AndroidTestUtil {
.setFrameRate(57.39f) .setFrameRate(57.39f)
.build(); .build();
public static final String MP4_REMOTE_8K24_URI_STRING =
"https://storage.googleapis.com/exoplayer-test-media-1/mp4/8k24fps_4s.mp4";
public static final Format MP4_REMOTE_8K24_FORMAT =
new Format.Builder()
.setSampleMimeType(MimeTypes.VIDEO_H265)
.setWidth(7680)
.setHeight(4320)
.setFrameRate(24.00f)
.build();
// The 7 HIGHMOTION files are H264 and AAC. // The 7 HIGHMOTION files are H264 and AAC.
public static final String MP4_REMOTE_1280W_720H_5_SECOND_HIGHMOTION = public static final String MP4_REMOTE_1280W_720H_5_SECOND_HIGHMOTION =
"https://storage.googleapis.com/exoplayer-test-media-1/mp4/1280w_720h_highmotion.mp4"; "https://storage.googleapis.com/exoplayer-test-media-1/mp4/1280w_720h_highmotion.mp4";
......
...@@ -21,6 +21,8 @@ import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSE ...@@ -21,6 +21,8 @@ import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSE
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING; import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING;
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_REMOTE_4K60_PORTRAIT_FORMAT; import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_REMOTE_4K60_PORTRAIT_FORMAT;
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_REMOTE_4K60_PORTRAIT_URI_STRING; import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_REMOTE_4K60_PORTRAIT_URI_STRING;
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_REMOTE_8K24_FORMAT;
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_REMOTE_8K24_URI_STRING;
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.recordTestSkipped; import static com.google.android.exoplayer2.transformer.AndroidTestUtil.recordTestSkipped;
import android.content.Context; import android.content.Context;
...@@ -112,6 +114,27 @@ public class TransformationTest { ...@@ -112,6 +114,27 @@ public class TransformationTest {
} }
@Test @Test
public void transform8K24() throws Exception {
String testId = TAG + "_transform8K24";
Context context = ApplicationProvider.getApplicationContext();
if (AndroidTestUtil.skipAndLogIfInsufficientCodecSupport(
context,
testId,
/* decodingFormat= */ MP4_REMOTE_8K24_FORMAT,
/* encodingFormat= */ null)) {
return;
}
Transformer transformer =
new Transformer.Builder(context).setEncoderFactory(FORCE_ENCODE_ENCODER_FACTORY).build();
new TransformerAndroidTestRunner.Builder(context, transformer)
.setMaybeCalculateSsim(true)
.setTimeoutSeconds(180)
.build()
.run(testId, MediaItem.fromUri(Uri.parse(MP4_REMOTE_8K24_URI_STRING)));
}
@Test
public void transformNoAudio() throws Exception { public void transformNoAudio() throws Exception {
String testId = TAG + "_transformNoAudio"; String testId = TAG + "_transformNoAudio";
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment