Using mkvmerge to cut deadwood from transport streams?

Sometimes, there are films that I want to keep longer. In the past I have used mkvmerge to cut out the extra from the beginning and end of the file. Ie:

mkvmerge --split parts:00:00:50-02:35:30 “Syriana.ts” -o “Toppy/Syriana.ts”

This no longer works and osmc errors out:

12:44:07.853 T:2790257648 WARNING: could not find codec parameters for nfs:// liikemaailmassa.ts
12:44:07.864 T:2790257648 NOTICE: CVideoPlayer::OnExit()
12:44:07.906 T:3025940480 NOTICE: VideoPlayer: finished waiting
osmc@osmc:~/.kodi/temp$ tail kodi.log
12:56:35.936 T:2515530736 NOTICE: LoadJpeg: unable to load
12:56:51.192 T:3025940480 NOTICE: VideoPlayer: Opening: nfs://
12:56:51.193 T:3025940480 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
12:56:51.202 T:2553279472 NOTICE: Creating InputStream
12:56:52.157 T:2553279472 NOTICE: Creating Demuxer
12:57:05.641 T:3025940480 NOTICE: CVideoPlayer::CloseFile()
12:57:05.644 T:3025940480 NOTICE: VideoPlayer: waiting for threads to exit
12:57:22.237 T:2553279472 NOTICE: CVideoPlayer::OnExit()
12:57:22.281 T:3025940480 NOTICE: VideoPlayer: finished waiting
12:58:56.962 T:3025940480 NOTICE: NFS is idle. Closing the remaining connections.

Any ideas why? Copying the file as is works.

You could try avidemux for cropping videos. Works well and saves file without need reencode. Supports lots of file types.

I use mkvtoolnix gui on Windows for this task. It works well and preserves the dvbsub subtitles present in the broadcast TS stream into a MKV file. Kodi is happy to play the resulting MKVs with proper support for dvbsub subtitles.

As an aside, both VLC & avidemux don’t currently support dvbsub subtitles in a MKV.

Avidemux is handy though to get the exact timings of the I frames.

OK. But the point is that the stream will not even play. It used to work in the past. I will investigate avidemux, but I much rather have a simple command line utility.