Open joaodordio opened 4 months ago
Thank you very much for the remark about codec compatibility. Will look into it - especially to have better testing for this.
Regarding your first remark about (videoCodec?.isNativelyPlayable ?? true) && (audioCodec?.isNativelyPlayable ?? true)
:
If videoCodec
is nil, this means that there is no video in this stream. E.g. an audio-only mp3 stream would have videoCodec = nil
, but would still be very much playable in AVPlayer.
@joaodordio follow-up question regarding codecs. Can you maybe provide me with a sample YouTube video that has 42001E streams. I only get 4D401F and 4D4020 - and they seem to work. Also did you know of any docs about this codec compatibility on tvOS?
@joaodordio follow-up question regarding codecs. Can you maybe provide me with a sample YouTube video that has 42001E streams. I only get 4D401F and 4D4020 - and they seem to work. Also did you know of any docs about this codec compatibility on tvOS?
You can try this one: https://www.youtube.com/watch?v=g8YXqBlXuoc&list=PLQGn5u8-Sq2KsjnhjZztLCzjZL4hEPhNc&index=2
Thanks. I was able to get at least one 42001E stream now, but the stream was playable on the tvOS Simulator (I don't own a real one). Up to this point, the simulator has always matched the codec compatibility with the real device, so I'm not 100% sure. Also, I couldn't find anything hinting at any incompatibility - one Stack Overflow article even insinuated it works for them.
So my question is: Did you test it on a real tvOS device or in the Simulator? And if it was a real one, could you maybe test it on the Simulator and tell me if playback works for you or not?
On the
Stream
model, theisNativelyPlayable
flag is returningtrue
even if thevideoCodec
or theaudioCodec
arenil
.A better default value would be
false
.Additionally, the video codec AVC1: 42001E is not compatible with the Apple TV platform, only the AVC1: 64001F.
AVC1: 42001E Stream:
AVC1: 64001F Stream:
Right now my implementation to filter the streams for playback on Apple TV using AVPlayer, looks like this: