Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sarada
Visitor

play single big .ts mpeg-ts h264 file in roku

Hi,
i have single .ts file, which is large. Roku does not have feature to play such big file. it always tries to download full file before playing. and also RoKu does not support EXTINF HLS4 discontinuity option.
So, i need to write in m3u8 with minimum 3 .ts files.

I was trying to convert but download is failing with all options i tried for ffmpeg.

Could you please help how can i play this in roku or how can i convert this to m3u8.

Error below.

./ffmpeg -re -i http://ns3045782.ip-5-135-142.eu:8000/live/sYKADDaJs2/SnoQc6v4hZ/3900.ts[/url:2ozwiwsq] -c copy chun...
ffmpeg version N-63893-gc69defd Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 16 2014 05:38:01 with gcc 4.6 (Debian 4.6.3-1)
configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
libavutil 52. 89.100 / 52. 89.100
libavcodec 55. 66.101 / 55. 66.101
libavformat 55. 43.100 / 55. 43.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 8.100 / 4. 8.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Trailing options were found on the commandline.
Input #0, mpegts, from 'http://ns3045782.ip-5-135-142.eu:8000/live/sYKADDaJs2/SnoQc6v4hZ/3900.ts':
Duration: N/A, start: 37562.820100, bitrate: 179 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
, 25 fps, 25 tbr, 90k tbn, 50 tbc
/ 0x000F), 44100 Hz, stereo, fltp, 179 kb/s
Output #0, hls, to 'chunklist.m3u8':
Metadata:
encoder : Lavf55.43.100
, q=2-31, 25 fps, 90k tbn, 25 tbc
/ 0x000F), 44100 Hz, stereo, 179 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
for help
frame= 700 fps= 25 q=-1.0 Lsize=N/A time=00:00:28.00 bitrate=N/A
video:5604kB audio:444kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
0 Kudos
11 REPLIES 11
atc98092
Community Streaming Expert

Re: play single big .ts mpeg-ts h264 file in roku

