ExportTest: make 8K asset and trim
Move remote 8K file to local and trim to 320ms. Trim done with ffmpeg: `ffmpeg -i {remote_file} -t 0.3 -c:v copy -c:a copy 8k24fps_300ms.mp4` PiperOrigin-RevId: 569449962
This commit is contained in:
parent
cbd23925d5
commit
0b4638af15
BIN
libraries/test_data/src/test/assets/media/mp4/8k24fps_300ms.mp4
Normal file
BIN
libraries/test_data/src/test/assets/media/mp4/8k24fps_300ms.mp4
Normal file
Binary file not shown.
@ -245,9 +245,8 @@ public final class AndroidTestUtil {
|
||||
.setCodecs("avc1.64001F")
|
||||
.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 =
|
||||
public static final String MP4_ASSET_8K24_URI_STRING = "asset:///media/mp4/8k24fps_300ms.mp4";
|
||||
public static final Format MP4_ASSET_8K24_FORMAT =
|
||||
new Format.Builder()
|
||||
.setSampleMimeType(MimeTypes.VIDEO_H265)
|
||||
.setWidth(7680)
|
||||
|
@ -18,14 +18,14 @@ package androidx.media3.transformer.mh;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.FORCE_TRANSCODE_VIDEO_EFFECTS;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_4K60_PORTRAIT_FORMAT;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_4K60_PORTRAIT_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_8K24_FORMAT;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_8K24_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_BT2020_SDR;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_BT2020_SDR_FORMAT;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_SEF_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_FORMAT;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_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 static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@ -158,7 +158,7 @@ public class ExportTest {
|
||||
String testId = TAG + "_export8K24";
|
||||
Context context = ApplicationProvider.getApplicationContext();
|
||||
if (AndroidTestUtil.skipAndLogIfFormatsUnsupported(
|
||||
context, testId, /* inputFormat= */ MP4_REMOTE_8K24_FORMAT, /* outputFormat= */ null)) {
|
||||
context, testId, /* inputFormat= */ MP4_ASSET_8K24_FORMAT, /* outputFormat= */ null)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -166,12 +166,12 @@ public class ExportTest {
|
||||
new Transformer.Builder(context)
|
||||
.setEncoderFactory(new ForceEncodeEncoderFactory(context))
|
||||
.build();
|
||||
MediaItem mediaItem = MediaItem.fromUri(Uri.parse(MP4_REMOTE_8K24_URI_STRING));
|
||||
MediaItem mediaItem = MediaItem.fromUri(Uri.parse(MP4_ASSET_8K24_URI_STRING));
|
||||
// TODO: b/281824052 - have requestCalculateSsim always be true after linked bug is fixed.
|
||||
boolean requestCalculateSsim = !Util.MODEL.equals("SM-G991B");
|
||||
new TransformerAndroidTestRunner.Builder(context, transformer)
|
||||
.setRequestCalculateSsim(requestCalculateSsim)
|
||||
.setTimeoutSeconds(180)
|
||||
.setTimeoutSeconds(120)
|
||||
.build()
|
||||
.run(testId, mediaItem);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user