在Linux上使用VLC进行UDP直播网络摄像头到iPhone

时间:2022-08-01 21:19:35

I've searched on the web for something like this, but everything is about ´saving the file on ipod´ and some offtopic solutions and examples that i can't really use.

我在网上搜索过这样的内容,但是所有内容都是关于在ipod上播放文件以及一些我无法真正使用的offtopic解决方案和示例。

I want my linux laptop to stream the webcam media to my iPod (with my code) I am really lost on this.. I could use VLC to stream it in UDP from the laptop, but how would i get it and show on the iPod side? Should i use mpmovieplayer?

我希望我的linux笔记本电脑将网络摄像头媒体流式传输到我的iPod(我的代码)我真的迷失了...我可以使用VLC从笔记本电脑中将其流式传输到UDP,但我怎么能在iPod上显示它并显示在iPod上侧?我应该使用mpmovieplayer吗?

Note: I could send the frames in iplimage (from my linux code:blocks project) to the iPod, and for what i've searched on the web, there are methods to transform IplImage to UIImage on the iPod, but i don't know how to make it work :s

注意:我可以将iplimage中的帧(从我的linux代码:blocks项目)发送到iPod,对于我在网上搜索的内容,有一些方法可以在iPod上将IplImage转换为UIImage,但我不知道知道如何使它工作:s

thks for any help.

请求任何帮助。

1 个解决方案

#1


0  

I think you best bet would be to use ffmpeg. When you just want to stream videos that you have taken with your webcam you can just encode it correctly with ffmpeg and the iPhone will automagically do a progressive download, in most cases this will do.

我认为你最好的选择是使用ffmpeg。如果您只想流式传输使用网络摄像头拍摄的视频,可以使用ffmpeg正确编码,iPhone会自动进行渐进式下载,大多数情况下都会这样做。

Something like this :

像这样的东西:

ffmpeg -i $1 -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv -cmp 2 -subcmp 2 -s 320x180 $1.mp4

when you however need real live streaming i would look at the following projects.

当你需要真正的直播时,我会看下面的项目。

I played around with this project: http://www.ioncannon.net/projects/http-live-video-stream-segmenter-and-distributor/ but I remember it to be quite complex. It should however provide what you want.

我玩这个项目:http://www.ioncannon.net/projects/http-live-video-stream-segmenter-and-distributor/但我记得它很复杂。但它应该提供你想要的东西。

Considering you are using a linux laptop, you might be interested in http://www.mythtv.org/wiki/Streaming_to_iPod_touch_or_iPhone I think however it is missing the realtime component.

考虑到您使用的是Linux笔记本电脑,您可能会对http://www.mythtv.org/wiki/Streaming_to_iPod_touch_or_iPhone感兴趣,但我认为它缺少实时组件。

On the ipod side i think MPMoviePlayerViewController (ios 4.0) is the way to go, just implement the delegate methods and if the iPod can play it, this controller will handle everything.

在ipod方面,我认为MPMoviePlayerViewController(ios 4.0)是要走的路,只需实现委托方法,如果iPod可以播放它,这个控制器将处理所有事情。

I hope this helps, if you find an (easy) solution let us know ;-).

我希望这有帮助,如果你找到一个(简单的)解决方案让我们知道;-)。

#1


0  

I think you best bet would be to use ffmpeg. When you just want to stream videos that you have taken with your webcam you can just encode it correctly with ffmpeg and the iPhone will automagically do a progressive download, in most cases this will do.

我认为你最好的选择是使用ffmpeg。如果您只想流式传输使用网络摄像头拍摄的视频,可以使用ffmpeg正确编码,iPhone会自动进行渐进式下载,大多数情况下都会这样做。

Something like this :

像这样的东西:

ffmpeg -i $1 -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv -cmp 2 -subcmp 2 -s 320x180 $1.mp4

when you however need real live streaming i would look at the following projects.

当你需要真正的直播时,我会看下面的项目。

I played around with this project: http://www.ioncannon.net/projects/http-live-video-stream-segmenter-and-distributor/ but I remember it to be quite complex. It should however provide what you want.

我玩这个项目:http://www.ioncannon.net/projects/http-live-video-stream-segmenter-and-distributor/但我记得它很复杂。但它应该提供你想要的东西。

Considering you are using a linux laptop, you might be interested in http://www.mythtv.org/wiki/Streaming_to_iPod_touch_or_iPhone I think however it is missing the realtime component.

考虑到您使用的是Linux笔记本电脑,您可能会对http://www.mythtv.org/wiki/Streaming_to_iPod_touch_or_iPhone感兴趣,但我认为它缺少实时组件。

On the ipod side i think MPMoviePlayerViewController (ios 4.0) is the way to go, just implement the delegate methods and if the iPod can play it, this controller will handle everything.

在ipod方面,我认为MPMoviePlayerViewController(ios 4.0)是要走的路,只需实现委托方法,如果iPod可以播放它,这个控制器将处理所有事情。

I hope this helps, if you find an (easy) solution let us know ;-).

我希望这有帮助,如果你找到一个(简单的)解决方案让我们知道;-)。