How to play smooth streaming video in Chromecast?

跟風遠走 提交于 2019-12-03 13:42:58

问题


According the Chromecast Developers page, Chromecast supports the SmoothStreaming container, which I believe uses video chunks with the .ismv extension. I am having problems getting those video files to play.

If I am not mistaken, Chrome/Chromecasts's implementation of the video tag only supports .mp4 and .webm files, so using cast.MediaLoadRequest (in a Chrome Sender App) would not work if you pass it a url for a manifest file or .ismv container.

It does seem possible to write code that stitches together MPEG-DASH chunks using the MediaSource API from a MPEG-DASH manifest file. However, it doesn't appear that Chrome's implementation of the MediaSource spec supports .ismv chunks and therefore a means to play smooth streaming video.

Assuming you parsed a manifest file to get the smooth streaming video chunks, how would it be possible for Chromecast to play .ismv h.264 containers, such as the ones that can be found here? Or does Chrome not support .ismv files? If so, what SmoothStreaming containers does Chrome/Chromecast support?


回答1:


Chromecast supports MPEG-DASH and Smooth Streaming. See more detail here:

https://developers.google.com/cast/supported_media_types

We'll provide some code snippet of smooth streaming soon. Stay tuned.




回答2:


The default Receiver provided does not support SmoothStreaming (nor MPEG-DASH).

You'll need to code your own receiver to do so.

See https://stackoverflow.com/a/17978070/2665789 for a little more help.

Hopefully Google posts working samples of Live streaming soon!




回答3:


You can throw SmoothStreaming to some sample receivers provided by Google. The cast-custom-receiver and the Cast-Media-Player-Library-Sample supports SS with PlayReady encryption out of the box.

Well, you need to do some tricks like modify the extension from "ism/" to "ism/Manifest" and it just work. You'll need to do the same in the [cast-sender-tool-chrome] adding the file extension to the list of three inside the main html file.



来源:https://stackoverflow.com/questions/18095444/how-to-play-smooth-streaming-video-in-chromecast

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!