dongyou5098 2013-09-19 14:39
浏览 120
已采纳

如何在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 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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 luckysheet
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