Add native Dolby Vision & Atmos via AVPlayer
AVPlayer is currently the ONLY way to get Dolby Atmos and Dolby Vision working (properly) on iOS/tvOS. There is no other API.
AVPlayer does NOT require additional licensing by app devs to play Dolby.
It supports mp4 & hls natively but NOT mkv.
Infuse is currently the only app I’m aware of that can play mkv Dolby Vision & Atmos correctly.
I believe they demux the mkv and play compatible streams inside via AVPlayer likely via local hls playlist instead of remuxing the whole video to mp4
(This is probably why there’s a significant delay in infuse when starting playback of Dolby Atmos / Vision files).
Can KSPlayer do the same? Force Dolby files to play in AVPlayer…
我的app是可以播放 Dolby P5的。 infuse 是跟Dolby购买了Dolby Atmos and Dolby Vision 授权。
@kingslay
With the latest Tracy Player, Dolby Vision P8 works but I only get Dolby Multichannel (NOT Atmos).
To fix this, audio track needs to go directly via AVPlayer (NOT AVAudioEngine or AudioUnit).
AVPlayer supports:
- raw atmos ec3 stream (extracted from mkv)
- or mp4 files, complexity_index_type_a must be set in dec3 (EC3SpecificBox) atom
- or HLS stream, #EXT-X-MEDIA:CHANNELS="12/JOC" must be set in manifest
It would be amazing if you add another "Audio Player Type" = AVPlayer and clock sync that with the video renderer.
Thank you for your excellent work on this project.
I’m still really looking forward to native Atmos on ksplayer. (Possibly ec3 via avplayer)
It’s the only thing missing from ksplayer to make it the ultimate iOS framework!
I know Apple makes it difficult but I’m sure you can make it work eventually.
有一个解决方案可以做到用avplayer播放mkv。那就是把视频下载到本地,然后转为mp4格式。这样就可以用avplayer播放了。但是这样有两个问题,1. 需要等待视频进行下载完才可以播放。2. 会占用设备的硬盘大小,不大适合iOS和tvOS上使用。
@kingslay There is another way. We don't need to convert the entire mkv to mp4.
You can just extract the "audio.ec-3" track and play that separately using avplayer.
Try this: ffmpeg -i input.mkv -vn -sn -c copy audio.ec3
play audio.ec3 using avplayer. It works & TV will show Atmos logo.
Can we stream the ec-3 track separately to avplayer?
This video track will need to be played separately.