A package for downloading YouTube videos, extracting audio and frames, and analyzing sound intervals
Project description
youtube_downloader
VideoSoundAnalyzer is a Python package that allows you to download videos from YouTube, extract audio and frames from local videos, and analyze the intervals where there is sound in the extracted audio.
----> Github
Features
- Download videos from YouTube
- Extract audio from a video
- Extract frames from a video
- Analyze the intervals where there is sound in the extracted audio
- Save the sound intervals to a JSON file
Installation
You can install VideoSoundAnalyzer from PyPI using pip:
Usage
Here's an example of how to use the package:
from youtube_video_analyzer import VideoDownloader, AudioExtractor, SoundIntervalAnalyzer, FrameExtractor
# Download a video from YouTube
downloader = VideoDownloader(video_url, output_directory)
video_path = downloader.download_video()
# Extract frame of frame : select a intervals
frame_extractor = FrameExtractor(video_path, output_directory, quality, oneperframe )
frame_extractor.extract_frames()
# Extract audio from the downloaded video
if video_path:
output_audio_path = "audio/source.mp3"
extractor = AudioExtractor(video_path, output_audio_path)
extractor.extract_audio()
# Analyze the sound intervals
analyzer = SoundIntervalAnalyzer(output_audio_path)
analyzer.create_sound_intervals_json()
output json file extractor sound
[
[1.0448979591836736, 2.2058956916099772],
[2.4380952380952383, 3.250793650793651],
[4.1099319727891155, 4.620770975056689],
[4.690430839002268, 5.5495691609977325],
[5.7817687074829935, 6.339047619047619]
]
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributors
Cornélius vincent linkedin
Acknowledgments
This package utilizes the following libraries:
- pytube
- MoviePy
- librosa
- imageio
- NumPy
- json
- os
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file youtube_video_analyzer-0.1.2.tar.gz.
File metadata
- Download URL: youtube_video_analyzer-0.1.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4bcc1e1fce36aecba807831c727841daa9b4172faeff904e740a6ebc0cd8d40
|
|
| MD5 |
af45c2a23b29e37818047894cf8edef2
|
|
| BLAKE2b-256 |
c16a7ea6b3fdabfd4a59679cc1ba118cbbe30e81abc6ebf2bfc780ff2ae3a37e
|
File details
Details for the file youtube_video_analyzer-0.1.2-py3-none-any.whl.
File metadata
- Download URL: youtube_video_analyzer-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11a29b3affbf7565edf861a0c41c4c4ff119fabae66e81c1c61e73094f7dceed
|
|
| MD5 |
eb850fb8c1376e6d5c31b2551cd9964f
|
|
| BLAKE2b-256 |
4a880b16a233cccfc1aca08b769cb8dc4ccdec600f7b234249a564ef166d91cd
|