dongpan2788 2016-09-22 07:08
浏览 76

如何在网站上显示许多视频格式

I want to set up a little webserver for searching and displaying my videos. Those videos have many different formats and codecs. The problem is, that HTML5 Video does not support all of my videos and I don't want to convert all of them to a suitable format. I can't use DivX Webplayer, because it isn't supported in Chrome and Firefox (NPAPI). The webserver shall run on a raspberry pi and only be local. I'm looking for a way to display those videos in the browser. I hope you understand my question and thanks in advance for the answers !

  • 写回答

1条回答 默认 最新

  • douyan8772 2016-09-22 08:30
    关注

    This is one case where I think you might just want to spawn a process outside of the Web-page/server, to handle the video playback. You can use exec() etc in the PHP code to execute an external program, and giving it the path to the video should start it playing said video immediately.

    mplayer is a great alternative in this case, as it's light weight, CLI-based, and support just about anything you can shake a stick at.

    Note that you might want to set the DISPLAY property when starting mplayer, or set up some remote, in order to actually control the playback.

    This won't give you the videos in a browser, but if this is a requirement then you need to look into transcoding. mencoder and/or avisynth are the two best options here, assuming the Rasberry's hardware is sufficient for the job.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题