Video meta data using python

纵然是瞬间 提交于 2019-12-18 13:15:37

问题


Hi want to extract video meta tags using Python as described. On stackoverflow, I found kaa module which is not supported in Windows. Can anyone suggest me python library that can work on across the platforms?


回答1:


Have you seen Hachoir? It 'extracts metadata from multimedia files'.

The different file format parsers give differing levels of detail, but it might be what you are looking for. Here's an example of metatdata extraction from an AVI file:

$ hachoir-metadata pacte_des_gnous.avi
Common:
- Duration: 4 min 25 sec
- Comment: Has audio/video index (248.9 KB)
- MIME type: video/x-msvideo
- Endian: Little endian
Video stream:
- Image width: 600
- Image height: 480
- Bits/pixel: 24
- Compression: DivX v4 (fourcc:"divx")
- Frame rate: 30.0
Audio stream:
- Channel: stereo
- Sample rate: 22.1 KHz
- Compression: MPEG Layer 3



回答2:


You could try enzyme though the refactoring has caused the manual to become outdated.

Also, ffmpeg is a very powerful tool and you can read video metadata using the command:

ffmpeg -i <videofile> -f ffmetadata metadata.txt


来源:https://stackoverflow.com/questions/4969497/video-meta-data-using-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!