This commit is contained in:
2025-05-10 22:26:07 +03:00
parent 0f083e78b0
commit b1559227af
2 changed files with 13 additions and 1 deletions

View File

@@ -1 +1 @@
{"screen_orientation": "Landscape", "screen_name": "TvHolBa1", "quickconnect_key": "Initial01!", "server_ip": "192.168.0.115", "port": "80"}
{"screen_orientation": "Landscape", "screen_name": "tv-terasa", "quickconnect_key": "8887779", "server_ip": "digi-signage.moto-adv.com", "port": "80"}

View File

@@ -13,6 +13,7 @@ from kivy.animation import Animation # Import Animation for fade effects
import os # Import os for file and directory operations
import json # Import json for handling JSON data
import datetime # Import datetime for timestamping logs
import subprocess
# Import functions from python_functions.py
from python_functions import load_playlist, download_media_files, clean_unused_files
@@ -333,5 +334,16 @@ class MediaPlayerApp(App):
"""Switch to the SettingsScreen."""
self.root.current = 'settings'
def convert_video_to_mp4(input_path, output_path):
"""Convert a video to H.264 MP4 format."""
try:
subprocess.run(
['ffmpeg', '-i', input_path, '-vcodec', 'libx264', '-acodec', 'aac', '-strict', 'experimental', output_path],
check=True
)
Logger.info(f"Converted video: {input_path} to {output_path}")
except subprocess.CalledProcessError as e:
Logger.error(f"Failed to convert video: {input_path}. Error: {e}")
if __name__ == '__main__':
MediaPlayerApp().run() # Run the app