[FFmpeg-trac] #11139(undetermined:closed): Option to preserve filetime of input
FFmpeg
trac at avcodec.org
Mon Aug 19 19:54:22 EEST 2024
#11139: Option to preserve filetime of input
-------------------------------------+-------------------------------------
Reporter: Ulf Zibis | Owner: (none)
Type: enhancement | Status: closed
Priority: wish | Component:
| undetermined
Version: unspecified | Resolution: wontfix
Keywords: convenience | Blocked By:
option |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by inof):
Replying to [comment:3 Ulf Zibis]:
> Replying to [comment:1 inof]:
> > A better solution is this (after running FFmpeg):
> > {{{
> > touch -r <input> <output>
> > }}}
> You could also argue, that
> {{{ rm <output> && ffmpeg ... }}}
> is better than
> ` ffmpeg -y ...`.
You probably mean:
{{{ rm -f <output>; ffmpeg ... }}}
That wouldn't be better because it opens a potential security hole (a race
condition).
Apart from that, the -y option cannot really be compared with the option
proposed in this ticked, because it serves a very different purpose and
has very different implications. (By the way, note that the -y option does
''not'' cause FFmpeg to remove the file beforehand, i.e. it is not the
same as calling `rm`. The -y option only disables the check for the
existence of the file.)
Actually, the behaviour of FFmpeg regarding the presence or non-presence
of the -y option is not very good. It needs to be redesigned, taking
advantage of the O_EXCL flag to the open() function, but that's beyond the
scope of this ticket.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11139#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list