简体   繁体   English

不编码的Http Live流

[英]Http Live Streaming without encoding

I have MPEG-TS H.264 video stream of Live TV Channel, I want to Live Stream it for iPhone but as HLS requires to make segments (eg: 10s) segment and send it using M3u8. 我有直播电视频道的MPEG-TS H.264视频流,我想为iPhone进行直播,但是由于HLS要求进行分段(例如:10s)分段并使用M3u8发送。 and for this purpose I am currently using ffmpeg and m3u8-segmenter available on internet. 为此,我目前正在使用Internet上提供的ffmpeg和m3u8-segmenter。 But I do not want to use transcoding using ffmpeg as i have memory + processor limitations on my hardware. 但是我不想使用ffmpeg进行转码,因为我的硬件上有内存+处理器限制。 Is it possible that i can only make segments of the MPEG-TS video and directly send it to the iPhone. 是否有可能我只能分割MPEG-TS视频并将其直接发送到iPhone。

I have tried many ways but unable to do so. 我尝试了很多方法,但无法做到。 I am using Linux based system. 我正在使用基于Linux的系统。

Please help me, what are the procedures of live streaming to iphone without transcoding the video. 请帮助我,在不对视频进行转码的情况下将视频实时传输到iphone的程序是什么。

Thanks 谢谢

The best way to go about this is to cut out FFmpeg entirely. 最好的方法是完全切掉FFmpeg。 Although you can coerce FFmpeg to not transcode (by using -c copy ), since the video is already in MPEG-TS format straight off of the livestream, it's best to use it directly. 尽管您可以强制FFmpeg不进行转码(通过使用-c copy ),但是由于视频已经直接来自实时流,因此已经是MPEG-TS格式,因此最好直接使用它。

Since it looks like the video is coming over HTTP, you can use curl to print it to stdout: 由于视频看起来像是通过HTTP传输的,因此您可以使用curl将其打印到stdout:

curl http://localhost:6954/myvideo.ts | ./m3u8-segmenter -i - -d 10 -p outputdir/prefix -m outputdir/output.m3u8 -u http://domain.com

Or if you want to use wget instead of curl , it's similar 或者,如果您要使用wget而不是curl ,则类似

wget -O - http://localhost:6954/myvideo.ts | ./m3u8-segmenter -i - -d 10 -p outputdir/prefix -m outputdir/output.m3u8 -u http://domain.com

Either wget or curl will likely already be installed on your system. wgetcurl可能已经安装在您的系统上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM