ActionStreamer 0.6.2__tar.gz → 0.6.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/PKG-INFO +1 -1
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/CommonFunctions/CommonFunctions.py +19 -1
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/CommonFunctions/__init__.py +2 -2
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/pyproject.toml +1 -1
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/README.md +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/CommonFunctions/Wifi/Wifi.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/CommonFunctions/Wifi/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/Config/Config.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/Config/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/Device/Device.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/Device/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/Model/Model.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/Model/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/API/API.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/API/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/Event/Event.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/Event/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/File/File.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/File/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/Health/Health.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/Health/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/LogMessage/LogMessage.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/LogMessage/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/Patch/Patch.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/Patch/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/VideoClip/VideoClip.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/VideoClip/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/__init__.py +0 -0
- {actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/__init__.py +0 -0
{actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/CommonFunctions/CommonFunctions.py
RENAMED
|
@@ -283,7 +283,7 @@ def get_clock_cycles_per_millisecond() -> float:
|
|
|
283
283
|
return cycles_per_millisecond
|
|
284
284
|
|
|
285
285
|
|
|
286
|
-
def concatenate_videos(input_file_path1, input_file_path2, output_file_path):
|
|
286
|
+
def concatenate_videos(input_file_path1: str, input_file_path2: str, output_file_path: str):
|
|
287
287
|
|
|
288
288
|
# Generate a unique file name for the temporary file list
|
|
289
289
|
temp_file_name = str(uuid.uuid4()) + '.txt'
|
|
@@ -305,3 +305,21 @@ def concatenate_videos(input_file_path1, input_file_path2, output_file_path):
|
|
|
305
305
|
except OSError as e:
|
|
306
306
|
print(f"Error removing temporary file: {e}")
|
|
307
307
|
|
|
308
|
+
|
|
309
|
+
def get_video_length_in_seconds(file_path):
|
|
310
|
+
|
|
311
|
+
"""Get the length of a video in seconds."""
|
|
312
|
+
result = subprocess.run(['ffmpeg', '-i', file_path], stderr=subprocess.PIPE, stdout=subprocess.PIPE, text=True)
|
|
313
|
+
output = result.stderr
|
|
314
|
+
|
|
315
|
+
# Find the duration in the output
|
|
316
|
+
duration_match = re.search(r'Duration: (\d+):(\d+):(\d+\.\d+)', output)
|
|
317
|
+
|
|
318
|
+
if not duration_match:
|
|
319
|
+
raise ValueError(f"Could not determine the duration of the video {file_path}")
|
|
320
|
+
|
|
321
|
+
hours, minutes, seconds = map(float, duration_match.groups())
|
|
322
|
+
total_seconds = hours * 3600 + minutes * 60 + seconds
|
|
323
|
+
|
|
324
|
+
return total_seconds
|
|
325
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .CommonFunctions import StandardResult, switch, get_exception_info, get_line_number, log_to_console, send_signed_request, get_hmac_signature, dictionary_to_string, upload_file_to_s3, get_sha256_hash_for_file, create_folders, download_file
|
|
1
|
+
from .CommonFunctions import StandardResult, switch, get_exception_info, get_line_number, log_to_console, send_signed_request, get_hmac_signature, dictionary_to_string, upload_file_to_s3, get_sha256_hash_for_file, create_folders, download_file, concatenate_videos
|
|
2
2
|
from . import Wifi
|
|
3
3
|
|
|
4
|
-
__all__ = ['StandardResult', 'switch', 'get_exception_info', 'get_line_number', 'log_to_console', 'send_signed_request', 'get_hmac_signature', 'dictionary_to_string', 'upload_file_to_s3', 'get_sha256_hash_for_file', 'Wifi', 'create_folders', 'download_file']
|
|
4
|
+
__all__ = ['StandardResult', 'switch', 'get_exception_info', 'get_line_number', 'log_to_console', 'send_signed_request', 'get_hmac_signature', 'dictionary_to_string', 'upload_file_to_s3', 'get_sha256_hash_for_file', 'Wifi', 'create_folders', 'download_file', 'concatenate_videos']
|
|
File without changes
|
|
File without changes
|
{actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/CommonFunctions/Wifi/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/LogMessage/LogMessage.py
RENAMED
|
File without changes
|
{actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/LogMessage/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/VideoClip/VideoClip.py
RENAMED
|
File without changes
|
{actionstreamer-0.6.2 → actionstreamer-0.6.4}/actionstreamer/WebService/VideoClip/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|