updated
This commit is contained in:
@@ -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"}
|
||||||
@@ -13,6 +13,7 @@ from kivy.animation import Animation # Import Animation for fade effects
|
|||||||
import os # Import os for file and directory operations
|
import os # Import os for file and directory operations
|
||||||
import json # Import json for handling JSON data
|
import json # Import json for handling JSON data
|
||||||
import datetime # Import datetime for timestamping logs
|
import datetime # Import datetime for timestamping logs
|
||||||
|
import subprocess
|
||||||
|
|
||||||
# Import functions from python_functions.py
|
# Import functions from python_functions.py
|
||||||
from python_functions import load_playlist, download_media_files, clean_unused_files
|
from python_functions import load_playlist, download_media_files, clean_unused_files
|
||||||
@@ -333,5 +334,16 @@ class MediaPlayerApp(App):
|
|||||||
"""Switch to the SettingsScreen."""
|
"""Switch to the SettingsScreen."""
|
||||||
self.root.current = 'settings'
|
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__':
|
if __name__ == '__main__':
|
||||||
MediaPlayerApp().run() # Run the app
|
MediaPlayerApp().run() # Run the app
|
||||||
Reference in New Issue
Block a user