Nguyễn Việt Anh
Nguyễn Việt Anh

Reputation: 57

Stream HLS (Android) to DLNA clients on LAN

Currently, I want to stream a movie which are TS files in a m3u8 playlist format from my Android smartphone to on-LAN DLNA supported clients (such as my Samsung TV).

I had search but could not find any good starting point.

Any helps would be appreciated!

Upvotes: 4

Views: 1221

Answers (1)

For android gui you can use DLNA Server or something that can stream playlist contents to DLNA-enabled devices. Basically it perform actions, that can be done by hands:

  1. Download and parse m3u8, then download ts segments (m3u8-dln)
  2. (optional) Transcode chunks to A/V format known to TV. For my Samsung I use ffmpeg -vcodec libx264 -profile:v main -level 3.1 -preset medium -crf 23 -x264-params ref=4 -acodec mp3 -movflags +faststart . Your best settings may differ.
  3. Glue chunks to stream (ffmpeg -f concat -c copy)
  4. Cast result to DLNA enabled TV (dlnanow)
  5. Repeat from 1 - you'll get new m3u8 with next chunks. Do it in a streaming way, not step-by-step. Also you can take a look at Peerflix, it also can play to dlna/chromecast/airplay TVs.

Happy casting!

Upvotes: 0

Related Questions