GithubHelp home page GithubHelp logo

schlopp96 / v2mp3 Goto Github PK

View Code? Open in Web Editor NEW
4.0 0.0 1.0 431 KB

Compact video-to-audio conversion tool with built-in YouTube video/audio download functionality. Currently only compatible with Windows-based systems.

License: GNU General Public License v3.0

Python 100.00%
youtube video-to-audio python-gui pysimplegui ffmpeg youtube-dl conversion file-conversion file-format-converter youtube-audio-downloader youtube-video-downloader audio-video-downloader gui windows-desktop-application youtube-to-mp3-converter

v2mp3's Introduction

V2Mp3

Logo


About

V2Mp3 is a simple, compact video-to-audio conversion tool with built-in YouTube video/audio download functionality.

  • Convert locally stored video files (of any file-format supported by ffmpeg) to .mp3 audio.

    • A few of these formats include:
      • .aiff
      • .avi
      • .flv
      • .gif
      • .mov
      • .mpg
      • .mp4
      • .ogv
      • .qt
      • .wmv
      • many others.
  • Download YouTube videos as .mp4 files.

  • Download YouTube audio as .mp3 files.


Installation

Using pip

Easiest method. Highly recommended over manual installation.

  • Run the following to install using pip:

    pip install V2Mp3
  • You should now be able to import/run V2Mp3 within your python environment by entering the following:

    >>> from V2Mp3 import v2mp3
    >>> v2mp3() # open program window.
    ...
  • Done!


Manual Installation

Not recommended.

  1. Start by doing one of two things:

    • A. Download source code *.zip archive from the V2Mp3 GitHub repo "releases" tab, and extract the contents to your desired installation directory.
    • B. Clone the repo with the git client of your choice by entering the following command:
      • git clone https://github.com/schlopp96/V2Mp3/releases/latest/
  2. Navigate to directory containing extracted contents, and open said directory within a terminal.

  3. Install all dependencies for this package by entering the following command:

    • pip install -r requirements.txt
  4. (OPTIONAL)

    • Move the V2Mp3-vx.x.x directory to your global Python 3rd-party package installation directory to be able to import V2Mp3 like any other module:
      • "path/to/python/Lib/site-packages/HERE"
  • You should now be able to import/run V2Mp3 within your python environment by entering the following:
  >>> from V2Mp3 import v2mp3
  >>> v2mp3() # open program window.
...
  • Done!

Usage

Using V2Mp3 is generally straightforward, with directions and tooltips built in to the GUI describing what to do if you're confused.

  • You can quickly start V2Mp3 using this simple CLI command:
  v2mp3
  • Other ways to start V2Mp3 include:

    • Entering python -m V2Mp3 in a terminal.
    • Importing V2Mp3 in a python environment and calling V2Mp3.v2mp3() from within that environment (as illustrated above).
    • Opening "~/V2Mp3/main.pyw" from a file explorer.

Structure

First Containing Frame

  • Home to the YouTube download section
  • Enter your desired YouTube video's URL address in the input field.
    • Also works with YouTube Music addresses.
  • Choose whether to download the video as normal, or just the audio from the video.
  • Once ready, click the "Download" button to begin.
  • You can find your downloaded videos within the V2Mp3 installation directory:
    • "~/V2Mp3/downloads/videos"

Second Containing Frame

  • Contains the section for conversion of your local video files.
  • Use the "Browse" button to choose a video file you wish to convert to audio.
  • Once you've chosen a video, click the "Convert File" button at the bottom of the first frame.
  • The text output window at the bottom of the application window will display whether or not the conversion was successful.
  • Newly converted .mp3 audio files can be found within the V2Mp3 installation directory:
    • "~/V2Mp3/downloads/audio"

Quick Look at V2Mp3

V2Mp3


Coming Soon

  • *.exe program build so that a Python env isn't necessary to run V2Mp3.

Contact


v2mp3's People

Contributors

schlopp96 avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

geofixit

v2mp3's Issues

WARNING: Application raises traceback error when used with certain Python versions

The Issue

Hello!

So during development, after extensively testing V2Mp3, no problems were found when running the application locally in a dev environment.

However, when testing the application in a typical user environment, the following exception was returned upon running V2Mp3, causing the program to immediately close:

  • AttributeError: module 'typing' has no attribute '_ClassVar'. Did you mean: 'ClassVar'?

Full Traceback

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import V2Mp3
  File "C:\Python\lib\site-packages\V2Mp3\__init__.py", line 1, in <module>
    from .main import main as v2mp3
  File "C:\Python\lib\site-packages\V2Mp3\main.pyw", line 12, in <module>
    from V2Mp3.appEvents.events import _event_loop
  File "C:\Python\lib\site-packages\V2Mp3\appEvents\events.py", line 5, in <module>
    import moviepy.editor as mv
  File "C:\Python\lib\site-packages\moviepy\editor.py", line 24, in <module>
    import imageio
  File "C:\Python\lib\site-packages\imageio\__init__.py", line 24, in <module>
    from .core import FormatManager, RETURN_BYTES
  File "C:\Python\lib\site-packages\imageio\core\__init__.py", line 16, in <module>
    from .format import Format, FormatManager
  File "C:\Python\lib\site-packages\imageio\core\format.py", line 40, in <module>
    from ..config import known_plugins, known_extensions, PluginConfig, FileExtension
  File "C:\Python\lib\site-packages\imageio\config\__init__.py", line 7, in <module>
    from .plugins import known_plugins, PluginConfig
  File "C:\Python\lib\site-packages\imageio\config\plugins.py", line 3, in <module>
    from ..core.legacy_plugin_wrapper import LegacyPlugin
  File "C:\Python\lib\site-packages\imageio\core\legacy_plugin_wrapper.py", line 5, in <module>
    from .v3_plugin_api import PluginV3, ImageProperties
  File "C:\Python\lib\site-packages\imageio\core\v3_plugin_api.py", line 9, in <module>
    class ImageProperties:
  File "C:\Python\lib\site-packages\dataclasses.py", line 958, in dataclass
    return wrap(_cls)
  File "C:\Python\lib\site-packages\dataclasses.py", line 950, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
  File "C:\Python\lib\site-packages\dataclasses.py", line 800, in _process_class
    cls_fields = [_get_field(cls, name, type)
  File "C:\Python\lib\site-packages\dataclasses.py", line 800, in <listcomp>
    cls_fields = [_get_field(cls, name, type)
  File "C:\Python\lib\site-packages\dataclasses.py", line 659, in _get_field
    if (_is_classvar(a_type, typing)
  File "C:\Python\lib\site-packages\dataclasses.py", line 550, in _is_classvar
    return type(a_type) is typing._ClassVar
AttributeError: module 'typing' has no attribute '_ClassVar'. Did you mean: 'ClassVar'?

Cause of Issue

  • This is apparently caused by an incompatibility with the dataclasses module and certain Python versions, such as Python 3.6> as first referenced here.

  • While never appearing in the V2Mp3 source code, the dataclasses module appears to be accessed by one of V2Mp3's dependencies, moviepy, which may explain why the exception occurs.

Workaround/Fix

Currently, the solution to this issue is to simply uninstall the dataclasses module if you are using Python 3.6 or above, as explained in this reply, and also here.

  • To fix this issue, enter the following command in your terminal/CLI:

      pip uninstall dataclasses -y
  • Once the workaround is applied, there should be no issues when running V2Mp3.

  • If any other workarounds or permanent fixes are found, I will update and list them accordingly.

Not working on macOS

I installed it successfully with pip install but it fails to run.

image

I'm using an Apple Silicon Mac if it helps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.