Simple editing of .ts files -


New Member

I'm simply trying to top and tail, and remove adverts from recordings.

I've read the advice in the wiki

I am using unix (ubuntu 14.04)

freemake and HDTVtoMPEG are Windows only (I have yet to try this within wine) so I focused initially on Avidemux, in which I can cut the video but the audio is not cut at the same time so is then out of sync. Google found me other users complaining of this, but I can't work out if there is a solution to this or not.

I have also tried

kdenlive and Oneshot – both seem to have the same issue – maybe related to the MLT linear editor code. The monitor only plays forward, even when moving the playhead backwards (so the sync breaks making editing impractical). I can transcode the video and then edit it but this is very time consuming.

I assume that somebody else is already doing this and can advise me what the best way to proceed is.


@Luke. I had read about but not tried the on box edits, I am initially wary of installing custom firmware but may go down this route if this is the recommended method.

@Black Hole. What do you suggest, is it possible to move the thread?
The mods have move it (from the HDR-FOX section).

Nothing to be scared about with the CF, and you will find it easier to access recordings for external use. There are several facilities you may be interested in: for example, the bookmarks for cropping out the adverts can be auto-set using detect-ads - it's not perfect (and slow), but not bad either.

However, if you want frame-perfect editing you will have to do that externally. The cut points for WebIF editing can only be set by bookmark, which have a limited temporal resolution (1 second), and the actual edit point is the nearest I-frame to the bookmark (or is that the first I-frame after the bookmark?). The I-frame repetition rate is 0.4 seconds (?). But, for a quick and dirty rough cut (it's only telly), no doubt the CF facilities are the most convenient.
Last edited:
A really useful function would be the ability to fix the timestamps in a TS file edited by nicesplice. If you just top and tail it is fine, and removing adverts is OK when the resulting file is played on a HD- or HDR-FOX, as nicesplice fixes the timestamps in the sidecars. If you play a TS file that has had the ads removed on an Android tablet, for example, the player gets confused, thinks the file is longer than it is and inserts blank sections where the ads used to be.
The sidecar package can do that by completely regenerating the associated .nts file.
I had a look at ways of correcting the length of TS files cropped with nicesplice using a couple of free tools I had available. The methods I used all lead to the loss of the subtitles. For standard def. recordings, if you just want a file that plays on an Android tablet (I used a Nexus 7 - 2013, with MX Player), TSMuxerGUI (Windows) is easy and quick. If you want to recreate the sidecar files you need to then use AV2HDR-T2 as the TS file created by TSMuxer cannot be processed by the HDR-FOX sidecar package. If you just want to use AV2HDR-T2 to do everything, it works, you just need to run the programme twice: the first pass fixes the TS file. Delete the sidecars and run again on the new TS file to give a trio of TS, NTS and HTM files.
Neither program works with high def. files as they can't cope with the HE-AAC audio format. I presume you will at least have to transcode the audio track to make it work. I'm not sure of the best way of doing this.
On the Android tablet itself, I did have success using the MediaConverter app. It can't create TS files, but I did successfully convert a high def. TS file to an MP4 file, fixing the recording length in the process. It is slow but it will run happily in the background.
A tip if you want to stream a nicesplice cropped TS file to an Android tablet by WiFi: use DLNA (e.g. Skifta) rather than a file explorer (e.g. ES File Explorer with an SMB share). In MX Player (and other compatible players like BS) when you reach a crop point the playback stops at that point. You can skip forward but it is very fiddly to find the start of the next section. With Skifta, it also stops at the crop point but if you click on the skip forward button it goes straight to the start of the next section and starts playing.
All the above is only necessary for files that have been joined or have had ad breaks removed using nicesplice. If you just use it top and tail recordings there are no issues with the files created.