Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is how ffmpeg describes it:

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

So, what is the difference between the two when both are used as input options? Are they same when -ss is used as input option?

share|improve this question

1 Answer 1

up vote 11 down vote accepted

So, what is the difference between the two when both are used as input options?

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

share|improve this answer
    
So, when set to a positive offset the output at 5seconds after the blank output corresponds to the first frame of the input? Is any input discarded or only blank potions inserted? –  d33pika Jan 18 '13 at 3:39
    
Ad 1) Yes. Ad 2) -ss 5 doesn't discard. Still would be more appropriate for videos. The first frame is visible during the first five seconds, then the video gets played as usual. Note that this only affects the video streams! –  sudo Jan 18 '13 at 3:43
    
Sorry, I did not get the second part of the comment: -ss 5 discards first 5 seconds of the input right? as mentioned in the first example of your answer so when does the first frame get displayed for 5 seconds? I understand this is only for videos. –  d33pika Jan 18 '13 at 3:51
    
Yes, sorry. I meant -itsoffset 5 doesn't discard... –  sudo Jan 18 '13 at 3:52
    
Got it! Thanks. –  d33pika Jan 18 '13 at 3:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.