kaltura / nginx-vod-module

NGINX-based MP4 Repackager
GNU Affero General Public License v3.0
1.96k stars 433 forks source link

Video streaming on smart TV #976

Open Khelleos opened 5 years ago

Khelleos commented 5 years ago

Hello,

We are trying to stream drm content on Smart TVs like LG WebOS 3.5, WebOS 2.5, Netcast and Orsay.

We use MSS+playready and our manifest contains various bitrates like LD, SD, HD, FHD. We have faced with the following isssues: 1) Video is hanged when a video player switches between bitrates 2) Lost of sound fragment

We have default nginx-vod-module config

vod mss;

vod_drm_upstream_location /drmsrv;
vod_drm_request_uri "/streamer/drm/playready";
vod_drm_enabled on;

vod_align_segments_to_key_frames on;
vod_manifest_segment_durations_mode accurate;

add_header Access-Control-Allow-Headers '*';
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range';
add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
add_header Access-Control-Allow-Origin '*';

Could you please advice our config is correct or we should add some parameter special for Smart TV?

As well we don't have these issues when we use player from bitmovin and jwplayer via browser Microsoft Edge.

erankor commented 5 years ago

Most probable cause is that the keyframes are not perfectly aligned across the different renditions. In our platform, we are forcing a keyframe every 2 seconds, and we always use a segment duration that is a multiple of 2 seconds. This makes every segment start at exactly the same timestamp across the different renditions.

Khelleos commented 5 years ago

How can we force a keyframe every 2 seconds in nginx-vod-module? How can we determine a multiple of 2 seconds?

erankor commented 5 years ago

You need to do it when you transcode the renditions, if you use ffmpeg, you can add something like - -force_key_frames expr:'gte(t,n_forced*2)'