2021-協同產品設計實習-stage1-ag5

  • Home
    • Site Map
    • reveal
    • blog
  • About
  • W2
  • W3
  • W4
W3 << Previous

W4

預定進度:上台報告

2021-協同產品設計實習-stage1-ag5報告書

2021-協同產品設計實習-stage1-ag5影片

各組簡報所花費的時間

討論

若檔案數較大應如何若檔案數較大應如何計算各組花費時間

除了手動逐一計算外,透過參考文獻我們發現可用ffprobe來使用外部指令,也就是從FFmpeg Wiki運行以下命令

import subprocess

def get_length(filename):
    result = subprocess.run(["ffprobe", "-v", "error", "-show_entries",
                             "format=duration", "-of",
                             "default=noprint_wrappers=1:nokey=1", filename],
        stdout=subprocess.PIPE,
        stderr=subprocess.STDOUT)
    return float(result.stdout)

參考資料:https://stackoverflow.com/questions/3844430/how-to-get-the-duration-of-a-video-in-python


W3 << Previous

Copyright © All rights reserved | This template is made with by Colorlib