dscqrkvr9562034621 2011-10-06 22:09
浏览 192

用php流式传输mp4

I am looking for a way to stream the contents from a mp4-file to mediaelement - the problem here is that I need to make sure that people who access the files are logged in - and they must not be able to easily decode the url and post it elsewhere.

I've got the login system taken care of - just not sure how to combine it with streaming an mp4.

I have been searching around and have yet to find any soulutions, unfortunatly. All ideas are welcome.

Regards, Anders

  • 写回答

1条回答 默认 最新

  • duanhuren5581 2011-10-06 22:21
    关注

    A quick search has yielded this result for me: http://www.devshed.com/c/a/PHP/Video-Streaming-PHP-Script-Tutorial/

    I see no need to write out what it says, just read it there. I'll expand on it here however. Once you've got your script fully working (streaming) then you implement the authentication methods. To do this you'll probably want to include your login checking script and check whether they're logged in or not - if they aren't logged in then just do something like die('authentication error');.

    Then, if you place all the videos in a single sub-directory, you could use a .htaccess rule to completely stop users accessing videos directly! (not that they could realistically find the real URL anyway).

    This does not stop users downloading to share your videos - but it would mean they had to be logged in to watch them (like you want). As for downloading to share; perhaps a watermark?

    评论

报告相同问题?

悬赏问题

  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线