mirror of
https://cdm-project.com/Download-Tools/udemy-downloader.git
synced 2025-05-04 01:44:27 +02:00
Failed to parse creation_time fix both plf
This commit is contained in:
parent
840a6f6815
commit
5af8a95925
7
main.py
7
main.py
@ -1,4 +1,4 @@
|
|||||||
import os, requests, shutil, json, glob, urllib.request, argparse, sys
|
import os, requests, shutil, json, glob, urllib.request, argparse, sys, datetime
|
||||||
from sanitize_filename import sanitize
|
from sanitize_filename import sanitize
|
||||||
import urllib.request
|
import urllib.request
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
@ -131,10 +131,11 @@ def cleanup(path):
|
|||||||
|
|
||||||
|
|
||||||
def mux_process(video_title, lecture_working_dir, outfile):
|
def mux_process(video_title, lecture_working_dir, outfile):
|
||||||
|
time_stamp = datetime.datetime.now().isoformat()+'Z'
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
command = f"ffmpeg -y -i \"{lecture_working_dir}\\decrypted_audio.mp4\" -i \"{lecture_working_dir}\\decrypted_video.mp4\" -acodec copy -vcodec copy -fflags +bitexact -map_metadata -1 -metadata title=\"{video_title}\" -metadata creation_time=2020-00-00T70:05:30.000000Z \"{outfile}\""
|
command = f"ffmpeg -y -i \"{lecture_working_dir}\\decrypted_audio.mp4\" -i \"{lecture_working_dir}\\decrypted_video.mp4\" -acodec copy -vcodec copy -fflags +bitexact -map_metadata -1 -metadata title=\"{video_title}\" -metadata creation_time=\"{time_stamp}\" \"{outfile}\""
|
||||||
else:
|
else:
|
||||||
command = f"nice -n 7 ffmpeg -y -i \"{lecture_working_dir}//decrypted_audio.mp4\" -i \"{lecture_working_dir}//decrypted_video.mp4\" -acodec copy -vcodec copy -fflags +bitexact -map_metadata -1 -metadata title=\"{video_title}\" -metadata creation_time=\"$(/bin/date -u \"+%FT%T.%6NZ\")\" \"{outfile}\""
|
command = f"nice -n 7 ffmpeg -y -i \"{lecture_working_dir}//decrypted_audio.mp4\" -i \"{lecture_working_dir}//decrypted_video.mp4\" -acodec copy -vcodec copy -fflags +bitexact -map_metadata -1 -metadata title=\"{video_title}\" -metadata creation_time=\"{time_stamp}\" \"{outfile}\""
|
||||||
os.system(command)
|
os.system(command)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user