kaltura / nginx-vod-module

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

Dolby Vision support #765

Open mazanov opened 6 years ago

mazanov commented 6 years ago

Hello! Is it possible to add Dolby Vision and Dolby Atmos support for streaming in HLS and DASH?

erankor commented 6 years ago

Can you provide sample MP4 + sample HLS/DASH streams that use these codecs? If so, I can check it out and estimate the amount of work. Also, on which devices are you planning to play it?

mazanov commented 6 years ago

Test video from LG with Dolby Vision and Dolby Atmos: https://drive.google.com/file/d/0Bxj6TUyM3NwjUkZuZ3VpaHRRZlk/view (rename to .mp4) At this moment we do not have sample HLS/DASH streams, looking for them. docs: https://www.dolby.com/us/en/technologies/dolby-vision/dolby-vision-streams-within-the-mpeg-dash-format-v1.1.pdf We need to stream to iOS in HLS (ipad pro, iphone x, apple tv 4k) and in DASH to all smart TVs with Dolby Vision support (for now it's LG TVs 2017 year and later)

erankor commented 6 years ago

I looked at this file -

  1. Audio is ec-3, it is already supported, plays on my iPhone as is
  2. Video has dvhe tag, it should be changed to dvh1 to play on Apple devices, I changed it with a few lines of python -
    d = file('input.mp4','rb').read()
    d2 = d.replace('dvhe','dvh1')
    file('output.mp4','wb').write(d2)

    Other than that, the code needs to be changed to allow this tag - I pushed it to branch add-dva1-dvh1-tags, please try it out. Following these changes, it still doesn't play on my iPhone, but I think my iPhone is just not new enough...

erankor commented 6 years ago

@mazanov, did you try it out?

tim-lansen commented 6 years ago

@erankor it doesn't work for dolby vision tv (LG) the tv rejects patched file and DASH Also we have to supply correct tag "codecs", for the sample above it must be "dvhe.05.09" (as dolby says) In other hand, DASHIF standard http://dashif.org/wp-content/uploads/2017/09/DASH-IF-IOP-v4.1-clean.pdf wanna see literal value "dvhe.stn.uhd60" in our case.

erankor commented 6 years ago

@tim-lansen, do you have a DASH sample that plays on this device?

tim-lansen commented 6 years ago

@erankor speaking about dolby vision - no, we're working on it )

FMW-NAmorim commented 6 years ago

In the latest DashIF reference player there's a test vector for Dolby Vision dual layer.

http://dash.edgesuite.net/dash264/TestCasesMCA/dolby/6/DashIf-HDR10_UHD.mpd

Since you are at it, why not support all the HDR flavours?

VanBur commented 5 years ago

Hello! You can get samples from here: https://developer.dolby.com/tools-media/sample-media/video-streams/dolby-vision-streams/

Also, you can make DolbyVision stream (HLS/DASH) from DolbyVision mp4 file with Bento4 (tested on Bento4 version 1.8.0-628) For fragmented mp4 you can use this command: mp4fragment --fragment-duration <DURATION> --copy-udta <INPUT> <OUTPUT> To create HLS/DASH you can use this command: mp4dash --use-segment-list --use-segment-timeline --hls -o <OUTPUT_DIR> <INPUT> In "OUTPUT_DIR" you will find HLS+DASH streams. Streams tested on LG OLED55B8 - works fine.

I hope it will help to implement DolbyVision/DolbyAtmos

mazanov commented 3 years ago

@erankor hi! I think it’s time to raise this topic =) Any news? We got test mp4 files and self-made dash streams in DV. I can share them if you need. Target devices are Lg and Android Smart TV’s and all Apple’s that support DV.

flavioribeiro commented 3 years ago

@mazanov I guess we are in a good path on https://github.com/kaltura/nginx-vod-module/pull/1043, but still would need to apply some changes on the data manipulation as per @erankor 's comment in that PR. I wish I had the time to work a bit more on it, but I'm wondering if you could help bring that to completion?

erankor commented 2 years ago

It took a while :) but support for Dolby Vision is now merged - #1366 We validated dvh1 plays on Mac/Safari, but couldn't find a dva1 sample. If anyone has such a sample, please give it a try... Thanks!