简体   繁体   English

将iPhone相机的实时mp4流投射到Google Chromecast

[英]Casting live mp4 stream of iPhone's camera to Google Chromecast

I have an application that is capturing video camera input and streaming it into mp4 我有一个正在捕获摄像机输入并将其流化为mp4的应用程序

I have an another application that is passing the first application's URL to a Chromecast device using this code 我有另一个应用程序,正在使用此代码将第一个应用程序的URL传递给Chromecast设备

GCKMediaInformation *mediaInformation = [[GCKMediaInformation alloc] initWithContentID:@"rtsp://192.168.5.159" streamType:GCKMediaStreamTypeLive contentType:@"video/mp4" metadata:metadata streamDuration:0 customData:nil];
//cast video [_mediaControlChannel loadMedia:mediaInformation autoplay:TRUE playPosition:0];

The Chromecast device tries to play the stream but immediately fails. Chromecast设备尝试播放流,但立即失败。

I see "rtsp" as the streaming protocol. 我将“ rtsp”视为流协议。 You need to serve that using http for chromecast to be able to play that. 您需要使用http为chromecast提供服务,以便能够播放该内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM