doutang8098 2012-11-02 19:59
浏览 150

如何使用php或perl正确地将视频文件流式传输到Web

So I am new to Perl and web development but I was hoping to get some guidance on the following issue.

Server 1 is transcoding video for me and has an api endpoint for me to access. It will give me the file stream that I want to push to the web. So for the sake of the problem lets say that it is accessed at:

server1:123\video_stream

Server2 is my web server and I want to have a page that lets us access this video stream file

server2:80\web_stream 

I have seen in php you can do readfile("server1:123\video_stream) but the entire video_stream will be read into memory before being output to the page... or so I was told.

I have also seen in Perl that ffmpeg output can but routed through the open(DATA, $ffmpegProcess) then printing the buffer read from this stream to the web_stream page...

This all assumes that the header information about the attributes of the video are correct.

Would it be as simple as making a curl request to Server 1 and returning that stream output like I can already with the ffmpeg output?

I am not looking for complete solution, just some direction on the best and most correct way to do this. Maybe php and Perl are not the right tools to handle this at all?

  • 写回答

2条回答 默认 最新

  • douna2917 2012-11-02 22:20
    关注

    ffserver seems like the better tool to use. It's part of the ffmpeg family.

    评论

报告相同问题?

悬赏问题

  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)