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.

Extracting the players codec at a particular instance in time

See original GitHub issue

Have you read the Tutorials? Yes

Have you read the FAQ and checked for duplicate open issues? Yes

What version of Shaka Player are you using? v3.0.2

Please ask your question Looking to extract the codec the player is using at a given instance in time for telemetry event purposes. Is there a function or event that can help achieve this?

  • getStats() seemed to be useful at first glance but unfortunately contains no info about the current codec.
  • There’s the shaka.Player.StreamingEvent, although for our purposes it would be counter intuitive to parse an event in order to fire off an other event.
  • There’s the Stream object, however this contains a list of codecs not the current one being used.

Any help would be greatly appreciated - please let me know if I’m overlooking anything.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TheModMakercommented, Sep 2, 2020

Actually looking over our definitions, I don’t know why the codecs field would be an array, it should be a string. In the Track definition, it will have two codecs (e.g. vp09,opus), for audio+video; but there is also the audioCodec/videoCodec fields.

1reaction
TheModMakercommented, Sep 2, 2020

We don’t support codec switching, so the array will only contain one kind of codec. They may have different profiles, but they should have the same base codec. You should use player.getVariantTracks() to get the tracks, the codecs field will have the array of codecs. Unfortunately due to Period flattening, there is no way to determine which is being used.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extracting the players codec at a particular instance in time
Looking to extract the codec the player is using at a given instance in time for telemetry event purposes. Is there a function...
Read more >
Disable/enable codec drivers and DirectShow filters installed ...
InstalledCodec extract the information from 2 places in the Registry: The Codec drivers list is loaded from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\ ...
Read more >
VLC HowTo/Extract audio - VideoLAN Wiki
VLC can extract audio from any of the many input sources it supports, and write this audio to an audio-file in a variety...
Read more >
How to Fix Eac3 Not Supported in MX Player Error ... - YouTube
Solution 2: Manually Add Custom Codecs In some cases, MX Player may ... Step 2: Click “Add” and select the specific file that...
Read more >
Codecs FAQ - Microsoft Support
While the file is playing, right-click the file in the library, and then select Properties. On the File tab, look at the Audio...
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