Recommended media player for HTTP HLS, raw MPEG-TS live streams, and MKV on Amazon Vega

Hello,

We are adapting an existing Smart TV IPTV application to Amazon Vega. The application UI is currently implemented as
a web application running inside a WebView, but we would like to use Vega’s native media playback APIs for better
playback stability.

Our application needs to support DRM-free media from third-party IPTV providers. The media server and stream format
are controlled by the user, so we cannot modify the server configuration.

We need to support the following media types:

  1. HLS live streams using .m3u8

  2. Direct/raw MPEG-TS live stream URLs ending in .ts
    These are standalone live stream URLs, not individual HLS segments.

  3. VOD files such as .mkv and .mp4

  4. Both HTTP and HTTPS URLs, including redirects to dynamically generated stream URLs

We have tested the following Vega APIs:

  • @amazon-devices/react-native-w3cmedia
  • VideoPlayer with KeplerVideoSurfaceView
  • Shaka Player using Vega W3C Media/MSE integration

Current results:

  • Standard HTTPS HLS test streams can play.
  • Some third-party HTTP HLS streams can play after correctly handling HTTP redirects.
  • Direct .ts live streams fail in URL mode or report a media/format error.
  • MKV files may remain loading or return media error code 4.
  • In some cases, audio continues normally while the video frame becomes frozen.

Questions:

  1. What is the officially recommended player architecture for an IPTV application on Vega?

  2. Does Vega natively support direct MPEG-TS live stream URLs, or only MPEG-TS segments contained in an HLS
    presentation?

  3. Is MKV officially supported by VideoPlayer URL mode? Which video and audio codecs are supported inside MKV?

  4. Can Shaka Player load a standalone .ts stream, or does it require a manifest such as HLS .m3u8 or DASH .mpd?

  5. Is there another Amazon Vega native player API recommended for raw MPEG-TS streams?

  6. Are cleartext HTTP media URLs supported in production applications when the required manifest/network permissions
    are configured?

  7. Are there playback or codec differences between the Vega Virtual Device and physical Vega/Fire TV devices?

  8. Is there an official sample project demonstrating HTTP IPTV playback with HLS, raw MPEG-TS, MP4, and MKV?

We are not using DRM for these test streams. We would appreciate clarification about the officially supported
protocols, containers, codecs, and the recommended playback implementation.

Thank you.

Vega SDK version: 0.24.12112
Environment: Vega Virtual Device on macOS
UI architecture: React Native Vega application containing a WebView
Native media package: @amazon-devices/react-native-w3cmedia
Player APIs tested: VideoPlayer, KeplerVideoSurfaceView, Shaka Player
Content type: DRM-free IPTV live streams and VOD

Hi @vipcreater,

Welcome to the Amazon Developer Community, and thank you for the detailed write-up.

Here are answers to each question.

1. Recommended player architecture
Use the VideoPlayer from @amazon-devices/react-native-w3cmedia with KeplerVideoSurfaceView, and pick the playback mode by content type:

  • HLS .m3u8 (live and VOD): MSE mode, using VideoPlayer + KeplerVideoSurfaceView + Shaka Player (or hls.js / dash.js)
  • Flat VOD files (.mp4, .mkv): URL mode, using VideoPlayer + KeplerVideoSurfaceView, then set videoPlayer.src = url

Some notes for an IPTV app:

  • Live HLS with MPEG-TS segments: turn on sequence mode in Shaka: player.configure('manifest.hls.sequenceMode', true). The Media Player FAQ recommends this for MPEG2-TS streams, because live playback may not start without it.
  • URL mode limits: in URL mode, audioTracks and textTracks aren’t populated, and the event set is limited (you get loadstart, play, waiting, timeupdate, but not loadedmetadata or canplay). Subtitles embedded in MKV also aren’t rendered. If you need audio-track or subtitle selection, use MSE mode. In URL mode you can add external subtitles with addTextTrack().
  • Manifest services: declare the media services under [wants] in manifest.toml, as listed in Media Player Setup. Missing entries can cause playback not to start or a black screen.
  • WebView UI: the KeplerVideoSurfaceView has to be rendered in the React Native layer, not inside the web page. We don’t currently have a documented pattern for drawing WebView UI on top of the video surface. The simplest option is a native React Native playback screen that your WebView opens through postMessage, with RN sending commands back through injectJavaScript.

References: Media Player overview , Selecting the Playback Mode, Media Player FAQ

2. Direct MPEG-TS URLs vs. TS segments in HLS
The MPEG2TS container is supported in both URL mode and MSE mode (as segments in an HLS presentation). For direct, continuous raw .ts live URLs, I’m confirming the expected behavior with our media team and will update this thread.
Until then, if your provider offers an HLS (.m3u8) version of the same channel, we recommend using it with Shaka Player in MSE mode, which is the documented path for live streaming.
If you test a raw .ts URL in URL mode, make sure await videoPlayer.initialize() has resolved and setSurfaceHandle() has been called before you assign src. If it still fails, please share the loggingctl log lines around the failure (W3CMEDIA, MEDIA_PLAYER, and set_src_uri) so I can pass them to the team.

About the error you’re seeing: if the native log shows set_src_uri ... failed apiStatus=50004 followed by makeMediaError: code = 4, before any request reaches the server, the usual causes are:

  • The URL is plain http:// and is blocked by the cleartext policy (see 6).
  • The pipeline wasn’t ready. Wait for await videoPlayer.initialize() to resolve and call setSurfaceHandle() before you assign src. Setting src without a connected surface also gives error code 4.

3. MKV in URL mode
MKV is officially supported in URL mode. The same codecs apply inside MKV:

  • Video: H.264 (up to High Profile L5.2), H.265/HEVC (Main 10), AV1, VP9, VP8, MPEG-2, MPEG-4 Part 2 (Simple/Advanced Simple, up to 1080p30)
  • Audio: AAC, HE-AAC v1/v2, xHE-AAC, MP3, MP2, AC3, eAC3, AC4, Opus, FLAC, Vorbis, PCM. DTS is HDMI passthrough only.

Some of these depend on the TV hardware (4K, Dolby, HDR). Check before playback with canPlayType() or MediaSource.isTypeSupported().

About your symptoms:

  • Stuck loading or error code 4: first check the setup order. Wait for await videoPlayer.initialize() to resolve, then call setSurfaceHandle(), and only then assign src. Setting src without a connected surface also returns error code 4. If the file is served over http://, please also try the same file over https:// if you can. That tells us whether this is related to the cleartext question in 6. Then check the file’s codecs with ffprobe. DTS audio, or a profile/level above the limits listed above, are common causes.*
  • Seeking: for seeking to work, the MKV needs a Cues (seek index) element. A platform fix for MKV seeking over HTTP has also been made for an upcoming platform build.
  • Audio plays but video freezes: this usually points to the video stream itself, such as interlaced content, an unsupported profile/level, or broken PTS/DTS. Please share ffprobe -show_streams output for an affected file.

4. Can Shaka load a standalone .ts?
Not in MSE mode. Shaka needs a manifest (HLS .m3u8, DASH .mpd, or SmoothStreaming). Play flat .ts, .mp4, and .mkv by setting src on the VideoPlayer directly.
A custom MSE player that streams an endless TS feed in JavaScript isn’t practical on Vega either. The MSE porting guide says the ReadableStream interface of the Fetch API isn’t supported, so an endless HTTP response can’t be read incrementally.

5. Another native API for raw MPEG-TS?
No. VideoPlayer (URL mode) is the native path, and there’s no separate API.

6. Cleartext HTTP in production
Cleartext (HTTP) traffic is blocked by default on Vega. I’m confirming the exact manifest configuration for HTTP media playback through @amazon-devices/react-native-w3cmedia with our team and will follow up here.
In the meantime, could you tell us:

  • Whether your HTTPS streams play correctly while the HTTP versions of the same streams fail
  • The device OS version (cat /etc/os-release)

7. Vega Virtual Device vs. physical devices
Yes, they differ. The VVD is emulated and doesn’t have the device’s hardware decoders, so codec support, performance, and A/V timing can differ from Fire TV hardware. 4K, HDR, Dolby, and hardware DRM can only be checked on real devices.

