Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
x4nth055 committed Nov 17, 2021
2 parents f3edf80 + 51cf065 commit 83ac242
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy
- [How to Concatenate Audio Files in Python](https://www.thepythoncode.com/article/concatenate-audio-files-in-python). ([code](python-for-multimedia/combine-audio))
- [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))
- [How to Reverse Videos in Python](https://www.thepythoncode.com/article/reverse-video-in-python). ([code](python-for-multimedia/reverse-video))
- [How to Extract Video Metadata in Python](https://www.thepythoncode.com/article/extract-media-metadata-in-python). ([code](python-for-multimedia/extract-video-metadata))


For any feedback, please consider pulling requests.
4 changes: 4 additions & 0 deletions python-for-multimedia/extract-video-metadata/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# [How to Extract Video Metadata in Python](https://www.thepythoncode.com/article/extract-media-metadata-in-python)
To run this:
- Install [FFmpeg](https://www.ffmpeg.org/) program.
- `pip3 install -r requirements.txt`
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ffmpeg
import sys
from pprint import pprint # for printing Python dictionaries in a human-readable way

# read the audio/video file from the command line arguments
media_file = sys.argv[1]
# uses ffprobe command to extract all possible metadata from the media file
pprint(ffmpeg.probe(media_file)["streams"])
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ffmpeg-python
Binary file not shown.
Binary file not shown.

0 comments on commit 83ac242

Please sign in to comment.