dongyou5098
2013-09-19 14:39 阅读 69
已采纳

如何在PHP中计算视频长度和大小?

I want to get video details like length, size, frame, height and width from one video url.

I got the video details after download video using ffmpeg but unable to find the details of video from URL.

Here is my download video youtube link.

http://r4---sn-np4tjvg2-cvhe.c.youtube.com/videoplayback?fexp=927610%2C935016%2C941300%2C916626%2C936204%2C924606%2C929117%2C929121%2C929906%2C929907%2C929922%2C929923%2C929127%2C929129%2C929131%2C929930%2C936403%2C925724%2C925726%2C936310%2C925720%2C925722%2C925718%2C925714%2C929917%2C906945%2C929933%2C929935%2C920302%2C906842%2C913428%2C920605%2C919811%2C935020%2C935021%2C932309%2C913563%2C919373%2C930803%2C908536%2C932211%2C938701%2C931924%2C934005%2C940501%2C936308%2C909549%2C901608%2C900816%2C912711%2C934507%2C907231%2C936312%2C906001&itag=17&sver=3&expire=1379625974&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&mt=1379599833&mv=u&id=a1902c59b3e797d1&upn=rjoiIino7rU&factor=1.25&source=youtube&ms=au&algorithm=throttle-factor&burst=40&gcr=in&key=yt1&ip=202.191.214.174&cp=U0hWTlZNU19MTkNONl9OR1dKOlZGT2E1U2xXM0hN&ipbits=8&signature=CEE61FCB88931236269EE8661F62C1D834DCD32E.95869B5D4D79ED6D4D890749A49C228631CD3340
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    du8980919 du8980919 2013-09-19 14:50

    Please use youtube api

    https://www.googleapis.com/youtube/v3/videos?part=contentDetails%2Cstatistics&id=voNEBqRZmBc&key={YOUR_API_KEY}
    

    Youtube API get video length and views

    Or use json

    https://gdata.youtube.com/feeds/api/videos/(the-video-id)?v=2&alt=json
    
    点赞 评论 复制链接分享

相关推荐