3

I am trying to implement trick mode for our VoDs on Roku. I have followed their guide for HLS here: https://developer.roku.com/en-gb/docs/developer-program/media-playback/trick-mode/hls-and-dash.md

I see my playlist get updated with the EXT-X-IMAGE-STREAM-IN:

#EXTM3U
#EXT-X-VERSION:7
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio_0",NAME="main",DEFAULT=YES,AUTOSELECT=YES,URI="a/3000/chunklist_audio_1611173953675_1611174576175.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=3000000,CODECS="avc1.640020,mp4a.40.2",RESOLUTION=1280x720,AUDIO="audio_0"
a/3000/chunklist_1611173953675_1611174576175.m3u8
#EXT-X-IMAGE-STREAM-INF:BANDWIDTH=311040,RESOLUTION=480x270,CODECS="jpeg",URI="media_playlists/media_playlist_480x270_1611173953675_1611174576175.m3u8"

As you can see, the playlist points to media_playlists/media_playlist_480x270_1611173953675_1611174576175.m3u8 which exists with this content:

#EXTM3U
#EXT-X-TARGETDURATION:1000
#EXT-X-VERSION:7
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-IMAGES-ONLY
#EXTINF:1000.000
#EXT-X-TILES:RESOLUTION=480x270,LAYOUT=10x10,DURATION=10.000
../images/tiles_480x270_1611173953675_1611174576175_0001.jpg
#EXT-X-ENDLIST

And I've confirmed the image exists at the location pointed to above.

I'm stumped because I do not have any visibility into the requests being made by the Stream/RAF tester tool, so I do not know what request might be failing.

When I play the video on the test channel, it plays fine, so I know the HLS is working as expected. However, when I try to seek while the video is playing, the thumbnails do not show and the scrubber stays at the starting position.

Any advice would be greatly appreciated - especially if there is a way to see logging from the stream/raf testing tool!

Justin Kruse
  • 1,020
  • 12
  • 27

2 Answers2

2

Hi I am facing a similar issue with DASH which behaves similarly you are describing with the scrubber position suck at 0.

I cannot tell why your scrubbing is not working. As far as

Any advice would be greatly appreciated - especially if there is a way to see logging from the stream/raf testing tool!

One way to go would be adding a proxy server between the test channel and your remote endpoint where the video stream is published. I wrote a simple proxy in GO. Here is the code https://play.golang.org/p/-EA8bVt75cG I deployed the server locally on localhost:8998 in my example code. Then in the stream tester request replace your host:port with localhost:8998. The proxy will forward requests from Roku player to the stream-publish-host and log all the details.

Now I can see all trickplay requests/responses.

