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 82f592a

Browse files
Add files via upload
1 parent 6bedb3a commit 82f592a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import moviepy.editor as pyeditor
2+
import argparse
3+
4+
arg_parser = argparse.ArgumentParser()
5+
6+
arg_parser.add_argument("-v", "--videoFile", required=True,
7+
help="Video Filename with the complete path.")
8+
arg_parser.add_argument('-p', "--path", required=True,
9+
help="Audio Filename with absolute or relative path")
10+
11+
args = vars(arg_parser.parse_args())
12+
13+
try:
14+
Video_clip = pyeditor.VideoFileClip(r"{}".format(args['videoFile']))
15+
Video_clip.audio.write_audiofile(r"{}".format(args['path']))
16+
except Exception:
17+
print("Error!!! Something is worng.")

0 commit comments

Comments
(0)

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