From 7b3af7d8a35a87a41a084c6499b02576cb6ef408 Mon Sep 17 00:00:00 2001 From: TNTwise Date: Wed, 2 Oct 2024 22:38:27 -0500 Subject: [PATCH] remove need for video directory for now --- backend/src/FFmpeg.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/src/FFmpeg.py b/backend/src/FFmpeg.py index 7693a67d..84f98cc5 100644 --- a/backend/src/FFmpeg.py +++ b/backend/src/FFmpeg.py @@ -127,11 +127,7 @@ def __init__( self.previewFrame = None self.crf = crf self.sharedMemoryID = sharedMemoryID - self.videoPropertiesLocation = os.path.join( - currentDirectory(), inputFile + "_VIDEODATA" - ) - if not os.path.exists(self.videoPropertiesLocation): - os.makedirs(self.videoPropertiesLocation) + self.subtitleFiles = [] self.sharedMemoryThread = Thread( target=lambda: self.writeOutInformation(self.outputFrameChunkSize) @@ -162,6 +158,11 @@ def get_ffmpeg_streams(self, video_file): return None def extract_subtitles(self, video_file, stream_index, subtitle_file): + self.videoPropertiesLocation = os.path.join( + currentDirectory(), self.inputFile + "_VIDEODATA" + ) + if not os.path.exists(self.videoPropertiesLocation): + os.makedirs(self.videoPropertiesLocation) """Extract a specific subtitle stream from the video file.""" try: subprocess.run(