mirror of
https://cdm-project.com/Download-Tools/udemy-downloader.git
synced 2025-04-30 04:04:27 +02:00
Fixed an unexpected error where the program would try to execute the ffmpeg.py file instead of the .exe during mux process
This commit is contained in:
parent
f8521fd84c
commit
6c2690b856
@ -14,7 +14,11 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVE
|
||||
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
import re, time, logging, subprocess, sys
|
||||
import re
|
||||
import time
|
||||
import logging
|
||||
import subprocess
|
||||
import sys
|
||||
from colorama import Fore, Style
|
||||
|
||||
|
||||
@ -271,4 +275,4 @@ class FFMPeg:
|
||||
raise KeyboardInterrupt
|
||||
except KeyboardInterrupt:
|
||||
raise KeyboardInterrupt
|
||||
return retVal
|
||||
return retVal
|
||||
|
17
main.py
17
main.py
@ -787,12 +787,12 @@ def mux_process(video_title, lecture_working_dir, output_path):
|
||||
@author Jayapraveen
|
||||
"""
|
||||
if os.name == "nt":
|
||||
command = "ffmpeg -y -i \"{}\" -i \"{}\" -acodec copy -vcodec copy -fflags +bitexact -map_metadata -1 -metadata title=\"{}\" \"{}\"".format(
|
||||
command = "ffmpeg.exe -y -i \"{}\" -i \"{}\" -acodec copy -vcodec copy -fflags +bitexact -map_metadata -1 -metadata title=\"{}\" \"{}\"".format(
|
||||
os.path.join(lecture_working_dir, "decrypted_audio.mp4"),
|
||||
os.path.join(lecture_working_dir, "decrypted_video.mp4"),
|
||||
video_title, output_path)
|
||||
else:
|
||||
command = "nice -n 7 ffmpeg -y -i \"{}\" -i \"{}\" -acodec copy -vcodec copy -fflags +bitexact -map_metadata -1 -metadata title=\"{}\" \"{}\"".format(
|
||||
command = "nice -n 7 ffmpeg.exe -y -i \"{}\" -i \"{}\" -acodec copy -vcodec copy -fflags +bitexact -map_metadata -1 -metadata title=\"{}\" \"{}\"".format(
|
||||
os.path.join(lecture_working_dir, "decrypted_audio.mp4"),
|
||||
os.path.join(lecture_working_dir, "decrypted_video.mp4"),
|
||||
video_title, output_path)
|
||||
@ -807,13 +807,12 @@ def decrypt(kid, filename, lecture_working_dir):
|
||||
try:
|
||||
key = keyfile[kid.lower()]
|
||||
if (os.name == "nt"):
|
||||
code = os.system(
|
||||
f"mp4decrypt --key 1:%s \"%s\" \"%s\"" %
|
||||
(key,
|
||||
os.path.join(lecture_working_dir,
|
||||
"encrypted_{}.mp4".format(filename)),
|
||||
os.path.join(lecture_working_dir,
|
||||
"decrypted_{}.mp4".format(filename))))
|
||||
os.system(f"mp4decrypt --key 1:%s \"%s\" \"%s\"" %
|
||||
(key,
|
||||
os.path.join(lecture_working_dir,
|
||||
"encrypted_{}.mp4".format(filename)),
|
||||
os.path.join(lecture_working_dir,
|
||||
"decrypted_{}.mp4".format(filename))))
|
||||
else:
|
||||
os.system(f"nice -n 7 mp4decrypt --key 1:%s \"%s\" \"%s\"" %
|
||||
(key,
|
||||
|
Loading…
x
Reference in New Issue
Block a user