shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
239 stars 62 forks source link

Unsupported content when playing video with avc1.4d0028 codec profile from MPEG-DASH. #159

Open itsmefreitas opened 3 years ago

itsmefreitas commented 3 years ago

Currently, it is impossible to play mpeg-dash segments with the mentioned profile in ShakaPlayerEmbedded.

This suggests to be an error related to the framework building process as I have been able to stream from MPEG-DASH with the same codec and profile combination before in a demo iOS app and the problem has not always manifested.

After taking a thorough look at all the available documentation, I have not found myself close to a solution or even a possible explanation for this.

Other profiles such as avc1.4d0020 seem to work just fine.

Is there anything I am missing?

TheModMaker commented 3 years ago

The codec string contains the profile, which is used to determine the capabilities of the device. The higher profile requires a faster device to decode the content. We pass the profile to the device to ask it if it can play the content. It is possible the device doesn't support that profile. If I force the codec string to use that profile, it works fine; so it is either specific to your content, or your device.

In terms of builds, you should try cleaning everything out and trying from scratch. We have made a bunch of changes in the last few months, so old files may be confusing things.

Also, could you send a manifest URL that reproduces your problem? You can send it privately to shaka-player-issues@google.com if you prefer.

itsmefreitas commented 3 years ago

Hello @TheModMaker, it seems I was compiling it against the wrong version of the CDM and that was what caused the problem.

On the other hand, I seem to be running into another similar problem with HLS streams (even ones not protected by DRM) where my application will just crash on a real device (with appropriately compiled frameworks) and which does not happen on simulator.

Playing any sort of HLS content results in my application unexpectedly quitting, with or without a debugger attached.

This stream, for example, makes my application immediately crash when attempting to play is, whereas playing MPEG-DASH content appears to be fine.

TheModMaker commented 3 years ago

Are you using the latest master? Could you provide a stack trace?

itsmefreitas commented 3 years ago

Hello again @TheModMaker, I erred on the comparison method I was using for the variant data, since in case of an HLS stream, the videoCodec value for all variants is coming up as null and I was comparing it as ![variant.videoCodec isEqual:nil] which is obviously wrong, since the pointer to the (possibly null) string exists anyway.

Since we’re discussing variants, I am facing a problem where I can’t get the captions/subtitles to show on my view even when setting player.closedCaptions = YES and performing a selection on the appropriate text track.

For this last problem I mention, it seems as though the corresponding text CALayer never gets drawn on the screen. Is this perhaps because I have the player view wrapped in another superview?

EDIT: Yes, I am using the latest master, I have actually checked that today.

itsmefreitas commented 3 years ago

Any updates on my last comment, @TheModMaker?