Please confirm your MKV, .ts, and frozen-video results on a physical Vega Fire TV device before concluding a format is unsupported. Media apps must be validated on a physical Fire TV Stick 4K Select before submission anyway (Test Your App Before Submission).

8. Official sample project
The official reference is vega-video-sample from Sample Apps Home. It shows MP4 in URL mode and HLS/DASH through Shaka in MSE mode. There’s no official IPTV sample yet that covers raw MPEG-TS and MKV, but the sample’s URL-mode code path is the same one you’d use for .mkv and .ts.

If problems continue after the manifest changes, please share:

  1. vega --version, your @amazon-devices/react-native-w3cmedia version, and cat/etc/os-release
  2. Whether the problem also happens on a physical Fire TV device
  3. A loggingctl log capture around the failure (W3CMEDIA, MEDIA_PLAYER, and set_src_uri lines)
  4. ffprobe -show_streams output for one failing .ts file and one failing .mkv file
  5. A test URL

Warm Regards,
Ivy

Subject: Native VideoPlayer rejects HTTP MKV and raw MPEG-TS — how to enable HTTP?

Hello Amazon team,

HTTP HLS playback through Shaka/MSE works in our app, but native VideoPlayer.src playback fails for both HTTP MKV files and raw MPEG-TS live streams.

Environment

  • Vega SDK: 0.24.12112
  • Vega CLI: 1.4.7
  • W3C Media: 2.3.2
  • Vega Virtual Device, OS 1.2
  • OS build: 102282480
  • Build date: September 18, 2026
  • VERSION_NUMBER: 2111248248030

Our manifest already includes the internet privilege and:

[network-traffic-policy.cleartext]
allowed-domains = [“*”]

Test URLs

HTTP MKV VOD — fails:

http://cbu9frx5.k32comer.xyz/movie/aigooe6/aigooe6edg23/1299760.mkv

HTTP raw MPEG-TS live stream — fails:

http://pqw9cqfk.k21efd.xyz/live/S4TQ9DX2W5/FBFYQKHT4wN/1295237.ts

Native logs

MediaPlayerUtils.cpp(113) isUriSchemeSecure
Got an insecure protocol/scheme http, return error

DefaultMediaPlayer.cpp(2009) openMedia
Invalid URI, return error

MediaPlayerImplLegacy.cpp(209) open open failed

The W3C media layer subsequently reports error code 4.

We also performed a controlled test using the same short TS file served from the development Mac:

  • Direct HTTP playback from the VVD fails, with no request reaching the Python HTTP server.
  • The same file plays successfully through an HTTPS Cloudflare Tunnel.

This indicates that HTTP is rejected before media parsing begins.

Could you please clarify:

  1. Is there a manifest permission, domain allowlist, or API setting to enable HTTP specifically for native VideoPlayer URL mode?
  2. Does network-traffic-policy.cleartext apply to native media playback, or only to WebView?
  3. Does the previously announced September HTTP fix cover native URL mode? Which exact OS build contains it, and should VVD build 102282480 include it?
  4. If this remains an issue, could you open or reopen a bug and provide a tracking reference?

Our production app needs HTTP MKV VOD and continuous raw MPEG-TS streams from user-configured IPTV providers whose server configuration we cannot change.

Thank you.

Hi @vipcreater,

Thank you for the follow-up and for the controlled test comparing the same file over HTTP and HTTPS. It’s very helpful for narrowing this down.

We’ve shared your findings and questions with our team, and we’ll provide an update on this thread as soon as we have more information.

In the meantime, if you have access to a physical Vega Fire TV device, it would help to know whether HTTP playback in URL mode fails there as well, along with the device’s OS version (cat /etc/os-release).

Thanks for helping us improve the Vega platform.

Warm regards,
Aishwarya

Hi Aishwarya,

I’m following up to see whether there have been any updates from the team regarding this issue.

I also have an important new finding: the issue does not appear to be limited to HTTP. I found that the same .ts

content also fails to play over HTTPS in URL mode.

Interestingly, when I extract and test the video stream and audio stream separately, each stream can be played

successfully. However, when the audio and video streams are muxed together in the .ts container, playback fails with

