使用 crtmpserver 重新传输 MPEG2 TS PAL 流
我想构建某种流包装器:
我拥有一台带网络功能的旧 Dreambox PAL Sat 接收器。我想将该流转码为较低的结果并重新流式传输。
我的目标是,拥有一个简单的网站,该流通过 rtmp 嵌入其中。
我认为 crtmpserver 应该是正确的软件。现在我有一个正在运行的网站,可以通过 jwplayer/crtmpserver 播放本地文件。
我正在寻找解决方案:
httpUrl -> ffmpeg-> crtmpserver
这可能吗?我可以将 ffmpeg 的输出重定向到归档管道,并且 crtmpserver 可以抓取它吗?还是选择UDP?
任何提示表示赞赏!谢谢!!
I want to build up some kind of stream wrapper:
I own an old Dreambox PAL Sat Reciever with Networking. This stream I want to transcode to a lower resultion an restream it.
My Goal is, to have a simple website, where this stream is embedded via rtmp.
I thougt crtmpserver should be the right software. For now I have a site running and can play local files through jwplayer/crtmpserver.
I am looking for a solution for this:
httpUrl -> ffmpeg -> crtmpserver
Is that possible? May I redirect the output of ffmpeg to a filed pipe, and crtmpserver could grab that? Or go with UDP?
Any hints appreciated!!! Thanks!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很简单:
启动服务器(在控制台模式下进行调试)
您应该看到类似这样的内容:
|tcp| 0.0.0.0| 9999|入站TCPTs| flvplayback|
基本上,这是 mpegts 流的 tcp 接受器
使用 ffmpeg 创建流:
ffmpeg -i
来源>> <源相关参数> <音频编解码器参数> < video_codec_parameters > 视频编解码器参数-f mpegts "tcp://127.0.0.1:9999"
示例:
返回服务器并观察控制台。您应该看到类似这样的内容:
从协议 ITS(13) 注册到应用程序
flvplayback
的名称为ts_13_257_256
的流 INTS(6)ts_13_257_256 是流名称。现在你可以使用 jwplayer 或类似的播放器并将其指向该流
如果你想使用 UDP,你需要停止服务器并更改配置文件,所以
你应该让你
甚至可以复制整个部分并更改端口两者兼有的数量。
另外,您必须更改 ffmpeg,这样您就可以使用 udp://127.0.0.1:9999 而不是 tcp://127.0.0.1:9999
现在,如果您还想要一个流名称而不是 ts_13_257_256 (由ts_protocolId_AudioPID_VideoPID)您可以以类似的方式使用LiveFLV:
以及服务器应该显示:
就这样,现在您有了一个“计算出的”流名称,即 myStreamName
最后一个观察结果。请在 crtmpserver 的邮件列表上询问此类问题。你会被更好地听到。
您可以在这里找到资源:
http://www.rtmpd.com/resources/
在 Cheers下寻找 google 群组
,
安德烈
That's easy:
Start the server (in console mode for debugging)
You should see something like this:
|tcp| 0.0.0.0| 9999| inboundTcpTs| flvplayback|
Basically, that is a tcp acceptor for mpegts streams
Use ffmpeg to create the stream:
ffmpeg -i < source > < source_related_parameters > < audio_codec_parameters > < video_codec_parameters > -f mpegts "tcp://127.0.0.1:9999"
Example:
Go back to the server and watch the console. You should see something like this:
Stream INTS(6) with name
ts_13_257_256
registered to applicationflvplayback
from protocol ITS(13)ts_13_257_256 is the stream name. Now you can use jwplayer or similar player and point it to that stream
If you want to use UDP, you need to stop the server and change the config file so instead of having
you should have
Yo ucan even copy the entire section and change the port number to have both.
Also, you have to change the ffmpeg so instead of having tcp://127.0.0.1:9999 you can have udp://127.0.0.1:9999
Now, if you also want a stream name and not that ts_13_257_256 (which is by the way ts_protocolId_AudioPID_VideoPID) you can use LiveFLV in a similar manner:
And the server should show:
There you go, now you have a "computed" stream name which is myStreamName
One last observation. Please ask this kind of questions on the crtmpserver's mailing list. You will be better heard.
You can find resources here:
http://www.rtmpd.com/resources/
Look for the google group under
Cheers,
Andrei