How to precisely trim video with ffmpeg? -ss and -t are off by more than a half second
Transport Stream files are meant for streaming, have no global header, and may be sliced or joined together without the help of a format-aware utility. Because of this, there'a a lot of metadata structure within a TS file that allows them to be playable even after such operations. What that allows, in turn, is having multiple streams of different duration starting and stopping at different times. A format-aware utility like ffmpeg will parse the metadata and respect these features whereas a video editor which is mainly designed for a static file-based and indexed media usually won't - not with full fidelity anyway.

In the sample, there are two streams - 1 video and 1 audio. Run the following to identify the start_time of each stream

ffprobe -show_entries stream=codec_type,start_time -v 0 -of compact=p=1:nk=0 sample.ts


For your file, this results in

program|stream|codec_type=video|start_time=1.978233
stream|codec_type=audio|start_time=1.400000

stream|codec_type=video|start_time=1.978233
stream|codec_type=audio|start_time=1.400000


Ignore the first two lines. You can see that the video start is delayed relative to the audio. FFmpeg respects this delay. Your editor likely doesn't. It will either ignore the surplus audio or desync it with respect to the video.

So, 00:00:34.600 in the editing timeline actually references absolute timestamp of 34.6 + 1.978233 = 36.578233.

So, to accurately extract the desired frame, you need to know the delay of the video stream. Now, ffmpeg, by default, removes the starting offset i.e. it subtracts the start_time of the earliest starting stream before ingesting into its processing pipeline (unless copyts is set).

So, without copyts, the video start_time will be modified to 1.978233 - 1.400000 = 0.578233 and the desired frame will be at 34.6 + 0.578233 = 35.178233.

So, run

ffmpeg -i sample.ts -ss 00:00:35.178233 -t 00:26:40.400 [commands] out.mp4


You can use

ffprobe -show_entries format=start_time:stream=start_time -select_streams v -v 0 -of compact=p=1:nk=0 sample.ts


to get

program|stream|start_time=1.978233

stream|start_time=1.978233
format|start_time=1.400000


where the relative offset for the video is 1.978233 - 1.400000 = 0.578233