#999774 ffmpeg: -to acts as -t (with -ss and mkv format)

Package:
ffmpeg
Source:
ffmpeg
Description:
Tools for transcoding, streaming and playing of multimedia files
Submitter:
wim
Date:
2021-11-16 14:45:03 UTC
Severity:
normal
#999774#5
Date:
2021-11-16 14:42:59 UTC
From:
To:
Hallo,

given a example.mkv media file
(the one used was converted with ffmpeg from mp4)

the -to option behaves like the -t option when cutting a piece out of the media file

an example:
$ ffmpeg -ss 00:06:40 -i example.mkv -to 00:32:45 -c copy out-to.mkv
will produce the same as:
$ ffmpeg -ss 00:06:40 -i example.mkv -t 00:32:45 -c copy out-t.mkv

while according to the documentation:
* -to is a position
* -t is a duration
so the should be different

background info on the file used:
$ mediainfo example.mkv
General
Unique ID                                : 2822367661883764499235379928065855239 (0x21F9178234EDE6ACAE58F72F00B4F07)
Complete name                            : example.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 125 MiB
Duration                                 : 55 min 42 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 315 kb/s
Writing application                      : Lavf58.45.100
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 55 min 42 s
Bit rate                                 : 229 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 20.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.012
Stream size                              : 91.1 MiB (73%)
Writing library                          : x264 core 160 r3011 cde9a93
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=22 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=20 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : Vorbis
Format settings, Floor                   : 1
Codec ID                                 : A_VORBIS
Duration                                 : 55 min 42 s
Bit rate mode                            : Variable
Bit rate                                 : 80.0 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Stream size                              : 31.9 MiB (25%)
Writing application                      : Lavc58.91.100
Writing library                          : libVorbis (Reducing Environment) (20200704 (Reducing Environment))
Default                                  : Yes
Forced                                   : No


hth,
Wim