Skip to content

Video editing with Python

[ffmpeg_tools] removed period from ffmpeg_extract_subclip (#939)

Pierre Mdawar899cbb79b037
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 788af6d1..8876ec4a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed <!-- for changes in existing functionality -->
- `vfx.scroll` arguments `w` and `h` have had their order swapped. The correct order is now `w, h` but it is preferable to explicitly use keyword arguments
+- Removed extra `.` in the output file name of `ffmpeg_extract_subclip()` when `targetname` is not specified [#939]
### Deprecated <!-- for soon-to-be removed features -->
diff --git a/moviepy/video/io/ffmpeg_tools.py b/moviepy/video/io/ffmpeg_tools.py
index 35c818ae..0c3bb224 100644
--- a/moviepy/video/io/ffmpeg_tools.py
+++ b/moviepy/video/io/ffmpeg_tools.py
@@ -40,7 +40,7 @@ def ffmpeg_extract_subclip(filename, t1, t2, targetname=None):
name, ext = os.path.splitext(filename)
if not targetname:
T1, T2 = [int(1000 * t) for t in [t1, t2]]
- targetname = "%sSUB%d_%d.%s" % (name, T1, T2, ext)
+ targetname = "%sSUB%d_%d%s" % (name, T1, T2, ext)
cmd = [
FFMPEG_BINARY,
@@ -59,7 +59,6 @@ def ffmpeg_extract_subclip(filename, t1, t2, targetname=None):
"copy",
targetname,
]
-
subprocess_call(cmd)