Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit51cf065

Browse files
committed
add extracting video metadata tutorial
1 parentb59d30e commit51cf065

File tree

6 files changed

+14
-0
lines changed

6 files changed

+14
-0
lines changed

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy
174174
-[How to Concatenate Audio Files in Python](https://www.thepythoncode.com/article/concatenate-audio-files-in-python). ([code](python-for-multimedia/combine-audio))
175175
-[How to Extract Frames from Video in Python](https://www.thepythoncode.com/article/extract-frames-from-videos-in-python). ([code](python-for-multimedia/extract-frames-from-video))
176176
-[How to Reverse Videos in Python](https://www.thepythoncode.com/article/reverse-video-in-python). ([code](python-for-multimedia/reverse-video))
177+
-[How to Extract Video Metadata in Python](https://www.thepythoncode.com/article/extract-media-metadata-in-python). ([code](python-for-multimedia/extract-video-metadata))
177178

178179

179180
For any feedback, please consider pulling requests.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#[How to Extract Video Metadata in Python](https://www.thepythoncode.com/article/extract-media-metadata-in-python)
2+
To run this:
3+
- Install[FFmpeg](https://www.ffmpeg.org/) program.
4+
-`pip3 install -r requirements.txt`
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
importffmpeg
2+
importsys
3+
frompprintimportpprint# for printing Python dictionaries in a human-readable way
4+
5+
# read the audio/video file from the command line arguments
6+
media_file=sys.argv[1]
7+
# uses ffprobe command to extract all possible metadata from the media file
8+
pprint(ffmpeg.probe(media_file)["streams"])
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ffmpeg-python
149 KB
Binary file not shown.
719 KB
Binary file not shown.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp