kokorin / Jaffree

______ Stop the War in Ukraine! _______ Java ffmpeg and ffprobe command-line wrapper
Apache License 2.0
475 stars 82 forks source link

No Support for "-to" for inputs #420

Open Speiger opened 2 weeks ago

Speiger commented 2 weeks ago

Describe the issue FFmpeg has no "-to" support, which is an absolute "end" position of where a stream should be cut. "-t" is relative to the starting position, which can be useful but it requires knowledge of start and end position.

Expected behavior To support "-to" argument :)

kokorin commented 2 weeks ago

Thank you for reporting. AFAIK -to is output option and BaseOutput has setOutputPosition method.

Did you mean that -to is also input option?

Speiger commented 2 weeks ago

@kokorin according to the FFMpeg documentation it is for both input/output. And i used it already for the input before.

-to position (input/output)
Stop writing the output or reading the input at position. position must be a time duration specification, see [(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual](https://ffmpeg.org/ffmpeg-utils.html#time-duration-syntax).

-to and -t are mutually exclusive and -t has priority.