Skip to content

Commit

Permalink
remove need for video directory for now
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTwise committed Oct 3, 2024
1 parent 536d18e commit 7b3af7d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions backend/src/FFmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 7b3af7d

Please sign in to comment.