[FFmpeg-trac] #7155(undetermined:reopened): Add option to stop writing at position relative to EOF

FFmpeg trac at avcodec.org
Thu Jun 7 19:53:16 EEST 2018

#7155: Add option to stop writing at position relative to EOF
             Reporter:  clone206     |                    Owner:
                 Type:  enhancement  |                   Status:  reopened
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0

Comment (by withmorten):

 Hi clone206,

 I ran into a similar problem this week when I wanted to cut off one second
 of silence at the end of some files which I had added earlier (with

 It wasn't too hard to implement and can probably be improved on sanity
 check-wise, but it works for my purposes and can probably be used as a
 good starting point for properly implementing this by somebody who knows
 how ffmpeg is supposed to work:


 Diffed against ffmpeg 3.4.2.

 It only works as input option (duration seemed to be unknown in
 open_output_file), so you'll have to use it like:

 ffmpeg -toeof -00:00:00.9 -i input.flac output.flac

 It basically makes the input file shorter by whatever amount you tell it.

 Not entirely sure why this would be impossible to implement ...?

Ticket URL: <https://trac.ffmpeg.org/ticket/7155#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list