bit_rate 是位元速率
average_rate 是幀率
import av
video_file_path='/Volumes/SanDisk128G/標準影片/XiaoShengKeDeJiuShu_4-1080P.mp4'
with av.open(str(video_file_path), metadata_encoding='utf-8', metadata_errors='ignore') as container:
stream = container.streams.video[0]
print(stream.average_rate)
print(stream.bit_rate)
輸出結果:
╰─➤ python -u "/Users/ponponon/Desktop/code/me/pyav_example/1.py" 1 ↵
30
2631562