A python module to extract audio from a video
Project description
Installation
Before Installation, vid2aud require soundscape_IR as dependency. Thus, install soundscape_IR first in a Python>=3.7.0 environment.
git clone https://github.com/meil-brcas-org/soundscape_IR.git
cd soundscape_IR
pip install -r requirements.txt
Run the following command to install vid2aud from PyPI.
pip install vid2aud
To install the latest version, clone the repository and install the module with dependencies from the top-level folder.
git clone https://github.com/yijensun/vid2aud.git
cd vid2aud
pip install . --use-feature=in-tree-build
Quick start
vid2aud allows importing video from both Google drive and local directory.
In this guide, we import video from Google drive. Assign the folder ID of the Google drive folder that contains video in folder_id and the video format in file_format (The folder ID is a string of text after the last / in your folder's url).
To import the video from local directory, use path to assign the directory instead.
from vid2aud import vid2aud
# loading video from Gdrive
test = vid2aud(folder_id='1r8OF_5Vu7p8tjdZwsf1maOcKHdmZWpuo', file_format='.mp4')
# loading video from local directory
#test = vid2aud(path='data/video/', file_format='.mp4')
Choose the video file desired to convert by file_no and assign file name and file format of the converted audio in audio_name and audio_format respectively.
#converting...
test.convert(file_no = 2, audio_name = 'GH020063', audio_format = '.wav')
By the function audio_visualization in soundscape_IR, we can plot the spectrogram of the converted audio.
from soundscape_IR.soundscape_viewer import audio_visualization
#Spectrogram of part of the converted audio
camera = audio_visualization('GH020063.wav', offset_read = 74, duration_read=15, FFT_size=2048, window_overlap=0, plot_type='Spectrogram', f_range=[50,4000], prewhiten_percent=0)
Currently ongoing developments
- Batch process videos
Bugs report and suggestions
If you encounter any bug or issue, please contact Yi-Jen Sun via elainesun442@gmail.com. Suggestions are also appreciated!
Project details
Release history Release notifications | RSS feed
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 vid2aud-0.1.0.tar.gz.
File metadata
- Download URL: vid2aud-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b490be2162c3d6f4e7c22ae57ab36ecf792399ac67faf200fc65f92e7d3c5104
|
|
| MD5 |
cb8b03f4f02892010f86323daf69680e
|
|
| BLAKE2b-256 |
6ea0f450de30eb658150fc3dda946bd5d7c4b7ec2d088a837ad911b5a6b44de4
|
File details
Details for the file vid2aud-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vid2aud-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afb64cfcb655a97da3a9c5517fa216291f9a6eb36e13c0858ce4a9a7b6eb0e22
|
|
| MD5 |
e7f1d7531a87fbe9ea150349c968688f
|
|
| BLAKE2b-256 |
d1be66d71e6e56f48bbec9571089b61e9059ca8f28bad77e7e204e14cdd2afdc
|