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

Commit83ac242

Browse files
committed
2 parentsf3edf80 +51cf065 commit83ac242

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
@@ -175,6 +175,7 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy
175175
-[How to Concatenate Audio Files in Python](https://www.thepythoncode.com/article/concatenate-audio-files-in-python). ([code](python-for-multimedia/combine-audio))
176176
-[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))
177177
-[How to Reverse Videos in Python](https://www.thepythoncode.com/article/reverse-video-in-python). ([code](python-for-multimedia/reverse-video))
178+
-[How to Extract Video Metadata in Python](https://www.thepythoncode.com/article/extract-media-metadata-in-python). ([code](python-for-multimedia/extract-video-metadata))
178179

179180

180181
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
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp