简体   繁体   English

将JPEG直播流到iPhone应用程序

[英]Streaming jpegs live to iphone app

Im progressing through taking the depth camera feed from my kinect and streaming it to my iphone app. 我通过从我的kinect获取深度摄像头提要并将其流式传输到我的iPhone应用程序来取得进展。 I have got to stage of being able save jpegs for every frame created from the kinect depth image (30 fps) and save them to the local disk. 我必须能够为从kinect深度图像(30 fps)创建的每个帧保存jpeg,并将其保存到本地磁盘。 I have than been able to convert this to mpeg with ffmpeg. 我已经能够使用ffmpeg将其转换为mpeg。

My question is now how can I view this live on my iphone? 我的问题是现在如何在iPhone上实时查看此内容? Basically I want to view it live on the iphone as you are seeing it coming from the kinect. 基本上,我想在iphone上实时查看它,就像您看到它来自kinect。

Should I use http live streaming and use the segmenter to use apples HttpLiveStreaming functionality? 我应该使用HTTP实时流媒体并使用分段器来使用Apple的HttpLiveStreaming功能吗? Or can I stream the raw jpeg image files up in some way as they are saved to disk and than just cycle the images on the phone as they go? 还是我可以将原始jpeg图像文件以某种方式向上传输,然后将其保存到磁盘中,而不是随即在手机上循环播放图像?

Im wondering how video conferencing is achieved on the iphone (facetime/skype etc)? 我想知道如何在iPhone上实现视频会议(facetime / skype等)吗? because I'd prefer that it wasnt played inside the video player, just want to display live content on the screen as it happens. 因为我希望它不是在视频播放器中播放的,所以只想在屏幕上实时显示实时内容。

Any ideas? 有任何想法吗? Thanks in advance 提前致谢

JPEGs are typically too large to stream in real time -- I've found it sticks around 5 fps on Wi-fi. JPEG通常太大而无法实时流式传输-我​​发现它在Wi-fi上的速度约为5 fps。 If you take your mpeg outputs in small chunks (say, 5-10 sec of video in each chunk) and use ffmpeg to convert them to .ts containers (mpeg2 transport stream), then it's pretty easy to dynamically write an m3u8 index file that contains a list of the chunks in order. 如果将mpeg输出分成小块(例如,每个块中有5-10秒的视频),并使用ffmpeg将其转换为.ts容器(mpeg2传输流),则动态编写一个m3u8索引文件非常容易按顺序包含块的列表。 Point a UIWebView at the URL for the m3u8 file, and the stream will start playing, although it will use the built-in video player. 将UIWebView指向m3u8文件的URL,尽管将使用内置视频播放器,流仍将开始播放。 You can use other media/AV classes to watch your stream, though, I believe. 不过,我相信您可以使用其他媒体/ AV类来观看您的流。

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

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