Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
accessibility_movie_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵心治
accessibility_movie_2
Commits
b26cb23d
Commit
b26cb23d
authored
Aug 14, 2023
by
陈晓勇(工程师)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev 4 pb audio
parent
c340fe7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ffmpeg_util.py
ffmpeg_util.py
+3
-2
No files found.
ffmpeg_util.py
View file @
b26cb23d
...
@@ -4,6 +4,7 @@ import os
...
@@ -4,6 +4,7 @@ import os
import
subprocess
import
subprocess
import
math
import
math
import
time
import
time
import
shutil
def
calculate_audio_volume
(
file_path
):
def
calculate_audio_volume
(
file_path
):
# 使用FFmpeg获取音频分贝值
# 使用FFmpeg获取音频分贝值
...
@@ -45,9 +46,9 @@ def adjust_audio_volume(input_file, volume_adjustment):
...
@@ -45,9 +46,9 @@ def adjust_audio_volume(input_file, volume_adjustment):
]
]
print
(
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>cg audio"
+
input_file
+
str
(
volume_adjustment
))
print
(
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>cg audio"
+
input_file
+
str
(
volume_adjustment
))
subprocess
.
run
(
command
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
subprocess
.
run
(
command
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
time
.
sleep
(
1
)
os
.
remove
(
input_file
)
os
.
remove
(
input_file
)
os
.
rename
(
temp_path
,
input_file
)
# os.rename(temp_path, input_file)
shutil
.
move
(
temp_path
,
input_file
)
def
cg_wav
(
first_file_path
,
second_file_path
,
rate
):
def
cg_wav
(
first_file_path
,
second_file_path
,
rate
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment