如何从vimeo私有视频中获取私有元数据

我无法从私有元素,持续时间,图像等获取私有元数据 在Vimeo中访问视频。 任何人都可以帮我找到解决方案吗?</ p>

我在私人模式的帐户中上传了一个视频。 我也无法获取元数据细节。</ p>

我使用PHP来获取详细信息。</ p>
</ div>

展开原文

原文

Hi i cant able to fetch the private meta data like title, duration,image,etc... from the private access video's in Vimeo. Can any one help me to find a solution for this?

I uploaded one video in my account with private mode. I cant able to fetch the meta data details too.

I am using PHP to fetch the details.

2个回答



这非常类似于:以编程方式获取URL /嵌入代码到私人Vimeo视频 </ p>

不幸的是,那里的答案没有被标记为答案 ,这是将两个问题链接在一起的必要步骤,所以我将在此处重新发布。</ p>



  1. https://developer.vimeo.com/apps </ li>
    </ ol>

    这对每个API应用都是必需的。 我们需要知道谁在使用我们的系统,以及如何在必要时联系他们。</ p>


    1. 生成访问令牌。</ li>
      </ ol>

      https://developer.vimeo上有一般文档。 com / api / authentication ,但您可能正在使用“单用户应用程序”工作流程。 这是一个崇高的标题,“通过应用程序页面上的UI生成访问令牌,然后将其硬编码到您的应用程序中”。 此访问令牌将代表注册该应用程序的用户与API进行交互。</ p>


      1. 请求您的视频信息。</ li>
        </ ol>

        有许多不同的API调用来获取视频信息。 您可以在 https://developer.vimeo.com/api/endpoints 找到这些内容。 / me / videos将显示所有经过身份验证的用户视频,/ videos / {video_id}将显示单个视频。</ p>


        如果您是 使用PHP,你应该使用官方的Vimeo PHP库: https://github.com/vimeo/vimeo.php </ p>
        </ div>

展开原文

原文

This is very similar to: Get URL/Embed code to private Vimeo videos programatically

Unfortunately the answer there has not been marked as the answer, a necessary step to link the two questions together, so I'll repost it here.


  1. Register an API app on https://developer.vimeo.com/apps

This is necessary for every API app. We need to know who is using our system, and how to contact them if necessary.

  1. Generate an access token.

There is general documentation at https://developer.vimeo.com/api/authentication, but you will likely be using the "single user application" workflow. It's a lofty title for "generate an access token via the UI on your application page, then hard code it into your app". This access token will interact with the API on behalf of the user who registered the application.

  1. Request your video information.

There are many different API calls to get video information. You can find these at https://developer.vimeo.com/api/endpoints. /me/videos will show all of the authenticated users videos, /videos/{video_id} will show a single video.


One extra note, if you are using PHP you should use the official Vimeo PHP library: https://github.com/vimeo/vimeo.php

Visite https://github.com/leandrocfe/PHPVimeoAPI_List_Private_Video

List private videos from Vimeo

  1. Modify config.json info vimeo account;
  2. Access video.php and add vimeo_video_id get param. Ex: localhost/vimeo/video.php?id=123123123

    <?php
    
    //utf-8
    header('Content-Type: text/html; charset=utf-8');
    
    //lib vimeo
    use Vimeo\Vimeo;
    
    //métodos de inicialização
    $config = require(__DIR__ . '/init.php');
    
    //vimeo video id
    @$id = $_GET["id"];
    
    //isset get
    if(isset($id)){
    
        // vimeo class send config.json paramns
        $lib = new Vimeo($config['client_id'], $config['client_secret'], $config['access_token']);
    
        //get data vimeo video
        $me = $lib->request("/me/videos/$id");
    
        //iframe vídeo
        $embed = $me["body"]["embed"]["html"];
    
        //edit video size
        $default_size = 'width="'.$me["body"]["width"].'" height="'.$me["body"]["height"].'"';
        $new_size = 'width="420" height="220"';
    
        $embed = str_replace($default_size, $new_size, $embed);
    
        //autoplay
        $embed = str_replace('player_id=0', 'player_id=0&autoplay=1', $embed);
    
    }else{
    
        echo("Not find get id video");
    }
    ?>
    <!DOCTYPE html>
    <html>
        <head>
            <title>Vimeo Vídeo</title>
        </head>
        <body>
            <div><?php echo $embed ?></div>
            <div>
                <p><b>Name: </b><?php print_r($me["body"]["name"]); ?></p>
                <p><b>Description: </b><?php print_r($me["body"]["description"]); ?></p>
                <p><b>Link: </b><?php print_r($me["body"]["link"]); ?></p>
                <p><b>Likes: </b><?php print_r($me["body"]["embed"]["buttons"]["like"]); ?></p>
                <p><b>Data Created: </b><?php print_r($me["body"]["created_time"]); ?></p>
                <p><b>Data Modified: </b><?php print_r($me["body"]["modified_time"]); ?></p>
                <p><b>Images: </b>
                    <?php print_r($me["body"]["pictures"]["uri"]); ?> |
                    <?php print_r($me["body"]["pictures"]["sizes"][0]["link"]); ?> |
                    <?php print_r($me["body"]["pictures"]["sizes"][1]["link"]); ?> |
                    <?php print_r($me["body"]["pictures"]["sizes"][2]["link"]); ?> |
                    <?php print_r($me["body"]["pictures"]["sizes"][3]["link"]); ?> |
                    <?php print_r($me["body"]["pictures"]["sizes"][4]["link"]); ?> |
                    <?php print_r($me["body"]["pictures"]["sizes"][5]["link"]); ?>
                    </p>
            </div>
            <div><?php //print_r($me); //use for show all options ?></div>
        </body>
    </html>
    
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问