Cut media files using ffmpeg: Difference between revisions

From Notes to self
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
:Restrict the video to the '''<code>duration</code>'''
:Restrict the video to the '''<code>duration</code>'''


The order <code>-ss -i -t</code> is important.
The order <code>-ss ... -i ... -t ...</code> is important.


[[Category: FreeBSD]]
[[Category: Linux]]
[[Category: Linux]]

Latest revision as of 21:31, 11 October 2024

$ ffmpeg -ss hh:mm:ss -i infile -t hh:mm:ss -codec copy -avoid_negative_ts make_zero outfile
-ss position
Seek to given time position
-t duration
Restrict the video to the duration

The order -ss ... -i ... -t ... is important.