Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No decoders for requested formats: video/mp2t #939

Closed
JyotirmoyGoswami opened this issue Jul 21, 2017 · 7 comments
Closed

No decoders for requested formats: video/mp2t #939

JyotirmoyGoswami opened this issue Jul 21, 2017 · 7 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@JyotirmoyGoswami
Copy link

JyotirmoyGoswami commented Jul 21, 2017

Have you read the FAQ and checked for duplicate issues:
yes
What version of Shaka Player are you using:
2.1.5
Can you reproduce the issue with our latest release version:
yes
Can you reproduce the issue with the latest code from master:
yes
Are you using the demo app or your own custom app:
yes
If custom app, can you reproduce the issue using our demo app:
yes
What browser and OS are you using:
linux
What are the manifest and license server URIs:
(you can send the URIs to [email protected] instead, but please use GitHub and the template for the rest)

What did you do?

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8"/>
	<title>test</title>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/2.1.5/shaka-player.compiled.js"></script>
</head>
<body>
	<video id="video"
           width="640"
           poster="//shaka-player-demo.appspot.com/assets/poster.jpg"
           controlsautoplay></video>
	<script type="text/javascript">
		var manifestUri = 'https://d2kuunkpom51e4.cloudfront.net/ultra/HLSv3/sampleHlsmanifest.m3u8';

function initApp() {
  // Install built-in polyfills to patch browser incompatibilities.
  shaka.polyfill.installAll();

  // Check to see if the browser supports the basic APIs Shaka needs.
  if (shaka.Player.isBrowserSupported()) {
    // Everything looks good!
    initPlayer();
  } else {
    // This browser does not have the minimum set of APIs we need.
    console.error('Browser not supported!');
  }
}

function initPlayer() {
  // Create a Player instance.
  var video = document.getElementById('video');
  var player = new shaka.Player(video);

  // Attach player to the window to make it easy to access in the JS console.
  window.player = player;

  // Listen for error events.
  player.addEventListener('error', onErrorEvent);

  // Try to load a manifest.
  // This is an asynchronous process.
  player.load(manifestUri).then(function() {
    // This runs if the asynchronous load is successful.
    console.log('The video has now been loaded!');
  }).catch(onError);  // onError is executed if the asynchronous load fails.
}

function onErrorEvent(event) {
  // Extract the shaka.util.Error object from the event.
  onError(event.detail);
}

function onError(error) {
  // Log the error.
  console.error('Error code', error.code, 'object', error);
}

document.addEventListener('DOMContentLoaded', initApp);
	</script>

</body>
</html>

What did you expect to happen?
expected to play as said fixed in version 2.1.2
#805

What actually happened?
Cannot play media. No decoders for requested formats: video/mp2t; codecs="mp4a.40.5", video/mp2t; codecs="avc1.42001e mp4a.40.2", video/mp2t; codecs="avc1.42001e mp4a.40.2", video/mp2t; codecs="avc1.4d001f mp4a.40.2", video/mp2t; codecs="avc1.4d001f mp4a.40.2", video/mp2t; codecs="avc1.4d001f mp4a.40.2"

@joeyparrish
Copy link
Member

What browser are you using?

@JyotirmoyGoswami
Copy link
Author

i tested in desktop on chrome Version 59.0.3071.115 (Official Build) (64-bit) and firefox 54 didn't have opportunity to test on any mobile devices and mac. Any help..

@joeyparrish
Copy link
Member

Chrome doesn't support MPEG-2-TS, nor does Firefox. Shaka currently only supports TS content on browsers that have TS support built in.

We have two changes coming which should help.

Since the error UNPLAYABLE_PERIOD does not clearly explain the situation, we will be adding a new error code for cases like yours: CONTENT_NOT_SUPPORTED_BY_BROWSER. This work is being tracked in #868.

We are also working on a solution to transmux TS to MP4 so that we can play TS independent of the browser's TS support. This is being tracked in #887, and will require an additional library called mux.js.

Does this help?

@JyotirmoyGoswami
Copy link
Author

I think its not about browser support because i recently tested on "jwplayer" and it worked on chrome and firefox both on the same version i mentioned earlier. on the first comment i have added the code i used for playing the video. If possible can please the refer the code to find some clue of error occurring.

@joeyparrish joeyparrish self-assigned this Jul 23, 2017
@joeyparrish joeyparrish added the type: question A question from the community label Jul 23, 2017
@joeyparrish
Copy link
Member

It's definitely about browser support. Let me explain.

Browsers only support certain media containers (such as mp4, webm, or ts) and certain codecs (such as h264, h265, vp8, vp9, aac, ec3, vorbis, or opus). For Shaka Player to play content today, it must be supported by the browser.

Some other players do something called "transmuxing". When content is transmuxed in a web application, the container is parsed in JavaScript and a new container is constructed. For example, if TS is unsupported by the browser, TS segments can be parsed in JavaScript, the h264/aac codec data can be extracted, and that codec data can be put into a new MP4 container. After transmuxing to mp4, the player has content that the browser can play.

All major desktop browsers today support MP4, but only Safari and Edge support TS. On all other browsers, TS content can only be played through transmuxing.

Since your TS content plays on Chrome and Firefox in JWPlayer, it means that JWPlayer is transmuxing. Shaka Player will be able to transmux content in the near future. If you'd like to keep track of that work, you should subscribe to #887. In the mean time, you could always use another player that transmuxes.

I'm sorry that Shaka Player can't solve your problem yet, but we are working on it and hope to be able to release transmuxing support soon. Please let me know if there's anything else we can do for you until then.

@joeyparrish
Copy link
Member

@JyotirmoyGoswami, is there anything else we can do for you? Otherwise, I'd like to close this issue. Thanks!

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Aug 11, 2017
@joeyparrish
Copy link
Member

Closing due to inactivity. Let us know if you need anything else.

@joeyparrish joeyparrish removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Aug 23, 2017
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: question A question from the community
Projects
None yet
Development

No branches or pull requests

3 participants