YouTube视频地址解析API接口

发布于 / 教程 / 5 条评论

本接口支持YouTube视频真实地址解析,但是YouTube在1080P及以上分辨率的视频采用了ffmpeg使得视频和音频分离,目前本接口只支持720P及以下的视频地址解析

接口使用

目前本接口使用需要AppKey的支持。

接口地址


https://api.lylares.com/video/youtube/

请求方式

目前本接口使用GET方式即可

请求示例


https://api.lylares.com/video/youtube/?AppKey={$AppKey}&url={$url}

参数说明

url为视频的ID,你也可以直接提交视频播放地址,后台会自动识别。

返回示例


{
    "url": "https://r2---sn-a5mekner.googlevideo.com/videoplayback?ei=emoeW76MPIqS_APoxbO4BA&itag=22&c=WEB&key=yt6&ratebypass=yes&ipbits=0&lmt=1528670668274195&sparams=dur%2Cei%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&ms=au%2Conr&id=o-APqRYnxr__gEe0QhcrU3BpnWeKFNv_ibPQwoGKuwr1rG&mv=m&mt=1528719899&expire=1528741595&requiressl=yes&initcwndbps=1665000&mime=video%2Fmp4&ip=176.122.175.49&fvip=2&dur=1144.000&source=youtube&pl=19&mn=sn-a5mekner%2Csn-q4fl6nez&mm=31%2C26&signature=29A3541E0A951AF941B8807D0DC4D766A815C76C.3FC7BA876B545B30DC7C6BEEB9CC3B5AD49B08B4",
    "data": {
        "17": {
            "url": "https://r2---sn-a5mekner.googlevideo.com/videoplayback?ei=emoeW76MPIqS_APoxbO4BA&gir=yes&lmt=1528662393117820&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&ms=au%2Conr&id=o-APqRYnxr__gEe0QhcrU3BpnWeKFNv_ibPQwoGKuwr1rG&mv=m&mt=1528719899&expire=1528741595&requiressl=yes&mime=video%2F3gpp&ip=176.122.175.49&pl=19&mn=sn-a5mekner%2Csn-q4fl6nez&mm=31%2C26&source=youtube&clen=11729360&itag=17&c=WEB&key=yt6&ipbits=0&initcwndbps=1665000&fvip=2&dur=1144.093&signature=421BDB985356B6B2EB9B116B931D7E9EE9886F14.906375E8F534E54DC66BD11A0814B057698D62F7",
            "format": "3GP144P"
        },
        "18": {
            "url": "https://r2---sn-a5mekner.googlevideo.com/videoplayback?ei=emoeW76MPIqS_APoxbO4BA&gir=yes&lmt=1528662364380517&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&ms=au%2Conr&id=o-APqRYnxr__gEe0QhcrU3BpnWeKFNv_ibPQwoGKuwr1rG&mv=m&mt=1528719899&expire=1528741595&requiressl=yes&mime=video%2Fmp4&ip=176.122.175.49&pl=19&mn=sn-a5mekner%2Csn-q4fl6nez&mm=31%2C26&source=youtube&clen=72878971&itag=18&c=WEB&key=yt6&ratebypass=yes&ipbits=0&initcwndbps=1665000&fvip=2&dur=1144.023&signature=C0DFA498763BF141A214F07067252BB458777B38.7CFA5E186D356B0B7AF60384FA52DF4A5040F11C",
            "format": "360P"
        },
        "22": {
            "url": "https://r2---sn-a5mekner.googlevideo.com/videoplayback?ei=emoeW76MPIqS_APoxbO4BA&itag=22&c=WEB&key=yt6&ratebypass=yes&ipbits=0&lmt=1528670668274195&sparams=dur%2Cei%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&ms=au%2Conr&id=o-APqRYnxr__gEe0QhcrU3BpnWeKFNv_ibPQwoGKuwr1rG&mv=m&mt=1528719899&expire=1528741595&requiressl=yes&initcwndbps=1665000&mime=video%2Fmp4&ip=176.122.175.49&fvip=2&dur=1144.000&source=youtube&pl=19&mn=sn-a5mekner%2Csn-q4fl6nez&mm=31%2C26&signature=29A3541E0A951AF941B8807D0DC4D766A815C76C.3FC7BA876B545B30DC7C6BEEB9CC3B5AD49B08B4",
            "format": "720P"
        },
        "36": {
            "url": "https://r2---sn-a5mekner.googlevideo.com/videoplayback?ei=emoeW76MPIqS_APoxbO4BA&gir=yes&lmt=1528662400138695&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&ms=au%2Conr&id=o-APqRYnxr__gEe0QhcrU3BpnWeKFNv_ibPQwoGKuwr1rG&mv=m&mt=1528719899&expire=1528741595&requiressl=yes&mime=video%2F3gpp&ip=176.122.175.49&pl=19&mn=sn-a5mekner%2Csn-q4fl6nez&mm=31%2C26&source=youtube&clen=32587938&itag=36&c=WEB&key=yt6&ipbits=0&initcwndbps=1665000&fvip=2&dur=1144.093&signature=34EA17D36FD10AAF1B61D4062D261CC55875E82D.80ED0975B122CE3E6C47A7A73F5614B877C8E2AE",
            "format": "Unknown"
        },
        "43": {
            "url": "https://r2---sn-a5mekner.googlevideo.com/videoplayback?ei=emoeW76MPIqS_APoxbO4BA&gir=yes&lmt=1528675778510177&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&ms=au%2Conr&id=o-APqRYnxr__gEe0QhcrU3BpnWeKFNv_ibPQwoGKuwr1rG&mv=m&mt=1528719899&expire=1528741595&requiressl=yes&mime=video%2Fwebm&ip=176.122.175.49&pl=19&mn=sn-a5mekner%2Csn-q4fl6nez&mm=31%2C26&source=youtube&clen=88514542&itag=43&c=WEB&key=yt6&ratebypass=yes&ipbits=0&initcwndbps=1665000&fvip=2&dur=0.000&signature=227ABE36082F82C45440901AF6A5088CF8F37297.38E3F395CAC95DDA0F2B56779049717A45510D8D",
            "format": "WebM360P"
        }
    }
}
转载原创文章请注明,转载自: LYLARES'S BLOG » YouTube视频地址解析API接口
  1. avatar

    不能解析了。

    1. lylares
      @云柯博客 啊,抽空瞧瞧。。
    2. lylares
      @云柯博客 看了下,解析正常啊...
  2. avatar

    不能解析

    1. lylares
      @随缘 我这边测试没有问题,你可以把链接提交到这里测试一下:https://parse.lylares.com/