需要帮助将Red5 RTMP流转码为MPEG2-TS [英] Need help transcoding Red5 RTMP stream to MPEG2-TS

查看:314
本文介绍了需要帮助将Red5 RTMP流转码为MPEG2-TS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的朋友正在做现场表演,为此我已经在我旧的2006年Intel Core Duo Mac mini上运行Mac OS X Snow Leopard Server 10.6.8设置了一台Red5服务器。



我使用Flash Media Live Encoder广播到Red5的thelaDemo应用程序,并且流的功能非常好,除了我想要流与iOS一起使用的事实。
我正在开发一个应用程序,但是我仍然需要将我的流转换为Apple的HTTP Live Streaming协议,使其工作。
任何人都可以帮助我将RTMP流转换为MPEG2-TS,因为这是mediastreamsegmenter支持的格式?我已经在服务器上安装了Apple的HTTP Live Streaming Tools,所以分段器不是问题。



FFmpeg不起作用,至少不能使用我找到的代码< a href =http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-3/ =nofollow >这里。有了它总是得到一个操作不允许的错误。 Xuggler不工作,甚至没有一个Linux盒子。
有人可以帮我吗?我真的很感激,



-Reynir Aron

解决方案

p>这个调用是我成功使用的方式,将red5直播流转换成具有TS文件的m3u8 HLS格式:

  ffmpeg -re -irtmp:// domain / oflaDemo / test live = 1-hls_time 10 -hls_wrap 7 -hls_list_size 3 -f hls test.m3u8 

选项-hls_list_size 3注意在m3u8文件中列出了3个TS文件。选项-hls_wrap 7在7个文件后自动删除.TS文件。



所以没有其他工具需要,ffmpeg可以做完整的工作您。如果不指定选项-hls_wrap,则完整的流将保存在10秒的TS文件中(-hls_time 10)。



顺便说一句,我在使用rtmpdump v2.3编译的CentOS v5.8和git://git.videolan的最新x264 lib中使用ffmpeg 1.2.1。 org / x264.git与以下配置选项:

  ./configure --enable-librtmp --enable-libx264  - enable-gpl 


Me and my friend are going to make live shows and for that purpose I have set up a Red5 server on my old 2006 Intel Core Duo Mac mini running Mac OS X Snow Leopard Server 10.6.8.

I use Flash Media Live Encoder to broadcast to Red5's oflaDemo application and the stream works great, except for the fact that I want the stream to work with iOS. I am developing an app for it, but I still need to convert my stream to Apple's HTTP Live Streaming protocol for it to work. Can anybody help me convert the RTMP stream to MPEG2-TS, because that's the format that mediastreamsegmenter supports? I already have Apple's HTTP Live Streaming Tools installed on the server, so the segmenter's not a problem.

FFmpeg doesn't work, at least not with the code I found here. With it a always get an "Operation not permitted" error. Xuggler doesn't work, not even with a Linux box. Can anybody please help me? I'd really, really appreciate it.

-Reynir Aron

解决方案

This invocation is what I successfully use to convert a red5 live stream into m3u8 HLS format with TS files:

ffmpeg -re -i "rtmp://domain/oflaDemo/test live=1" -hls_time 10 -hls_wrap 7 -hls_list_size 3 -f hls test.m3u8

Option "-hls_list_size 3" takes care there are 3 TS files listed in the m3u8 file. Option "-hls_wrap 7" takes care the .TS files are automatically removed after 7 files.

So there is no need for other tools, ffmpeg can do the complete job for you. If you do not specify option "-hls_wrap" the complete stream will be saved in TS files of 10 seconds (-hls_time 10).

By the way, I use ffmpeg 1.2.1 on CentOS v5.8 compiled with rtmpdump v2.3 and the latest x264 lib from git://git.videolan.org/x264.git with the following configuration options:

./configure --enable-librtmp --enable-libx264 --enable-gpl

这篇关于需要帮助将Red5 RTMP流转码为MPEG2-TS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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