code=4.

This suggests that the problem may be related to handling multiplexed MPEG-TS content rather than the HTTP/HTTPS

transport itself.

Could you please let me know whether the team has made any progress or whether there are additional logs, media

information, or sample files that I can provide to help investigate?

Thank you for your help.

Warm regards,

vipcreater

Hi @vipcreater,

Thank you for the detailed follow-up and the controlled HTTP vs. HTTPS test. Our media team has confirmed the following.

1. Enabling HTTP for native VideoPlayer URL mode: Yes. HTTP (cleartext) playback in URL mode through the W3C Media APIs (@amazon-devices/react-native-w3cmedia) is controlled by the manifest entry you’re already using. HTTP is allowed only for the domains listed in it. To allow HTTP for all domains, which suits IPTV apps with user-configured providers, use the wildcard:

[network-traffic-policy.cleartext]

allowed-domains = ["*"]

You can also list specific domains instead, for example allowed-domains =["example.com"].

2. Does network-traffic-policy.cleartext apply to native media playback? Yes. In URL mode, the policy applies to native media playback through W3C Media, not only to WebView.

3. The HTTP fix and your OS build: Support for this policy in native URL-mode playback is included in Vega OS 2.0. Your Vega Virtual Device build (OS 1.2, build 102282480) doesn’t include it. That’s why URL mode still rejects HTTP with isUriSchemeSecure … insecure protocol/scheme http even though the manifest entry is in place.
The Vega Virtual Device image can lag behind retail OS releases. Please test on a physical Vega Fire TV device updated to Vega OS 2.0. To check the device’s software version, go to Settings → My Fire TV → About, or run cat /etc/os-release.

4. Tracking: The fix has already shipped in Vega OS 2.0, so there’s no separate bug to reopen. If HTTP URL playback still fails on 2.0, please share the device’s cat /etc/os-release output and a log capture around the failure, and we’ll investigate further.

5. Raw MPEG-TS live streams: Our media team has confirmed that continuous raw MPEG-TS live streams (an endless .ts URL with no manifest) are supported in URL mode. On Vega OS 2.0, with the cleartext entry above, you can play your HTTP .ts live URLs directly with videoPlayer.src = url. As before, wait for await videoPlayer.initialize() and call setSurfaceHandle() before you assign src.
On using allowed-domains = ["*"] in a production app: it’s technically supported, we’re confirming whether certification has any additional requirements for it.

Warm Regards,
Ivy

@vipcreater the new finding suggests the failure happens when the muxed MPEG-TS container is handled, not in the transport.

To narrow this down, could you share the following for one .ts file that fails over
HTTPS:

  1. Stream details: Please share the output of: ffprobe -hide_banner -show_streams -show_format <file>.ts
    We’re especially interested in the audio codec (for example AAC, AC-3/E-AC-3, or MP2), the video codec and profile/level, and whether the video is interlaced.

  2. The two working cases: Tell us how you extracted the video-only and audio-only streams (for example the ffmpeg command) and which container you played each one in, .ts or another format.

  3. Device and OS: Did this run on the Vega Virtual Device (OS 1.2) or a physical device? Please also test on a physical Vega Fire TV device updated to Vega OS 2.0 and include the output of cat /etc/os-release.

  4. Logs: Please send a log capture covering the failing attempt, including the W3CMEDIA and MEDIA_PLAYER lines around the code=4 error.

  5. Sample file: A short (10–30 s) clip of the failing muxed .ts that doesn’t contain account details.

If the audio track is AC-3, E-AC-3, or MP2, please try remuxing the same video with
AAC audio in .ts:
ffmpeg -i <file>.ts -c:v copy -c:a aac <file>-aac.ts
Then let us know whether that version plays. That will tell us whether a specific codec combination in TS is the cause.

Warm Regards,
Ivy

Hello, the issue has been resolved. It turned out that the version of the virtual device was indeed problematic. With the release of the latest 2.0 version on October 30th, I updated to the newest Vega SDK, and the problem is now fixed. Thank you.

Thanks for letting us know @vipcreater

Glad to hear the issue is fixed with Vega 2.0.
Happy developing!!

Warm regards,
Ivy