[FFmpeg-user] How to preserve file time

Ulf Zibis Ulf.Zibis at CoSoCo.de
Tue Aug 20 22:33:34 EEST 2024


Am 14.08.24 um 17:20 schrieb Ulf Zibis:
>
> Am 12.08.24 um 19:04 schrieb Mark Filipak:
>>
>> That's a question for your operating system. I can change file times to whatever I want via the TotalCommander file browser. There are probably others.
>
> Isn't removing existing output files samely a question for the OS ?
>
> But for convenience FFmpeg CLI provides option `-y` for this task, so why not thinking about conveniently preserving file times by FFmpeg CLI?

There seems some need to outline and precise my original message.

1. For the security of existing data and in some way for convenience (avoid the need to create the potentially overwritten data again) FFmpeg CLI does not silently overwrite existing files. This requires an additional OS filsystem operation (test for existing files with same name).
2. For additional convenience FFmpeg provides option '-y' to prevent the user from manually deal with existing files. This requires 2 additional OS filsystem operations (write a message to system output stream + read and parse from system input stream).

3. The argument [https://trac.ffmpeg.org/ticket/11139#comment:2] against my proposal (provide an option to preserve the filetime) was:
"this is out of scope for ffmpeg CLI"   (which means: "OS file system operations alike should be managed manually by the user, with exising standard commands.")
As obvious from 1. and 2., that argument does not hold.

4. I'm fine with the result, that FFmpeg developers don't want to provide my proposal.

        But please *avoid inapplicable arguments*.

5. I'm sure, that anyone with a minimum of smartness was able to understand my original message.

-Ulf


More information about the ffmpeg-user mailing list