aisingapore / PeekingDuck

A modular framework built to simplify Computer Vision inference workloads.
Apache License 2.0
163 stars 39 forks source link

feat: #109 Upgrade output.media_writer to enable custom output name #733

Closed furyhawk closed 1 year ago

furyhawk commented 1 year ago

Add new property output_filename in output.media_writer node to enable custom output name for video input only. This property will be ignored for image file inputs.

Missing file extension will default to .mp4.

Close #109

Add new property output_filename:

output.media_writer:
output_filename: "out.mp4"

Example1 (video to image):

nodes:
- input.visual:
    source: "data/"
- output.screen:
- output.media_writer:
    output_dir: "my_output"
    output_filename: my_video.jpg

output:

my_video_00001.jpg
...
my_video_00109.jpg
my_video_00110.jpg

Example 2(video to video):

- output.media_writer:
    output_dir: "data/output"
    output_filename: "out.mp4"

output:

out_00000.mp4