Skip to content

The SubtitleView displays incorrect aspect ratios for certain PGS subtitles. #2849

@mzhsy1

Description

@mzhsy1

Version

Media3 1.8.0

More version details

No response

Devices that reproduce the issue

Properties
avd.ini.displayname Television (1080p)
avd.ini.encoding UTF-8
AvdId Television_1080p
disk.dataPartition.size 6G
fastboot.chosenSnapshotFile
fastboot.forceChosenSnapshotBoot no
fastboot.forceColdBoot yes
fastboot.forceFastBoot no
hw.accelerometer no
hw.arc false
hw.audioInput yes
hw.battery no
hw.camera.back none
hw.camera.front emulated
hw.cpu.ncore 4
hw.device.hash2 MD5:e030c65b75f93ba48e1b38a5b0321741
hw.device.manufacturer Google
hw.device.name tv_1080p
hw.dPad yes
hw.gps yes
hw.gpu.enabled yes
hw.gpu.mode host
hw.gyroscope no
hw.initialOrientation landscape
hw.keyboard yes
hw.keyboard.lid yes
hw.lcd.density 320
hw.lcd.height 1080
hw.lcd.width 1920
hw.mainKeys yes
hw.ramSize 4096
hw.sdCard yes
hw.sensors.light yes
hw.sensors.magnetic_field no
hw.sensors.orientation no
hw.sensors.pressure no
hw.sensors.proximity no
hw.trackBall no
image.sysdir.1 system-images\android-36\android-tv\x86
PlayStore.enabled false
runtime.network.latency none
runtime.network.speed full
showDeviceFrame yes
skin.dynamic yes
tag.display Android TV
tag.displaynames Android TV
tag.id android-tv
tag.ids android-tv
target android-36
vm.heapSize 256

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

  1. Play the test video in the problematic media item.
  2. Observe the display of PGS subtitles.

Expected result

PGS subtitles are displayed with the correct aspect ratio.
The next line in the image shows the normal display condition.

Image Image

Actual result

Image Image

Media

Test media video:
https://github.com/mzhsy1/MzDKPlayer/blob/main/demovideo/output%20(1).mkv

AndroidView(
    factory = { context ->
        PlayerView(context).apply {
            useController = false 
            player = exoPlayer 

            subtitleView?.visibility = videoPlayerViewModel.isSubtitleViewVis
        }
    },
    update = { playView ->
        playView.player = exoPlayer
        playView.subtitleView?.visibility = videoPlayerViewModel.isSubtitleViewVis
    },
    modifier = Modifier.fillMaxSize(), 
    onRelease = {
        // Release the player resources
        exoPlayer.release()
    }
)

For more code, please refer to:


### Bug Report

- [ ] You will email the zip file produced by `adb bugreport` to android-media-github@google.com after filing this issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions