HTTP Live Streaming,FFMPEG& FFSERVER和iPhone OS 3 [英] HTTP Live Streaming, FFMPEG & FFSERVER, and iPhone OS 3

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

问题描述

在iPhone OS 3中,苹果推出了 HTTP即时串流,应允许从互联网直播视频。我目前正在运行一个网络摄像头,它会进入我的服务器,然后通过ffmpeg转换成flv流,并使用ffserver进行流式传输。有人知道如何使用ffmpeg和ffserver设置iPhone可以使用的视频流?我应该能够在任何格式上进行重新编码。

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.

推荐答案

您需要构建一个副本的ffmpeg版本> = e109a29d6ddb02b2dd58c6c385ebec27f2d23b58(git)或18793(svn)。确保您在构建时还指定了--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/

ie将输入文件或流输入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和segmenter选项以获得结果,

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

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

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