HTTP 实时流媒体、FFMPEG &FFSERVER 和 iPhone OS 3 [英] HTTP Live Streaming, FFMPEG & FFSERVER, and iPhone OS 3

查看:21
本文介绍了HTTP 实时流媒体、FFMPEG &FFSERVER 和 iPhone OS 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 iPhone OS 3 中,Apple 引入了 HTTP Live Streaming 应允许从互联网实时流式传输视频.我目前正在操作一个网络摄像头,它输入我的服务器,然后由 ffmpeg 转换为 flv 流,并使用 ffserver 流式传输回来.有谁知道如何设置 iPhone 可以使用 ffmpeg 和 ffserver 使用的视频流?我应该能够即时重新编码为任何格式.

In iPhone OS 3, Apple has introduced HTTP Live Streaming which should allow live streaming of video from the internet. I am currently operating a webcam, which feeds into my server, and is then converted into a flv stream by ffmpeg, and streamed back out using ffserver. Does anyone know how to setup a video stream the iPhone can use using ffmpeg and ffserver? I should be able to re-encode into just about any format on the fly.

推荐答案

您需要构建版本 >= e109a29d6ddb02b2dd58c6c385ebec27f2d23b58 (git) 或 18793 (svn) 的 ffmpeg 副本.确保在构建时还指定了 --enable-libx264 标志.启动并运行后,您可以大致执行以下操作:

You'll need to build a copy of ffmpeg with a version >= e109a29d6ddb02b2dd58c6c385ebec27f2d23b58 (git) or 18793 (svn). Make sure you also specify the --enable-libx264 flag when you're building. Once you've got that up and running, you can do roughly the following:

ffmpeg -i <input video> -acodec libmp3lame -ac 1 -vcodec libx264 -s 320x240 
       -level 30 -f mpegts - | 
segmenter - 10 test test.m3u8 http://example.com/path/to/your/files/

即将输入文件或流输入 ffmpeg 并将带有 MP3 音频的 H.264 视频通过管道传输到 Apple 的分段器中.分段器会吐出分段的视频文件和指向分段文件的 M3U 播放列表.您可以通过 Apache 之类的网络服务器提供分段文件和播放列表.

i.e. Bring an input file or stream into ffmpeg and pipe an H.264 video with MP3 audio into Apple's segmenter. The segmenter spits out segmented video files and M3U playlists pointing to the segmented files. You'd serve the segmented files and playlists via a web server like Apache.

显然,您需要大幅调整 ffmpeg 和分段器选项以获得您想要的结果.

Obviously you'll want to tweak the ffmpeg and segmenter options substantially to get the results you're after.

这篇关于HTTP 实时流媒体、FFMPEG &amp;FFSERVER 和 iPhone OS 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