Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scenedetect/output/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def split_video_ffmpeg(

logger.info("Splitting video with ffmpeg, output path template:\n %s", output_file_template)
if output_dir:
logger.info("Output folder:\n %s", output_file_template)
logger.info("Output folder:\n %s", output_dir)

if video_name is None:
video_name = Path(input_video_path).stem
Expand Down
6 changes: 5 additions & 1 deletion tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"""Tests for scenedetect.output module."""

import json
import logging
import os
import typing as ty
from fractions import Fraction
Expand Down Expand Up @@ -49,7 +50,8 @@


@pytest.mark.skipif(condition=not is_ffmpeg_available(), reason="ffmpeg is not available")
def test_split_video_ffmpeg_default(tmp_path, test_movie_clip):
def test_split_video_ffmpeg_default(tmp_path, test_movie_clip, caplog):
caplog.set_level(logging.INFO, logger="pyscenedetect")
video = open_video(test_movie_clip)
# Extract three hard-coded scenes for testing, each 30 frames.
scenes = [
Expand All @@ -65,6 +67,8 @@ def test_split_video_ffmpeg_default(tmp_path, test_movie_clip):
video_name = Path(test_movie_clip).stem
entries = sorted(tmp_path.glob(f"{video_name}-Scene-*"))
assert len(entries) == len(scenes)
# The log should show the output folder, not the filename template.
assert f"Output folder:\n {tmp_path}" in caplog.text


@pytest.mark.skipif(condition=not is_ffmpeg_available(), reason="ffmpeg is not available")
Expand Down
3 changes: 2 additions & 1 deletion website/pages/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -823,4 +823,5 @@ Development
- [bugfix] The OpenCV backend keeps `position` on the last frame after reaching the end of a VFR video, so the last scene no longer ends early (or before it starts) [#561](https://github.com/Breakthrough/PySceneDetect/issues/561)
- [bugfix] `save-html --no-images` now writes to the global `-o`/`--output` directory instead of the working directory [#583](https://github.com/Breakthrough/PySceneDetect/pull/583)
- [feature] `VideoStream` has a new `close()` method to release the file handles and decoders a video holds, and can be used as a context manager (`with open_video(path) as video:`) to close it automatically. Calling `close()` more than once has no effect. Once an OpenCV, PyAV, MoviePy or concatenated stream is closed, `read()`, `seek()` and `reset()` raise `ValueError`, while properties describing the video (`path`, `name`, `frame_rate`, `duration`, `frame_size`, `aspect_ratio`) remain available. The default implementation does nothing, so existing `VideoStream` subclasses are unaffected, and `VideoCaptureAdapter` leaves the caller's `VideoCapture` open [#568](https://github.com/Breakthrough/PySceneDetect/issues/568)
- [bugfix] `VideoStreamConcat` no longer keeps its input videos open when they can't be concatenated (e.g. mismatched resolutions), and now closes each input explicitly once it is no longer needed instead of relying on garbage collection [#568](https://github.com/Breakthrough/PySceneDetect/issues/568)
- [bugfix] `VideoStreamConcat` no longer keeps its input videos open when they can't be concatenated (e.g. mismatched resolutions), and now closes each input explicitly once it is no longer needed instead of relying on garbage collection [#568](https://github.com/Breakthrough/PySceneDetect/issues/568)
- [bugfix] `split-video` with `-o` now logs the output folder instead of repeating the filename template [#595](https://github.com/Breakthrough/PySceneDetect/pull/595)
Loading