本文介绍了用crtmpserver重新流式传输MPEG2 TS PAL流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 我想建立一些流包装器:​​ 我拥有一个旧的Dreambox PAL Sat Reciever与网络。这个流我想转码为一个较低的结果一个重新排序它。 我的目标是拥有一个简单的网站,通过rtmp嵌入此流。 crtmpserver应该是正确的软件。现在我有一个网站运行,可以播放本地文件通过jwplayer / crtmpserver。 我正在寻找解决方案: httpUrl - > ffmpeg - > crtmpserver 可以吗?我可以将ffmpeg的输出重定向到一个提交的管道,crtmpserver可以抓住这个?还是用UDP? 任何提示赞赏!谢谢!! 解决方案很容易: 启动服务器(在控制台模式下进行调试)您应该看到如下: | tcp | 0.0.0.0 | 9999 | inboundTcpTs | flvplayback | 基本上,这是mpegts流的tcp接受者 使用ffmpeg创建流: ffmpeg -i<源>< source_related_pa​​rameters>< audio_codec_parameters>< video_codec_parameters> -f mpegtstcp://127.0.0.1:9999 示例: ffmpeg -i /tmp/aaa.flv -acodec copy -vcodec copy -vbsf h264_mp4toannexb -f mpegtstcp://127.0.0.1:9999 返回服务器并观看控制台。你应该看到这样的东西: 流入INTS(6),名称为 ts_13_257_256 注册到应用程序 flvplayback 从协议ITS(13) ts_13_257_256是流名称。现在您可以使用jwplayer或类似的播放器并将其指向该流 如果要使用UDP,则需要停止服务器并更改配置文件,而不是有 协议=inboundTcpTs 你应该有 protocol =inboundUdpTs Yo ucan甚至复制整个部分,并更改端口号以同时拥有这两个。 此外,您必须更改ffmpeg而不是具有tcp://127.0.0.1:9999您可以拥有udp://127.0.0.1:9999 现在,如果您还想要一个流名称,而不是ts_13_257_256(这通过ts_protocolId_AudioPID_VideoPID的方式),您可以以类似的方式使用LiveFLV: ffmpeg -i /tmp/aaa.flv -acodec copy -vcodec copy -vbsf h264_mp4toannexb -f flv -metadata streamName = myStreamNametcp://127.0.0.1:6666 服务器应显示: Stream INLFLV(1),名称为myStreamName,从协议ILFL(3)注册到应用程序flvplayback 你去,现在你有一个计算的流名称是myStreamName 最后一个观察。请在crtmpserver的邮件列表中提出这样的问题。你会更好地听到。 您可以在这里找到资源: http://www.rtmpd.com/resources/ 寻找 干杯, Andrei 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 -> crtmpserverIs 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!! 解决方案 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 streamsUse 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:ffmpeg -i /tmp/aaa.flv -acodec copy -vcodec copy -vbsf h264_mp4toannexb -f mpegts "tcp://127.0.0.1:9999"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 application flvplayback 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 streamIf you want to use UDP, you need to stop the server and change the config file so instead of havingprotocol="inboundTcpTs"you should haveprotocol="inboundUdpTs"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:9999Now, 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:ffmpeg -i /tmp/aaa.flv -acodec copy -vcodec copy -vbsf h264_mp4toannexb -f flv -metadata streamName=myStreamName "tcp://127.0.0.1:6666"And the server should show:Stream INLFLV(1) with name `myStreamName` registered to application `flvplayback` from protocol ILFL(3)There you go, now you have a "computed" stream name which is myStreamNameOne 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 underCheers,Andrei 这篇关于用crtmpserver重新流式传输MPEG2 TS PAL流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-07 01:15