try to handle quotes in filenames

This commit is contained in:
Ville Rantanen
2022-03-04 15:06:35 +02:00
parent 9df58b99ac
commit 51f6e44cac
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
from tsmark.video_annotator import Marker
import argparse
VERSION = "0.4.2"
VERSION = "0.4.3"
def get_options():

View File

@@ -265,11 +265,11 @@ class Marker:
print("# {}: {} / {}".format(i + 1, self.format_time(ts), ts + 1))
if len(self.stamps) > 0:
print(
"ffmpeg -i '{}' -ss {} -to {} -c copy '{}.trimmed.mp4'".format(
self.opts.video,
'ffmpeg -i "{}" -ss {} -to {} -c copy "{}.trimmed.mp4"'.format(
self.opts.video.replace('"','\\"'),
self.format_time(self.stamps[0]),
self.format_time(self.stamps[-1]),
self.opts.video,
self.opts.video.replace('"','\\"'),
)
)