What is difference between -ss and -itsoffset in ffmpeg?

本文详细介绍了使用FFmpeg工具进行视频裁剪(-ss选项)及时间戳偏移(-itsoffset选项)的方法。-ss选项用于从指定位置开始解码并丢弃之前的数据,适合精确裁剪;-itsoffset则是在时间轴上延迟或提前输入流,常用于解决音视频不同步的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

‘-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.



  • The command

    ffmpeg -ss 5 -i inputfile outputfile
    

    discards the first five seconds of input.

    If your input file was 60 seconds long, the output file will be 55 seconds long.

  • The command

    ffmpeg -itsoffset 5 -i inputfile outputfile
    

    delays the input file's video streams by 5 seconds.

    If your input file was 60 seconds long, the output file will be 65 seconds long. The first 5 seconds will be a still image (first frame).

  • The command

    ffmpeg -itsoffset -5 -i inputfile outputfile
    

    advances the input file's video streams by 5 seconds.

    Similarly to -ss 5, this discards the first five seconds of input. However, if your input file was 60 seconds long, the output file will also be 60 seconds long. The last 5 seconds will be a still image (last frame).

Summing up, -ss crops the input while -itsoffset can be used to sync the video and audio streams.


转自 http://superuser.com/questions/538031/what-is-difference-between-ss-and-itsoffset-in-ffmpeg
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值