Skip to content

Output File Name Change #359

Closed
Closed

Description

@SasaniP

Problem/Use Case

I do have trouble accessing the output videos because of their name template.

output_file_template: str = '$VIDEO_NAME-Scene-$SCENE_NUMBER.mp4',

VIDEO_NAME=video_name, SCENE_NUMBER=scene_num_format % (i + 1))

Solutions

I would rather save the files as 0.avi , 1.avi , 2.avi etc.

Proposed Implementation:
https://github.dev/Breakthrough/PySceneDetect/blob/b54aff9ae6c3a07384bd0673040c54895fb39f20/scenedetect/video_splitter.py#L185-L186
185 output_file_template: str = '$SCENE_NUMBER.mp4',
https://github.dev/Breakthrough/PySceneDetect/blob/b54aff9ae6c3a07384bd0673040c54895fb39f20/scenedetect/video_splitter.py#L269-L270
270 VIDEO_NAME=video_name, SCENE_NUMBER=(i + 1))

Alternatives:

Have the default option to save the files in the existing way. And if the user needed to save files in a less complicated way, this function change.

Activity

  1. Breakthrough commented on Nov 3, 2023

    @Breakthrough
    Owner

    This should be possible. However I think a more extensible approach for this might be to instead use a callback, that itself can be called to format the name of each scene. The input would be all the info you need to generate the filename (or maybe a dataclass with it).

  2. added this to the v0.6.3 milestone on Nov 3, 2023
  3. added a commit that references this issue on Jan 21, 2024
    6f76961
  4. Breakthrough commented on Jan 22, 2024

    @Breakthrough
    Owner

    This will be fixed in v0.6.3, added a new formatter argument to allow customizing string output.

  5. added a commit that references this issue on Apr 18, 2024
    5a57b89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions