فهرست منبع

change backup url

luojunhui 4 ماه پیش
والد
کامیت
ad85a314f2
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      applications/utils/download_video.py

+ 4 - 1
applications/utils/download_video.py

@@ -80,6 +80,8 @@ def download_sph_video(download_url, key):
     """
     download video, decrypt video and save to local
     """
+    print("downloading video from {}".format(download_url))
+    print("key is {}".format(key))
     file_id = uuid4().hex
     encrypted_path = f"static/encrypted_{file_id}.mp4"
     decrypted_path = f"static/decrypted_{file_id}.mp4"
@@ -107,7 +109,7 @@ def download_sph_video(download_url, key):
         raise RuntimeError(f"Video processing failed: {str(e)}") from e
 
 
-def decrypt_sph_video(video_path: str, key, save_path: str) -> None:
+def decrypt_sph_video(video_path: str, key: int,  save_path: str) -> None:
     """
     Decrypt video file using C library.
     Args:
@@ -117,6 +119,7 @@ def decrypt_sph_video(video_path: str, key, save_path: str) -> None:
     Raises:
         RuntimeError: If decryption fails
     """
+    print("key is {}".format(key))
     ffi = cffi.FFI()
     ffi.cdef('void decrypt(unsigned char *data, const size_t data_length, const uint32_t key);')