Based on the ffmpeg information, this is not a local file, so I can guess that the Roku Media Player (which is what I'm assuming you are using to play it) wants to download the file before beginning playback. You might have better luck using a DLNA server to act as your supplier of the media, and let it stream the Internet file. That's the only successful method I've used for non-local files that are coming from the Internet. Serviio is one such server that can stream from the Internet and feed your player.
Dan

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee, just another user.
0 Kudos
Elijah_Baley
Visitor

Re: play single big .ts mpeg-ts h264 file in roku

"atc98092" wrote:
Based on the ffmpeg information, this is not a local file, so I can guess that the Roku Media Player (which is what I'm assuming you are using to play it) wants to download the file before beginning playback. You might have better luck using a DLNA server to act as your supplier of the media, and let it stream the Internet file. That's the only successful method I've used for non-local files that are coming from the Internet. Serviio is one such server that can stream from the Internet and feed your player.


I've had pretty good success with a good number of web based files using Plex's "Watch later" feature. However for that to work you have to have a Plex server setup and running on your network and you have to enable the "Plex it" feature in your browser. Once you have done that all you must do in navigate to the video in your browser and click the "Plex it" button and if it is a compatible video Plex will add it to your "Watch later" queue and then you can navigate to it in your Plex channel and play it just like a local video.
Two Roku Ultras, three Roku 3s and a Roku 1
"Part of the secret of success in life is to eat what you like and let the food fight it out inside." Mark Twain
Van Roy's Law: An unbreakable toy is useful for breaking other toys.
0 Kudos
RokuMarkn
Visitor

Re: play single big .ts mpeg-ts h264 file in roku

Roku never downloads a whole file before playing it. It has no place to put that much data. And it does support the #EXT-X-DISCONTINUITY m3u8 tag, if that's what you mean by "discontinuity option".

--Mark
0 Kudos
sarada
Visitor

Re: play single big .ts mpeg-ts h264 file in roku

@RokuMarkn Team,
I have written my own application video player using brightscript example simlevideoplayer.

if roku supports #EXT-X-DISCONTINUITY m3u8 tag option then why below is not working. I am using roku 2 latest version box.
Please tell why below is not working. I want to play this live HLS ts single file, please help how can i play. Below i tried but not working.

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-MEDIA-SEQUENCE:444
#EXT-X-DISCONTINUITY-SEQUENCE:444
#EXT-X-DISCONTINUITY
#EXTINF:1.337,
http://ns3045782.ip-5-135-142.eu:8000/l ... hZ/3900.ts
0 Kudos
sarada
Visitor

Re: play single big .ts mpeg-ts h264 file in roku

@atc98092, @Elijah_Baley,
I want to play directly this HLS .ts file in my roku simplevideoplayer application.
I am developing a application to play HLS stream, but unable to play only this single .ts file.

Please tell me how to play.
http://ns3045782.ip-5-135-142.eu:8000/l ... hZ/3900.ts

as unable t play directly, while converting to m3u8, It is downloading for few seconds and then got error.
Please help. Anyway to play this single .ts HLS stream file.
0 Kudos
belltown
Roku Guru

Re: play single big .ts mpeg-ts h264 file in roku

"sarada" wrote:

I want to play directly this HLS .ts file in my roku simplevideoplayer application.
I am developing a application to play HLS stream, but unable to play only this single .ts file.

Please tell me how to play.
http://ns3045782.ip-5-135-142.eu:8000/l ... hZ/3900.ts

as unable t play directly, while converting to m3u8, It is downloading for few seconds and then got error.
Please help. Anyway to play this single .ts HLS stream file.

You can't. It's not an HLS stream, just a single segment file. You need the manifest file (.m3u8) for the live stream. You can't convert a .ts file into a .m3u8 file.
0 Kudos
sarada
Visitor

Re: play single big .ts mpeg-ts h264 file in roku

"belltown" wrote:
"sarada" wrote:

I want to play directly this HLS .ts file in my roku simplevideoplayer application.
I am developing a application to play HLS stream, but unable to play only this single .ts file.

Please tell me how to play.
http://ns3045782.ip-5-135-142.eu:8000/l ... hZ/3900.ts

as unable t play directly, while converting to m3u8, It is downloading for few seconds and then got error.
Please help. Anyway to play this single .ts HLS stream file.

You can't. It's not an HLS stream, just a single segment file. You need the manifest file (.m3u8) for the live stream. You can't convert a .ts file into a .m3u8 file.


The .ts file is a mpegts live streaming file. any way to convert to m3u8 using ffmpeg command.
0 Kudos
RokuDale
Visitor

Re: play single big .ts mpeg-ts h264 file in roku

There are a couple different ways to play it.
Easiest for me was to create a test.m3u file on a usb stick and put that link in there and let rmp play it.
Easiest for you is to probably just make sure you set the streamformat to "ts" and play it.
rokudale
0 Kudos
sarada
Visitor

Re: play single big .ts mpeg-ts h264 file in roku

"RokuDale" wrote:
There are a couple different ways to play it.
Easiest for me was to create a test.m3u file on a usb stick and put that link in there and let rmp play it.
Easiest for you is to probably just make sure you set the streamformat to "ts" and play it.
rokudale



Hi RokuDale,
when i tried to run by changing streamformat, it is playing only few seconds 20 or 30 seconds and then exiting automatically with below error.
I am using samplevideoplayer example.


XML File:

<item sdImg="http://justdramaz.weebly.com/uploads/2/4/3/4/24340498/7241174.jpg" hdImg="http://justdramaz.weebly.com/uploads/2/4/3/4/24340498/7241174.jpg"><title>Live StarPlus TV Channel</title><contentId>19</contentId><contentType>movie</contentType><contentQuality>HD</contentQuality><live>true</live><streamFormat>ts</streamFormat><media><streamQuality>HD</streamQuality><streamBitrate>0</streamBitrate><streamUrl>http://ns3045782.ip-5-135-142.eu:8000/live/sYKADDaJs2/SnoQc6v4hZ/3900.ts</streamUrl></media><synopsis>StarPlus</synopsis><genres>StarPlus</genres><runtime>0</runtime></item>


Console error log:

showHomeScreen | msg = Stream started. | index = 0
Unexpected event type: 20
showHomeScreen | msg = Format Detected | index = 1
Unexpected event type: 33
showHomeScreen | msg = | index = 0
showHomeScreen | msg = An unexpected problem (but not server timeout or HTTP error) has been detected. | index = -3
Video request failure: -3 0
showHomeScreen | msg = | index = 0
Screen closed
Button pressed: 2 0
0 Kudos