question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUFFER_APPEND_ERROR on Tizen with multiple codecs (AVC & HEVC)

See original GitHub issue

Hi RxPlayer team !

I have streams with mixed avc & hevc codecs with widevine protection.

The player try to switch between avc to hevc (or vice versa) but the video streams stop with the error Stream: video Stream crashed. Stopping playback. t: MediaError (BUFFER_APPEND_ERROR) Error: An unknown error occured when doing operations on the SourceBuffer

Is there a way to avoid switching between codecs ? I have tried transportOptions.representationFilter but at this stage I don’t have an overview of all representations to be able to avoid one or other codec. I have tried keySystems { onCodecSwitch: 'reload' }, no change

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
el-gringocommented, Jun 19, 2021

After investigation, the missing reloading issue is also because of mixing codecs in adaptation.

in get_adaptation_switch_strategy.ts

function hasCompatibleCodec(
  adaptation : Adaptation,
  segmentBufferCodec : string
) : boolean {
  return adaptation.getPlayableRepresentations().**some**(rep =>
    areCodecsCompatible(rep.getMimeTypeString(), segmentBufferCodec));
}

In my case the will be some representations with compatible codecs. So I still I have to clarify with the one in charge of streams. Right now, is more than busy ! So that’s not priority.

0reactions
peaBerberiancommented, Jun 18, 2021

I have to check with the one who create streams about adaptation-set-switching to avoid mixing AVC & HEVC in the same AdaptationSet

The fact that the RxPlayer merge all of those DASH AdaptationSet into one RxPlayer Adaptation is purely due to our implementation. What really is done by adding the supplemental adaptation-set-switching property is telling players that they can technically switch between all those AdaptationSet (e.g. with the player’s adaptive streaming logic).

The DASH-IF envisages your case (multiple codecs in multiple AdaptationSet all linked through an adaptation-set-switching supplemental property), so it’s not really an issue that needs to be fixed.

The real issue here is that some browsers does not handle that type of codec switching well. The RxPlayer thus might need to first “reload” before doing so (why it doesn’t work/doesn’t seem to reload here is another issue to look at as you noted).

From here, we’re not sure how to move forward, so that’s what we need to discuss in the RxPlayer team. For example, a solution might be to allow an application to tell the RxPlayer that is should keep those as several “tracks”/Adaptations so they cannot be switched between one another without an explicit setVideoTrack call.

Thanks for your time. For now the patch I pushed totally fit my needs. I know SmartTVs are a bit exotic 😉

Yes, they sometimes showed surprising behaviors! Though we tried to handle them better recently (from the end of last year).

Tizen is one of the TV platform we aim to fully support (the RxPlayer runs in production on them through the Canal+ application).

Read more comments on GitHub >

github_iconTop Results From Across the Web

2020 TV Video Specifications - Samsung Developers
2020 TV Video Specifications. Samsung Smart TV provides rich capabilities for video playback, using the available audio and video decoders.
Read more >
HEVC vs AVC: Which codec is right for you? - YouTube
Doing some live streaming? Then you've probably heard of HEVC (High Efficiency Video Coding) and AVC (Advanced Video Coding).
Read more >
How to enable Multi Codec Support for OTT ... - Bitmovin
With the Bitmovin API you can encode your content with different codecs like H.264/AVC, H.265/HEVC, VP8, VP9, and recently also AV1. Ultimately ...
Read more >
How to Efficiently Stream Multi-Codec Video | Brightcove
To make this more specific, let's consider an example of an encoding ladder, generated using two codecs: H.264/AVC and HEVC. Again, Brightcove CAE...
Read more >
AV1 or HEVC? How to choose the best video codec
Given the resolution limit of AVC, the availability of faster hardware and ... Next up, let's try to technically compare the two codecs....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found