2021/02/15 19:44:46 RquestUri /live/dev/trickplay/trickplay/1613433254/thumbnails-1727.jpeg
2021/02/15 19:44:46 New RquestUri http://myhost.com:80/live/dev/trickplay/trickplay/1613433254/thumbnails-1727.jpeg
Header field "User-Agent", Value ["Roku/DVP-9.40 (509.40E04200A)"]
Header field "Accept", Value ["*/*"]
2021/02/15 19:44:46 10.0.0.15:50536   200 OK
2021/02/15 19:44:46 Remote Address 10.0.0.15:50521 
2021/02/15 19:44:46 RquestUri /live/dev/trickplay/trickplay/1613433254_video_288p-30fps-350k/video_1865.ts
2021/02/15 19:44:46 New RquestUri http://myhost.com:80/live/dev/trickplay/trickplay/1613433254_video_288p-30fps-350k/video_1865.ts
Header field "User-Agent", Value ["Roku/DVP-9.40 (509.40E04200A)"]
Header field "Accept", Value ["*/*"]
2021/02/15 19:44:46 10.0.0.15:50521   200 OK
2021/02/15 19:44:46 Remote Address 10.0.0.15:50523 
2021/02/15 19:44:46 RquestUri /live/dev/trickplay/trickplay/1613433254_video_288p-30fps-350k/video_1866.ts
2021/02/15 19:44:46 New RquestUri http://myhost.com:80/live/dev/trickplay/trickplay/1613433254_video_288p-30fps-350k/video_1866.ts
Header field "User-Agent", Value ["Roku/DVP-9.40 (509.40E04200A)"]
Header field "Accept", Value ["*/*"]
2021/02/15 19:44:46 Remote Address 10.0.0.15:50537 
2021/02/15 19:44:46 RquestUri /live/dev/trickplay/trickplay/1613433254/thumbnails-1728.jpeg
2021/02/15 19:44:46 New RquestUri http://myhost.com:80/live/dev/trickplay/trickplay/1613433254/thumbnails-1728.jpeg
Header field "User-Agent", Value ["Roku/DVP-9.40 (509.40E04200A)"]
Header field "Accept", Value ["*/*"]
2021/02/15 19:44:46 10.0.0.15:50523   200 OK
2021/02/15 19:44:46 10.0.0.15:50537   200 OK
2021/02/15 19:44:47 Remote Address 10.0.0.15:50535 
2021/02/15 19:44:47 RquestUri /live/dev/trickplay/trickplay/1613433254/thumbnails-1729.jpeg
2021/02/15 19:44:47 New RquestUri http://myhost.com:80/live/dev/trickplay/trickplay/1613433254/thumbnails-1729.jpeg
Header field "Accept", Value ["*/*"]
Header field "User-Agent", Value ["Roku/DVP-9.40 (509.40E04200A)"]
2021/02/15 19:44:47 10.0.0.15:50535   200 OK
2021/02/15 19:44:47 Remote Address 10.0.0.15:50538 
2021/02/15 19:44:47 RquestUri /live/dev/trickplay/trickplay/1613433254/thumbnails-1730.jpeg
2021/02/15 19:44:47 New RquestUri http://myhost.com:80/live/dev/trickplay/trickplay/1613433254/thumbnails-1730.jpeg
Header field "User-Agent", Value ["Roku/DVP-9.40 (509.40E04200A)"]
Header field "Accept", Value ["*/*"]
2021/02/15 19:44:47 10.0.0.15:50538   200 OK
2021/02/15 19:44:47 Remote Address 10.0.0.15:50536 
2021/02/15 19:44:47 RquestUri /live/dev/trickplay/trickplay/1613433254/thumbnails-1731.jpeg
allap
  • 666
  • 6
  • 6
  • You can see in the log snippet that trickplay was working. – allap Feb 16 '21 at 17:35
  • Update: In my case, the DASH playlist had an error and did not agree with the Spec. It's been fixed and trickplay is working now. – allap Feb 17 '21 at 23:03
0

I don't have an exact answer, but we have some clues and a resolution.

I did exactly what @allap described but with python's SimpleHTTPServer and pointed the stream tester to my IP (not my localhost). We found that the media/trickplay playlist wasn't event getting requested. When we removed the reference to it from the playlist OR made the media playlist 404, scrubbing worked just fine. Obviously there were no thumbnails for trick mode.

I started with a tiled image with a layout of 10x10 and each tile a resolution of 480x270. We bumped this down to 5x5 and it worked! ...On my tv with a new Roku device. It did not work on an older Roku device, nor did it work on a TCL Smart Tv. We bumped the layout down to 5x2, and it worked on the TCL. We had to drop the resolution down to 320x180 for it to work on the older Roku device.

TL;DR; if scrubbing breaks when introducing trickplay to your playlist, try reducing the layout of the tiled image archive file (if you are using tiles) and/or drop the resolution for the media playlist. I assume increasing the interval may help as well (we started with 10 seconds, increasing this would mean fewer images, thus fewer requests).

Justin Kruse
  • 1,020
  • 12
  • 27
  • From Roku Spec https://developer.roku.com/en-gb/docs/developer-program/media-playback/trick-mode/hls-and-dash.md: ```The maximum valid LAYOUT will depend on RESOLUTION and the maximum valid pixel dimensions allowed by the compressed graphic image format.``` I wish Roku were more specific. – allap Feb 17 '21 at 08:16
  • 1
    Found image size limitations in the same spec https://developer.roku.com/en-gb/docs/developer-program/media-playback/trick-mode/hls-and-dash.md for DASH `the maximum tile width or height pixel limit is 4,096 (4K X 4K) for high-end devices and 2,048 (2K by 2K) for low-end devices.` @Justin Kruse With your initial resolution and layout the values were 4800x2700, which is outside the limit. I think the same limitations apply to HLS. – allap Feb 17 '21 at 21:54
  • @allap - can you modify your answer with this? I'll mark it as the answer! – Justin Kruse Mar 04 '21 at 23:30