doude4201 2010-10-18 08:17
浏览 57
已采纳

使用PHP和ffmpeg在线上传和存储视频

I have a website that allows users to upload videos to it, After they upload videos, I would like to be able to display them using a flash player.

One flash player i know is flowplayer, althrough if anyone knows a better one I will be happy to know.

In any case, as I understood from a brief google search, there are no players that can play .avi/.mpeg files, but they can only play .flv files.

I began searching for ways to convert my user's avi's/mpeg's and found that I can use ffmpeg to convert the video to .flv using system().

Is this the best solution for me? I feel like ffmpeg takes a lot of CPU and once I have enough users the server will crash..

Thanks!

  • 写回答

1条回答 默认 最新

  • douzhankui0758 2010-10-18 08:36
    关注

    Just an outline

    (Note: i don't own nor wrote a PHP video sharing site, so treat these like tips)

    • Set up your web server and PHP to be capable of accepting large files via HTTP
    • Let users upload their videos via a web interface
    • Upon successful upload add uploaded video to a queue
    • Set up a fully server side script that handles video processing (No PHP)
    • Run a cron job on this queue when your server is able to crunch uploaded videos
    • Notify users when videos are done

    Hope it helps in some way.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误