Cut media files using ffmpeg: Difference between revisions

From Notes to self
Jump to navigation Jump to search
Created page with "<pre>$ ffmpeg -vcodec copy -acodec copy -ss hh:mm:ss -t hh:mm:ss -i infile outfile</pre> ;<code>-ss position</code> :Seek to given time <code>position</code> ;<code>-t durat..."
 
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre>$ ffmpeg -vcodec copy -acodec copy -ss hh:mm:ss -t hh:mm:ss -i infile outfile</pre>
<pre>$ ffmpeg -ss hh:mm:ss -i infile -t hh:mm:ss -codec copy -avoid_negative_ts make_zero outfile</pre>


;<code>-ss position</code>
;<code>-ss position</code>
:Seek to given time <code>position</code>
:Seek to given time '''<code>position</code>'''


;<code>-t duration</code>
;<code>-t duration</code>
: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.
[[Category: FreeBSD]]
[[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.