Loading... <h2>简介</h2> <code>PlayTube</code>是一个视频分享程序,它能快速的建立一个视频上传、导入、分享的网站,具有多语言、用户管理、广告管理、视频上传、从<code>youtube</code>和<code>vime</code>等网站导入视频等功能。 <div data-unique="截图"></div> <h2>截图</h2> <a class="light-link" href="http://www.502435.com/usr/uploads/2020/04/6ad3a-PlayTube(1).png" data-fancybox="gallery" data-type="image" data-caption="请输入图片描述"><img title="请输入图片描述" src="http://www.502435.com/usr/uploads/2020/04/6ad3a-PlayTube(1).png" alt="请输入图片描述" style=""></a> <a class="light-link" href="http://www.502435.com/usr/uploads/2020/04/20f10-PlayTube(2).png" data-fancybox="gallery" data-type="image" data-caption="请输入图片描述"><img title="请输入图片描述" src="http://www.502435.com/usr/uploads/2020/04/20f10-PlayTube(2).png" alt="请输入图片描述" style=""></a> <a class="light-link" href="http://www.502435.com/usr/uploads/2020/04/e986c-PlayTube(3).png" data-fancybox="gallery" data-type="image" data-caption="请输入图片描述"><img title="请输入图片描述" src="http://www.502435.com/usr/uploads/2020/04/e986c-PlayTube(3).png" alt="请输入图片描述" style=""></a> <a class="light-link" href="http://www.502435.com/usr/uploads/2020/04/ac8e8-PlayTube(4).png" data-fancybox="gallery" data-type="image" data-caption="请输入图片描述"><img title="请输入图片描述" src="http://www.502435.com/usr/uploads/2020/04/ac8e8-PlayTube(4).png" alt="请输入图片描述" style=""></a> <div data-unique="功能"></div> <h2>功能</h2> <ul> <li>上传视频:上传本地视频。</li> <li>导入视频:非常简单的从<code>YouTube</code>、<code>Dailymotion</code>、和<code>Vimeo</code>等站点批量导入视频,此功能需要对应网站的<code>API</code>。</li> <li>自动导入视频:设置一些关键词并创建导入任务,轻松从<code>YouTube</code>和<code>Dailymotion</code>导入视频到你的网站。</li> <li>高性能:<code>PlayTube</code>可以轻松的处理超过<code>1B</code>的视频。</li> <li><code>WoWonder</code>登录集成:无缝对接<code>WoWonder</code>社交系统,可以使用社交系统的帐户授权登入。</li> <li>喜欢&反感:用户可以对某视频进行喜欢投票。</li> <li>评论系统:注册用户可以对视频进行评论。</li> <li>订阅、历史、接下来观看:功能也是比较人性化的。</li> <li>用户频道:完整的用户展示页。</li> <li>广告系统:可以创建视频、页面的广告,一切都在后台的广告设置里。</li> <li>站点地图建立:建立站点地图并自动发送到<code>Google/Bing</code>。</li> <li><code>SEO</code>友好:搜索引擎优化友好的链接,非常有利于谷歌收录。</li> <li>完整的后台:功能完善的后台控制面板。</li> <li>漂亮的<code>UI</code>:非常容易修改而且还很漂亮的模板。</li> </ul> <div data-unique="安装"></div> <h2>安装</h2> 环境要求:<code>PHP >= 5.5</code>、<code>MySQL</code>、<code>GD Library</code>、<code>mbstring</code>、<code>cURL</code>、<code>allow_url_fopen</code>。 这里使用宝塔面板做演示,如果你有基础的话,也可以使用其它面板或者<code>lnmp</code>一键包。 <strong>1、安装宝塔</strong> <pre><code class="hljs nginx"><span class="hljs-comment">#Centos系统</span> <span class="hljs-attribute">yum</span> install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh <span class="hljs-comment">#Ubuntu系统</span> wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh <span class="hljs-comment">#Debian系统</span> wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && bash install.sh </code></pre> 安装完成后,进入面板安装<code>PHP</code>、<code>Mysql</code>、<code>Nginx</code>、<code>phpmyadmin</code>。 <strong>2、安装程序</strong> 添加域名,然后下载程序源码,并将程序上传到网站根目录解压,源码下载: <pre><code class="hljs ruby"><span class="hljs-comment">#v1.4.1完整源码</span> <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">4.1</span>-full.zip <span class="hljs-comment">#增量包,升级时需要一个一个挨着解压覆盖</span> <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">4.2</span>-update.zip <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">4.3</span>-update.zip <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">4.5</span>-update.zip <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">4.5</span>.<span class="hljs-number">1</span>-update.zip <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">5</span>-update.zip <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">5.1</span>-update.zip <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">6</span>-update.zip <span class="hljs-comment">#语言包</span> <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/lang1.<span class="hljs-number">4.1</span>-v1.<span class="hljs-number">4.2</span>-cn.zip <span class="hljs-comment">#升级方法,比如v1.4.1升级到v1.4.2</span> 将v1.<span class="hljs-number">4.2</span>增量包上传至根目录,解压并直接替换根目录文件,再访问<span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/xx.com/update</span>.php进行更新即可。 <span class="hljs-comment">#v1.4.5.1开心完整版源码</span> <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">4.5</span>.<span class="hljs-number">1</span>-nulled.zip <span class="hljs-comment">#v1.6开心完整版源码,安装的时候购买代码和其他版本不一样,V1.6购买代码为:顶点网破解</span> <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/www.moerats.com/usr</span><span class="hljs-regexp">/down/</span>Playtube/playtube-v1.<span class="hljs-number">6</span>-nulled.zip </code></pre> 再添加<code>Nginx</code>伪静态: <pre><code class="hljs nginx"><span class="hljs-attribute">if</span> (!-f <span class="hljs-variable">$request_filename</span>){ <span class="hljs-attribute">set</span> <span class="hljs-variable">$rule_0</span> <span class="hljs-number">1</span><span class="hljs-variable">$rule_0</span>; } <span class="hljs-attribute">if</span> (!-d <span class="hljs-variable">$request_filename</span>){ <span class="hljs-attribute">set</span> <span class="hljs-variable">$rule_0</span> <span class="hljs-number">2</span><span class="hljs-variable">$rule_0</span>; } <span class="hljs-attribute">if</span> (<span class="hljs-variable">$rule_0</span> = <span class="hljs-string">"21"</span>){ <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/$</span> /index.php?link1=home ; } <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/$</span> /index.php?link1=home ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/reset-password/([^/]+)(/|)$</span> /index.php?link1=reset-password&code=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/confirm/(.*)/(.*)$</span> /index.php?link1=confirm&code=<span class="hljs-variable">$1</span>&email=<span class="hljs-variable">$2</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/api/v(([0-9])([.][0-9]+))(/|)$</span> /api.php?v=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/admin-cp$</span> /admincp.php ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/admin-cp/(.*)$</span> /admincp.php?page=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/admin-cdn/(.*)$</span> /admin-panel/<span class="hljs-variable">$1</span> <span class="hljs-literal">last</span>; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/videos/category/(.*)/rss(/|)$</span> /index.php?link1=videos&page=category&id=<span class="hljs-variable">$1</span>&feed=rss ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/videos/category/(.*)$</span> /index.php?link1=videos&page=category&id=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/videos/(.*)/rss(/|)$</span> /index.php?link1=videos&page=<span class="hljs-variable">$1</span>&feed=rss ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/videos/(.*)$</span> /index.php?link1=videos&page=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/articles(/|)$</span> /index.php?link1=articles ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/articles/category/(.*)$</span> /index.php?link1=articles&category_id=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/articles/read/(.*)$</span> /index.php?link1=read&id=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">if</span> (!-f <span class="hljs-variable">$request_filename</span>){ <span class="hljs-attribute">set</span> <span class="hljs-variable">$rule_14</span> <span class="hljs-number">1</span><span class="hljs-variable">$rule_14</span>; } <span class="hljs-attribute">if</span> (!-d <span class="hljs-variable">$request_filename</span>){ <span class="hljs-attribute">set</span> <span class="hljs-variable">$rule_14</span> <span class="hljs-number">2</span><span class="hljs-variable">$rule_14</span>; } <span class="hljs-attribute">if</span> (<span class="hljs-variable">$rule_14</span> = <span class="hljs-string">"21"</span>){ <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/aj/([^/.]+)/?$</span> /ajax.php?type=<span class="hljs-variable">$1</span>&first=<span class="hljs-variable">$2</span> <span class="hljs-literal">last</span>; } <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/aj/([^/.]+)/([^/.]+)/?$</span> /ajax.php?type=<span class="hljs-variable">$1</span>&first=<span class="hljs-variable">$2</span> <span class="hljs-literal">last</span>; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/aj/([^/.]+)/([^/.]+)/([^/.]+)/?$</span> /ajax.php?type=<span class="hljs-variable">$1</span>&first=<span class="hljs-variable">$2</span>&second=<span class="hljs-variable">$3</span> <span class="hljs-literal">last</span>; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/edit-video/(.*)?$</span> /index.php?link1=edit-video&id=<span class="hljs-variable">$1</span> <span class="hljs-literal">last</span>; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/watch/([^/]+)(/|)?$</span> /index.php?link1=watch&id=<span class="hljs-variable">$1</span> <span class="hljs-literal">last</span>; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/watch/([^/]+)/list/([^/]+)(/|)?$</span> /index.php?link1=watch&id=<span class="hljs-variable">$1</span>&list=<span class="hljs-variable">$2</span> <span class="hljs-literal">last</span>; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/embed/(.*)?$</span> /index.php?link1=embed&id=<span class="hljs-variable">$1</span> <span class="hljs-literal">last</span>; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/resend/(.*)/(.*)?$</span> /index.php?link1=resend&id=<span class="hljs-variable">$1</span>&u_id=<span class="hljs-variable">$2</span> <span class="hljs-literal">last</span>; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/redirect/(.*)?$</span> /index.php?link1=<span class="hljs-literal">redirect</span>&id=<span class="hljs-variable">$1</span> <span class="hljs-literal">last</span>; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/settings/(.*)/(.*)$</span> /index.php?link1=settings&page=<span class="hljs-variable">$1</span>&user=<span class="hljs-variable">$2</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/settings/(.*)$</span> /index.php?link1=settings&page=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/terms/([^/]+)(/|)$</span> /index.php?link1=terms&type=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/go_pro(/|)$</span> /index.php?link1=go_pro ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/ads(/|)$</span> /index.php?link1=ads ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/ads/create(/|)$</span> /index.php?link1=create_ads ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/ads/edit/(d+)(/|)$</span> /index.php?link1=edit_ads&id=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/contact-us(/|)$</span> /index.php?link1=contact ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/@([^/]+)(/|)$</span> /index.php?link1=timeline&id=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/messages/(.*)$</span> /index.php?link1=messages&id=<span class="hljs-variable">$1</span> ; <span class="hljs-attribute">if</span> (!-f <span class="hljs-variable">$request_filename</span>){ <span class="hljs-attribute">set</span> <span class="hljs-variable">$rule_33</span> <span class="hljs-number">1</span><span class="hljs-variable">$rule_33</span>; } <span class="hljs-attribute">if</span> (!-d <span class="hljs-variable">$request_filename</span>){ <span class="hljs-attribute">set</span> <span class="hljs-variable">$rule_33</span> <span class="hljs-number">2</span><span class="hljs-variable">$rule_33</span>; } <span class="hljs-attribute">if</span> (<span class="hljs-variable">$rule_33</span> = <span class="hljs-string">"21"</span>){ <span class="hljs-attribute">rewrite</span><span class="hljs-regexp"> ^/([^/]+)(/|)$</span> /index.php?link1=<span class="hljs-variable">$1</span> ; } </code></pre> 最后打开域名进行安装配置,授权码:<code>nulled-by-reishi</code>,直接使用<code>v1.4.5.1</code>完整版的可能不需要授权。 <a class="light-link" href="http://www.502435.com/usr/uploads/2020/04/ef2e5-PlayTube(5).png" data-fancybox="gallery" data-type="image" data-caption="请输入图片描述"><img title="请输入图片描述" src="http://www.502435.com/usr/uploads/2020/04/ef2e5-PlayTube(5).png" alt="请输入图片描述" style=""></a> <a class="light-link" href="http://www.502435.com/usr/uploads/2020/04/e4284-PlayTube(6).png" data-fancybox="gallery" data-type="image" data-caption="请输入图片描述"><img title="请输入图片描述" src="http://www.502435.com/usr/uploads/2020/04/e4284-PlayTube(6).png" alt="请输入图片描述" style=""></a> <a class="light-link" href="http://www.502435.com/usr/uploads/2020/04/aa1e0-PlayTube(7).png" data-fancybox="gallery" data-type="image" data-caption="请输入图片描述"><img title="请输入图片描述" src="http://www.502435.com/usr/uploads/2020/04/aa1e0-PlayTube(7).png" alt="请输入图片描述" style=""></a> <strong>3、中文设置</strong> 我们通过<code>phpmyadmin</code>进入到数据库,找到<code>PlayTube</code>所使用数据库,删除<code>langs.sql</code>,再将语言包的<code>langs.sql</code>文件导入到数据库即可。 然后刷新网站会看到有右下角语言有<code>中文</code>的,如果选择<code>中文</code>后,分类显示不出来,可能是分类语言乱码,这时候我们去根目录<code>assets/langs</code>,将乱码的语言文件改成<code>中文.php</code>即可。 <strong>4、安装ffmpeg</strong> 要使用程序完整的功能,我们还需要安装<code>ffmpeg</code>。安装参考:<a href="https://www.moerats.com/archives/719/" target="_blank" rel="noopener noreferrer">使用静态ffmpeg二进制文件秒安装ffmpeg</a>。 再打开宝塔,点击左侧软件管理-<code>PHP</code>设置-禁用函数-删除<code>shell_exec</code>。最后在后台设置<code>FFmpeg</code>二进制文件路径为<code>/usr/bin/ffmpeg</code>。 <strong>5、更多设置</strong> <pre><code class="hljs shell"><span class="hljs-meta">#</span><span class="bash">视频分类设置</span> 网站目录./assets/langs/中文.php修改。 <span class="hljs-meta">#</span><span class="bash">编辑样式表</span> ./themes/default/css,主样式文件是style.css <span class="hljs-meta">#</span><span class="bash">添加自己的代码</span> 想在head、body、footer标签中添加自己的代码,请在./themes/default/layout/container.html修改 </code></pre> 差不多到这里就算安装完成了,然后更多功能自行研究吧。 最后由于最新版的<code>Plytube</code>没汉化,用起来可能不是很方便,如果想做视频站的,还是建议使用中文程序,可以试试开源版<code>express-ffmpeg</code>云转码程序→<a href="https://www.moerats.com/archives/731/" target="_blank" rel="noopener noreferrer">传送门</a>。 最后修改:2022 年 08 月 02 日 © 允许规范转载 打赏 赞赏作者 赞 0 如果觉得我的文章对你有用,请随意赞赏