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
This commit is contained in:
parent
9a70bbca05
commit
67354cf2a7
@ -113,6 +113,16 @@ public final class AndroidTestUtil {
|
||||
.setFrameRate(57.39f)
|
||||
.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.
|
||||
public static final String MP4_REMOTE_1280W_720H_5_SECOND_HIGHMOTION =
|
||||
"https://storage.googleapis.com/exoplayer-test-media-1/mp4/1280w_720h_highmotion.mp4";
|
||||
|
@ -21,6 +21,8 @@ import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_REMOTE_4K60_PORTRAIT_FORMAT;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_REMOTE_4K60_PORTRAIT_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_REMOTE_8K24_FORMAT;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_REMOTE_8K24_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.recordTestSkipped;
|
||||
|
||||
import android.content.Context;
|
||||
@ -111,6 +113,27 @@ public class TransformationTest {
|
||||
.run(testId, MediaItem.fromUri(Uri.parse(MP4_REMOTE_4K60_PORTRAIT_URI_STRING)));
|
||||
}
|
||||
|
||||
@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 {
|
||||
String testId = TAG + "_transformNoAudio";
|
||||
|
Loading…
x
Reference in New Issue
Block a user