
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
When I am dealing pics,mp3,mp4. I always want a media utils to help me work, that's why this project start
pip install easy-media-utils
git clone https://github.com/aceliuchanghong/easy-media-utils.git
conda create -n dealMedia python=3.11
conda activate dealMedia
pip install -r requirements.txt
ๅๅพๅฎ็ฝ,ไธ่ฝฝๅฏนๅบ็ๆฌ็ๆไปถ,่งฃๅๆพๅจๆฌๅฐๆไปถๅนถไธ้ ็ฝฎ็ฏๅขๅ้,็กฎไฟๅฏไปฅ่ฎฟ้ฎๅฐ
ffmpeg -version
path = r'D:\aprojectPython\pythonProject\easy-media-utils'
print_tree(path)
easy-media-utils/
|
โโโ LICENSE
โโโ README.md
โโโ requirements.txt
โโโ setup.py
โโโ base_model/
โ โโโ MediaHandler.py
โ โโโ __init__.py
โโโ image_utils/
โ โโโ __init__.py
โ โโโ gpt_prompt.md
โ โโโ converters/
โ โ โโโ __init__.py
โ โ โโโ format_converter.py
โ โ โโโ image_to_text.py
โ โ โโโ text_add_to_image.py
โ โโโ core/
โ โ โโโ __init__.py
โ โ โโโ exceptions.py
โ โ โโโ image_handler.py
โ โโโ editors/
โ โ โโโ __init__.py
โ โ โโโ cropper.py
โ โ โโโ resizer.py
โ โโโ tests/
โ โ โโโ __init__.py
โ โ โโโ test_converters.py
โ โ โโโ test_editors.py
โ โ โโโ test_utils.py
โ โโโ utils/
โ โโโ __init__.py
โ โโโ image_utils.py
โโโ mp3_utils/
โ โโโ __init__.py
โ โโโ gpt_prompt.md
โ โโโ converters/
โ โ โโโ __init__.py
โ โ โโโ audio_format_converter.py
โ โ โโโ mp3_to_text.py
โ โโโ core/
โ โ โโโ __init__.py
โ โ โโโ exceptions.py
โ โ โโโ mp3_handler.py
โ โโโ editors/
โ โ โโโ __init__.py
โ โ โโโ effects.py
โ โ โโโ trimmer.py
โ โโโ tests/
โ โ โโโ __init__.py
โ โ โโโ test_converters.py
โ โ โโโ test_editors.py
โ โโโ utils/
โ โโโ __init__.py
โ โโโ mp3_utils.py
โโโ mp4_utils/
โ โโโ __init__.py
โ โโโ gpt_prompt.md
โ โโโ converters/
โ โ โโโ __init__.py
โ โ โโโ mp4_to_gif.py
โ โ โโโ mp4_to_mp3.py
โ โ โโโ mp4_to_pngs.py
โ โ โโโ tv_to_mp4.py
โ โโโ core/
โ โ โโโ __init__.py
โ โ โโโ exceptions.py
โ โ โโโ mp4_handler.py
โ โโโ editors/
โ โ โโโ __init__.py
โ โ โโโ orientation.py
โ โ โโโ resizer.py
โ โโโ tests/
โ โ โโโ __init__.py
โ โ โโโ test_converters.py
โ โ โโโ test_editors.py
โ โโโ utils/
โ โโโ __init__.py
โ โโโ file_utils.py
โ โโโ mp4_utils.py
โโโ testfiles/
โโโ tree_utils/
โโโ __init__.py
โโโ struct_tree_out.py
from mp4_utils.converters.mp4_to_gif import MP4ToGIFConverter
from mp4_utils.converters.mp4_to_mp3 import MP4ToMP3Converter
from mp4_utils.converters.mp4_to_pngs import MP4ToPNGsConverter
from mp4_utils.converters.tv_to_mp4 import TVToMP4Converter
from mp4_utils.core.mp4_handler import MP4Handler
def main(converter_type, file_path='../../testfiles/onboard_cover.mp4') -> MP4Handler:
"""
Convert MP4 each frame.
:param converter_type:
:param file_path:
"""
Converter = {
"gif": MP4ToGIFConverter,
"mp3": MP4ToMP3Converter,
"img": MP4ToPNGsConverter,
"other": TVToMP4Converter,
}
# converter = Converter[converter_type](file_path)
converter = Converter.get(converter_type)(file_path)
return converter
if __name__ == "__main__":
file_path = '../../testfiles/out/onboard_cover.mp4'
gif_out_path = '../../testfiles/out/output.gif'
mp3_out_path = '../../testfiles/out/output.mp3'
pngs_out_path = '../../testfiles/out/pngs_output'
mp4_out_path = '../../testfiles/out/Sample.mp4'
conv_file = '../../testfiles/out/Sample.mkv'
converter_type = "img"
ans_path = pngs_out_path
converter = main(converter_type, file_path)
converter.process(ans_path)
from mp3_utils.converters.audio_format_converter import AudioFormatConverter
from mp3_utils.core.mp3_handler import MP3Handler
def main(converter_type, file_path='../../testfiles/out/output.mp3') -> MP3Handler:
"""
Convert MP4 each frame.
:param converter_type:
:param file_path:
"""
Converter = {
"format": AudioFormatConverter,
}
converter = Converter.get(converter_type)(file_path)
return converter
if __name__ == "__main__":
mp3_path = '../../testfiles/out/output.mp3'
wav_path = '../../testfiles/out/output.wav'
flac_path = '../../testfiles/out/output.flac'
converter_type = "format"
ans_path = flac_path
converter = main(converter_type, wav_path)
converter.process(ans_path, 'flac')
from image_utils.converters.format_converter import FormatConverter
test_image_path = "../../testfiles/out/pngs_output/frame_0001.png"
output_path = "../../testfiles/out/imgs_output"
txt = "ไฝ ๅฅฝ"
if __name__ == '__main__':
converter = FormatConverter(test_image_path)
converter.process(output_path, "png")
FAQs
A collection of Python utilities for handling media files.
We found that easy-media-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.