这是 ffmpeg 描述它的方式:
‘-ss position (input/output)’
When used as an input option (before -i), seeks in this input file to position. When used as an output option (before an output filename), decodes but discards input until the timestamps reach position. This is slower, but more accurate.
position may be either in seconds or in hh:mm:ss[.xxx] form.
‘-itsoffset offset (input)’
Set the input time offset in seconds. [-]hh:mm:ss[.xxx] syntax is also supported. The offset is added to the timestamps of the input files. Specifying a positive offset means that the corresponding streams are delayed by offset seconds.
Run Code Online (Sandbox Code Playgroud)
那么,当两者都用作输入选项时,两者有什么区别呢?它们在-ss
用作时是否相同input option
?
Den*_*nis 48
那么,当两者都用作输入选项时,两者有什么区别呢?
命令
ffmpeg -ss 5 -i inputfile outputfile
Run Code Online (Sandbox Code Playgroud)
丢弃输入的前五秒。
如果您的输入文件长 60 秒,则输出文件长 55 秒。
命令
ffmpeg -itsoffset 5 -i inputfile outputfile
Run Code Online (Sandbox Code Playgroud)
将输入文件的视频流延迟5 秒。
如果您的输入文件长 60 秒,则输出文件长 65 秒。前 5 秒将是静止图像(第一帧)。
命令
ffmpeg -itsoffset -5 -i inputfile outputfile
Run Code Online (Sandbox Code Playgroud)
将输入文件的视频流提前5 秒。
与 类似-ss 5
,这会丢弃输入的前五秒。但是,如果您的输入文件长 60 秒,则输出文件也将长 60 秒。最后 5 秒将是静止图像(最后一帧)。
总而言之,-ss
裁剪输入,同时-itsoffset
可用于同步视频和音频流。
归档时间: |
|
查看次数: |
44351 次 |
最近记录: |