Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6aa80ea

Browse files
Removed whitespaces
1 parent 0c53033 commit 6aa80ea

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

‎Video-Audio-Converter-GUI/converter.py‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ def get_video_file():
1616
"""
1717
Function that gets the video file that needs to be converted
1818
"""
19-
global video_filepath, video_file
20-
19+
global video_filepath, video_file
2120
video_filepath.set(filedialog.askopenfilename(title="Select your video file", filetypes=[
2221
('MP4 (mp4, m4a, m4v, f4v, f4a, m4b, m4r, f4b, mov)','*.mp4 *.m4a *.m4v *.f4v *.f4a *.m4b *.m4r *.f4b *.mov'),
2322
('3GP (3gp, 3gp2, 3g2, 3gpp, 3gpp2)','*.3gp *.3gp2 *.3g2 *.3gpp *.3gpp2'),
@@ -26,17 +25,13 @@ def get_video_file():
2625
('FLV','*.flv'), ('AVI','*.avi'), ('MPEG-1 (mpg, mp2, mpeg, mpe, mpv )','*.mpg *.mp2 *.mpeg *.mpe *.mpv'),
2726
('MPEG-2','*.mpg *.mpeg *.m2v')]))
2827
video_file = VideoFileClip(str(video_filepath.get()))
29-
30-
31-
3228

3329
def save_audio_file():
3430
"""
3531
Function that converts video file into audio file in a path that the user chooses
36-
3732
"""
3833
global audio_filepath, audio_file, progress_bar
39-
audio_filepath.set(filedialog.asksaveasfilename(defaultextension='.mp3',
34+
audio_filepath.set(filedialog.asksaveasfilename(defaultextension='.mp3',
4035
title="Select your audio file directory", filetypes=[
4136
('MP3 File','*.mp3'), ('Wave File','*.wav')]))
4237
try:
@@ -47,26 +42,22 @@ def save_audio_file():
4742
messagebox.showinfo(message="File converted successfully")
4843
except:
4944
messagebox.showerror(message="File could not be converted", title="File Error")
50-
5145
# Resetting the video and audio paths
5246
video_filepath.set('')
5347
audio_filepath.set('')
54-
5548
# Resetting the progressbar after function execution
5649
progress_bar['value'] = 0
5750
progress_bar.stop()
5851

5952
def run_program():
6053
"""
6154
Function that runs the process of conversion and loading bar concurrently
62-
6355
"""
6456
global progress_bar
6557
t1 = threading.Thread(target=progress_bar.start)
6658
t2 = threading.Thread(target=save_audio_file)
6759
t2.start()
6860
t1.start()
69-
7061

7162
# Intializing main program settings
7263
main_prog = Tk()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /