This is an UDP Stream Player project mainly targeting Samsung Hospitality TVs, but it probably works on other Samsung devices running Tyzen 6 or later OS.
This project is the result of a collaborative effort to resolve a critical compatibility issue where AVPlay UDP streams function correctly on Tizen 3 but fail on Tizen 6 Hospitality TVs. The technical background and discussion for this fix can be found in this Spiceworks community thread.
This is a work in progress. As of Jun 17, 2026 playimg RTP Streams have not been tested.
HTVUDPSPlayer/
├── index.html — App entry point; loads avplayextension.js
├── config.xml — Tizen manifest with required privileges
├── js/app.js — Player logic and remote-control handling
├── css/style.css — HUD overlay styles (1920×1080)
└── icon.png — (add your own 117×117 PNG)
-
Edit your channel list in
js/app.js:var CHANNELS = [ { name: 'Channel 1', url: 'udp://@239.193.133.5:5000' }, { name: 'Channel 2', url: 'rtp://@235.1.1.3:5004' }, ];
-
Package and deploy via Tizen Studio:
- Import the folder as a Tizen Web project
- Set the target device to your Hospitality TV
- Run
Project → Build Signed Packagewith a Partner-level certificate - Deploy via Run As → Tizen Web Application
| Requirement | Detail |
|---|---|
| API | Player object is webapis.avplay; UDP/RTP support is enabled by loading avplayextension.js |
| Script tag | Load both $WEBAPIS/webapis/webapis.js and $WEBAPIS/avplayextension/avplayextension.js |
| Privilege | streamingtvplayer (partner-level) declared in config.xml, signed with a partner-level certificate — required for UDP/RTP |
| URL format | udp://@IP:Port — the @ joins the multicast group; rtp://@IP:Port for RTP |
| Network | Wired ethernet only — Wi-Fi does not support multicast |
| Multicast range | Samsung docs: use 234.0.0.0–238.255.255.255; do NOT use 224.x.x.x or 239.x.x.x. In our tests 239.x.x.x also worked (confirmed 239.193.133.5) |
| Sync byte | Each UDP packet must start with 0x47 |
| IGMP | Network switch must support IGMPv2 or newer |
| Bandwidth | Switch/router must handle ≥80 Mbps |
| Container | MPEG-TS only |
You can produce a compatible multicast stream from any file with FFmpeg. A stream
that plays in ffplay/VLC is not proof it will play on the TV — those are
software players and tolerate loose muxing. The Samsung hardware IPTV decoder is
stricter: it needs a near-constant bitrate, PAT/PMT tables resent frequently (so a
set joining mid-stream locks on quickly), and an I-frame soon after join.
The
@is receiver-side only. FFmpeg sends toudp://IP:Portwithout the@. The@belongs only in the app'sCHANNELSlist (udp://@IP:Port), where it means "join this multicast group." Same IP and port on both sides.
Recommended command (hardened version of the basic -f mpegts output):
ffmpeg -stream_loop -1 -re -i myvideo.mp4 \
-c:v mpeg2video -s 1920x1080 -r 25 -pix_fmt yuv420p \
-b:v 4M -minrate 4M -maxrate 4M -bufsize 2M -g 25 \
-c:a mp2 -b:a 192k -ar 48000 -ac 2 \
-f mpegts -muxrate 6M -mpegts_flags +resend_headers -pat_period 0.1 \
-flush_packets 0 \
"udp://238.1.2.3:9999?pkt_size=1316&ttl=8"Then, in js/app.js, the matching channel entry is (note the @):
{ name: 'Test', url: 'udp://@238.1.2.3:9999' }| Flag | Why it matters to the TV decoder |
|---|---|
-pix_fmt yuv420p |
Forces 4:2:0; some hardware decoders reject 4:2:2 |
-b:v 4M -minrate 4M -maxrate 4M |
Constant video bitrate (CBR) — hardware IPTV decoders dislike VBR |
-g 25 |
One I-frame per second (at 25 fps) so the TV can start decoding shortly after joining |
-muxrate 6M |
Emits a CBR transport stream (pads with null packets); must exceed video + audio + overhead |
-mpegts_flags +resend_headers |
Resends PAT/PMT on every key frame so a mid-stream joiner gets tables quickly |
-pat_period 0.1 |
Sends PSI tables every 100 ms |
pkt_size=1316 |
7 × 188-byte TS packets per UDP datagram, so every packet starts with sync byte 0x47 |
ttl=8 |
FFmpeg multicast defaults to ttl=1, which never crosses a router — raise it if the TV is not on the same subnet |
-f mpegts |
MPEG-TS container (required) |
If it still fails, isolate the layer using the app's error overlay:
PLAYER_ERROR_NOT_SUPPORTED_FORMAT points at the encode (codec/container), while
PLAYER_ERROR_CONNECTION_FAILED points at the network (TTL, wired link, IGMP
snooping, or the address range — see Critical requirements).
| Key | Action |
|---|---|
| PLAY | Play current channel (or retry on error) |
| STOP | Stop playback |
| ◄ / ► | Previous / next channel |
| BACK | Exit app |
PLAYER_ERROR_NOT_SUPPORTED_FORMAT
- Confirm
avplayextension.jsis loaded sowebapis.avplayaccepts UDP/RTP URLs - Verify the stream is MPEG-TS with sync byte
0x47 - Check the codec is MPEG-2 Video or H.264 (H.265 requires separate check)
PLAYER_ERROR_CONNECTION_FAILED
- Confirm TV is on a wired connection
- Verify the multicast address (iSamsung docs recommend
234–238.x.x.xbut239.x.x.xworked in our tests) - Confirm the URL uses the
udp://@IP:Portform - Check the network switch has IGMP snooping enabled
- Confirm the stream is actively broadcasting before the TV tries to join
SecurityException / "Player setup error" on player.open()
- Declare the
streamingtvplayerprivilege (partner-level) inconfig.xml - Sign the package with a Samsung partner-level certificate — a public author/distributor certificate is not sufficient for UDP/RTP AVPlay
AVPlayExtension not available
- The TV model may not have the IPTV hardware decoder
- Check the engineering menu:
Option → MRT Option → Option NumIf there is no "Num of IPTV" entry, the hardware is absent and UDP will not work
- Original work Copyright 2021 Samsung Electronics Co., Ltd
- Modified work Copyright 2026 Jose A. Diaz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
See LICENSE.txt for full details.