Download the PHP package wzj177/short-video-parse without Composer

On this page you can find all versions of the php package wzj177/short-video-parse. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package short-video-parse

ShortVideoParse

Latest Stable Version Total Downloads Latest Unstable Version License

短视频去水印

本项目是在 VideoParseTools 的基础上修改的,修改目的在于,之前的包里面有些接口失效,同时也对部分接口做了升级,项目部分平台不仅支持视频、封面同时支持图片集采集。

原先大佬集成了:抖音、B站、火山、头条、快手、梨视频、美拍、陌陌、皮皮搞笑、皮皮虾、全民搞笑、刷宝、微视、小咖秀、最右、微博、秒拍、淘宝等等。 现在我这边调整测试稳定支持的平台有:抖音、B站、小红书、头条、最右、微博。其他平台可能不支持,有问题可以issues交流。

集成案例

安装

安装方法一:(需要下载composer.phar到根目录,设置PHP为全局变量)

php composerphar require wzj177/short-video-parse

安装方法二:

composer require wzj177/short-video-parse

如果需要更新扩展包使用

composer update wzj177/short-video-parse

运行环境要求PHP70+ VideoManager使用文档:(可以参考tests/testphp)

抖音:VideoManager::DouYin()->start($url); B站:VideoManager::Bili()->start($url); 小红书:VideoManager::XiHongShu()->start($url); 快手:VideoManager::KuaiShou()->start($url); // 快手原有解析最近也不能用了,暂不支持 微博:VideoManager::WeiBo()->start($url); 火山:VideoManager::HuoShan()->start($url); 头条:VideoManager::TouTiao()->start($url); 西瓜:VideoManager::XiGua()->start($url); 微视:VideoManager::WeiShi()->start($url); 皮皮虾:VideoManager::PiPiXia()->start($url); 最右:VideoManager::ZuiYou()->start($url); 自定义URL配置文件:url-validator

`

常见问题

下载或者播放出现403

有很多平台的视频不能访问,需要使用代理,因此VideoManager新增了代理配置,在配置文件config/proxy.php中配置,可以参考config/proxy.php.example的格式。代理配置是按照平台配置,但基本下面的方案是通用的,因此可以写成同样的代理地址。以下是我整理的一些解决方案:

  1. nginx代理下载

使用方法:https://video-parse.top/download?url=https://v.kuaishou.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  1. 基于php的curl实现 使用curl代理视频和图片真实地址,可以满足播放和下载。同时如果上面的nginx代理下载仍然出现403错误,可以尝试使用curl代理。下面给出视频代理的例子,图片代理类似。

B站获取1080以上分辨率的视频

由于B站采用DASH技术后,直接获取1080以上的mp4类型视频已经不行了,也就是说目前VideoManager设置cookie后调用接口最高拿到的是720P。如果需要1080以上,我们的方案是:

  1. BiliLogic.php里面找到setContents()方法,将接口地址换成:https://api.bilibili.com/x/player/wbi/playurl
  2. 请求示例: https://api.bilibili.com/x/player/wbi/playurl?bvid=BV1yE1uYDEPh&cid=26494174859&qn=127&fnver=0&fnval=4048&fourk=1&tabId=1180772181 需携带cookie: SESSDATA=aba1384e%2C1747560303%2C09dd5%2Ab2CjDQK89fZzO9xbTjP-iAtY1Lzl5HrTkXEqDovfvXENOniXTbvUfwWme-1LUQaND12jASVjZUY2pVVHc3xxxxx
  3. 响应示例:

  4. 使用ffmpeg命令将获取到的音视频m4s地址合并成mp4文件

结束:

注:仅供学习,切勿用于其他用途,由使用人自行承担因此引发的一切法律责任,作者不承担法律责任。
喜欢的话,给个star呗
喜欢的话,给个star呗
喜欢的话,给个star呗

自己可以参考tests/test.php
都无法使用再提issue


All versions of short-video-parse with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
ext-openssl Version *
ext-simplexml Version *
ext-mbstring Version *
ext-libxml Version *
guzzlehttp/guzzle Version ^7.3|^6.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wzj177/short-video-parse contains the following files

Loading the files please wait ....