Bug Description
1. Summary
Anamorphic MPEG-2 video is displayed with the wrong aspect ratio.
The source is encoded at 704×480 with a 16:9 display aspect ratio (SAR 40:33). Vega plays it as though the pixels are square, resulting in pillarboxing and a vertically stretched image. For example, a circle in the source appears as a tall oval.
The same stream displays correctly in VLC and other TV players.
Bug Severity: Impacts operation of app
2. Steps to Reproduce
- Create an MPEG-2 HLS stream with:
- Coded resolution:
704×480 - Display aspect ratio:
16:9 - Sample aspect ratio:
40:33 - AAC audio
- We can provide a Synthetic mpeg2 stream to our amazon contact.
- Coded resolution:
- Play the stream using Shaka with the Vega headless
VideoPlayer. - Attach the player to a fullscreen
KeplerVideoSurfaceViewusingsetSurfaceHandle(). - Compare the result with VLC.
3. Observed Behavior
The video is centered but pillarboxed, and the image is vertically stretched. A circle appears as a tall oval.
The device correctly detects the sample aspect ratio:
width=704
height=480
pixel-aspect-ratio=40/33
However, the W3C media path reports only the coded size:
generateMediaTrackInfo width = 704
generateMediaTrackInfo height = 480
This suggests the sample aspect ratio is detected by the media pipeline but not applied when rendering the video.
4. Expected Behavior
The player should apply the source’s 40:33 sample aspect ratio.
A 704×480 frame with this sample aspect ratio should be displayed at approximately 854×480, producing a 16:9 image without pillarboxing. The test circle should remain round.
4.a Possible Root Cause & Temporary Workaround
The GStreamer pipeline appears to detect pixel-aspect-ratio=40/33, but that value does not appear to reach the final display path.
We tried the following:
- All available
KeplerVideoSurfaceViewscaling modes - Applying a React Native horizontal transform
- Setting
VideoPlayer.widthandVideoPlayer.height - Adding
RESOLUTION=854x480to the HLS master playlist
The playlist test was recognized by Shaka, which reported 854×480, but the rendered output remained unchanged.
React Native transforms only affected the hardware surface window, not the video pixels themselves.
We have not found a client-side workaround on Vega. A rendering fix or an API for setting the destination aspect ratio would be helpful.
5. Logs or Crash Report
This is not a crash.
We have a complete device log covering player initialization, manifest parsing, track detection, and playback. Relevant lines show that the media pipeline detects 704×480 with pixel-aspect-ratio=40/33, while the W3C display path continues to use 704×480.
The full logs and synthetic test stream can be provided directly to our Amazon contact.
6. Environment
SDK Version: 0.22.5600
React Native Version: RN 0.72
@amazon-devices/react-native-w3cmedia: 2.2.11
Player client/server: 2.2.11
App State: Foreground
Device: Fire TV Stick 4K Select (AFTCR001), ARM
OS Information:
NAME="OS"
OE_VERSION="4.0.0"
OS_VERSION="2.0"
BUILD_DESC="OS 2.0 (TV Ship/63)"
BUILD_FINGERPRINT="4.0.179177.0(5cf44be4fdaf0f84)/63N:user/release-keys"
VERSION_NUMBER="2502000006320"
7. Example Code
const player = new VideoPlayer();
await player.initialize();
<KeplerVideoSurfaceView
style={{ width: 1920, height: 1080 }}
onSurfaceViewCreated={handle => player.setSurfaceHandle(handle)}
/>
Playback Details
The issue occurs with anamorphic NTSC MPEG-2 delivered through HLS. No authentication, geographic restriction, or special HTTP headers are required for the synthetic reproduction stream.
Player SDK: Shaka Player
Player SDK Version: 4.8.5
Audio Codec: AAC (mp4a.40.2)
Video Codec: MPEG-2 (mp2v)
Manifest Type: HLS (m3u8)
Device Architecture: ARM
Content URL: No public URL; a short synthetic HLS package can be provided
Special Headers: None
The synthetic video contains a circle specifically to make the incorrect aspect ratio easy to identify:
- VLC: round circle, correct 16:9 presentation
- Vega: tall oval, pillarboxed presentation
Additional Context
Playback uses the recommended headless architecture with VideoPlayer, KeplerVideoSurfaceView, and setSurfaceHandle().
The key detail is that the platform logs already contain the correct 40:33 pixel aspect ratio. The problem appears to occur later, when the decoded frame is passed to the display surface.
We can provide the complete logs, screenshots, and synthetic HLS reproduction package to our Amazon contact.