Android에는 앱이 지원되는 하드웨어에서 디스플레이 설정을 조정할 수 있는 API가 포함되어 있습니다. Android TV OS에서 앱은 이를 활용하여 이상적인 시청 환경을 위해 프레임 속도와 색상 프로필을 일치시켜 콘텐츠가 최적의 형식으로 표시되도록 할 수 있습니다.
콘텐츠 프레임 속도 일치시키기
동영상의 프레임 속도가 디스플레이의 새로고침 빈도와 일치하지 않으면 사용자는 프레임 속도 변환으로 인해 불쾌한 모션 저더 아티팩트를 경험할 수 있습니다. 이는 특히 느린 패닝 샷에서 두드러집니다. 이러한 이유로 SurfaceControl.Transaction.setFrameRate() API를 사용하여 콘텐츠의 프레임 속도를 프레임워크에 알리고 동영상 콘텐츠가 원활하지 않은 프레임 속도 전환에 적합한지 신호로 알려야 합니다.
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.BAKLAVA){valmediaQualityManager:MediaQualityManager=context.getSystemService(MediaQualityManager::class.java)valprofiles=mediaQualityManager.getAvailablePictureProfiles(null)for(profileinprofiles){// If we have a system sports profile, apply it to our media codecif(profile.profileType==PictureProfile.TYPE_SYSTEM && profile.name==NAME_SPORTS){valbundle=Bundle().apply{putParcelable(MediaFormat.KEY_PICTURE_PROFILE_INSTANCE,profile)}mediaCodec.setParameters(bundle)}}}
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-27(UTC)"],[],[],null,["Android includes APIs that allow apps to adjust display settings on supported\nhardware. On Android TV OS, apps can take advantage of this to ensure that\ncontent displays in the best possible format, by matching the framerate and\ncolor profile for the ideal watching experience.\n\nMatch content frame rate\n\nWhen the framerate of a video doesn't match the refresh rate of the display,\nusers can experience unpleasant motion judder artifacts from frame rate\nconversion. This is especially visible during slow panning shots. For this\nreason, it's important to use the\n[`SurfaceControl.Transaction.setFrameRate()`](/training/tv/playback/(/reference/android/view/SurfaceControl.Transaction#setFrameRate(android.view.SurfaceControl,%20float,%20int,%20int)))\nAPI to notify the framework about the frame rate of the content and to signal\nwhether the video content is eligible for a non-seamless\n[frame rate switch](/guide/topics/media/frame-rate#non-seamless).\n\nFor more information, read the [frame rate guide](/guide/topics/media/frame-rate).\n\nMatch preferred picture profiles\n\nThe MediaQuality API in Android 16 allows developers to take control over\npicture profiles.\n\nSome example scenarios include:\n\n- For movies and TV series that are mastered with a wider dynamic range, developers might request Filmmaker mode to accurately display content as the creator intended for it to look. A cinema profile with greater color accuracy brings out subtle details in shadows in favor of increasing brightness.\n- Live sporting events, which are often mastered with a narrow dynamic range and watched in the daylight, can benefit from a profile that gives preference to brightness over color accuracy.\n- Game developers can request a low latency profile with minimal image processing so players can get the best performance from their display.\n\n| **Note:** OEMs may add additional presets and provide mechanisms for users to define their own picture profiles. This implementation uses the [`createPictureProfile()`](/reference/android/media/quality/MediaQualityManager#createPictureProfile(android.media.quality.PictureProfile)) method that requires a system permission.\n\nSelecting a system picture profile\n\nBefore selecting a picture profile, it's important to first validate that the\ndevice supports it.\n\nThe following snippet shows how to use\n[`getAvailablePictureProfiles()`](/reference/android/media/quality/MediaQualityManager#getAvailablePictureProfiles(android.media.quality.MediaQualityManager.ProfileQueryParams)) to query all\nsupported picture profiles and apply a sports profile: \n\n if (Build.VERSION.SDK_INT \u003e= Build.VERSION_CODES.BAKLAVA) {\n val mediaQualityManager: MediaQualityManager =\n context.getSystemService(MediaQualityManager::class.java)\n val profiles = mediaQualityManager.getAvailablePictureProfiles(null)\n for (profile in profiles) {\n // If we have a system sports profile, apply it to our media codec\n if (profile.profileType == PictureProfile.TYPE_SYSTEM\n && profile.name == NAME_SPORTS\n ) {\n val bundle = Bundle().apply { \n putParcelable(MediaFormat.KEY_PICTURE_PROFILE_INSTANCE, profile)\n }\n mediaCodec.setParameters(bundle)\n }\n }\n }\n\nTo obtain a specific profile by name, use [`getPictureProfile()`](/reference/android/media/quality/MediaQualityManager#getPictureProfile(int,%20java.lang.String,%20android.media.quality.MediaQualityManager.ProfileQueryParams)): \n\n if (Build.VERSION.SDK_INT \u003e= Build.VERSION_CODES.BAKLAVA) {\n val profile = mediaQualityManager.getPictureProfile(\n PictureProfile.TYPE_SYSTEM, NAME_SPORTS, null)\n }\n\nIf you don't need to query whether a profile is available, profiles can be\nprovided directly by their ID to a MediaCodec by using\n`MediaFormat.KEY_PICTURE_PROFILE_INSTANCE`.\n\nWhile supported profiles may differ by device, you may consider matching against\nthe following known system profile IDs: \n\n const val NAME_STANDARD: String = \"standard\"\n const val NAME_VIVID: String = \"vivid\"\n const val NAME_SPORTS: String = \"sports\"\n const val NAME_GAME: String = \"game\"\n const val NAME_MOVIE: String = \"movie\"\n const val NAME_ENERGY_SAVING: String = \"energy_saving\"\n const val NAME_USER: String = \"user\"\n\n| **Note:** These strings are provided as recommendations to OEMs and are subject to change in future API levels."]]