Free software to cut TS videos
brucine
Posted messages
24980
Registration date
Status
Member
Last intervention
-
ziggourat Posted messages 24643 Registration date Status Contributor Last intervention -
ziggourat Posted messages 24643 Registration date Status Contributor Last intervention -
Hello everyone,
I had the bright idea of buying a TNT adapter meant to serve as a backup "VCR" since my ISP only provides me with an 8-hour "hard drive". It's connected on one side via HDMI to the TV and on the other side via USB to an optional external drive.
I already have an NTFS external hard drive filled with many recordings, and to my dismay, the device only recognizes FAT32, so I had to back everything up, format, and copy again, and you can guess what comes next: everything over 4 GB is unusable.
In the world of free software under Windows 10 64-bit, Lossless Cut perfectly does the little I ask of it (splitting the movie over 4 GB in two, and why not removing the ads), except that it doesn't recognize the ts format as input; it knows how to convert it to mp4 before cutting, taking almost a day per film for high-quality lossless conversion and then cutting (which is quite fast).
I believe (I'm not sure anymore) that Bandicam does the job, but the free version is "watermarked".
If anyone has an idea of a small software that would accept the ts format as input before cutting, it would save me a lot of time, thanks.
I had the bright idea of buying a TNT adapter meant to serve as a backup "VCR" since my ISP only provides me with an 8-hour "hard drive". It's connected on one side via HDMI to the TV and on the other side via USB to an optional external drive.
I already have an NTFS external hard drive filled with many recordings, and to my dismay, the device only recognizes FAT32, so I had to back everything up, format, and copy again, and you can guess what comes next: everything over 4 GB is unusable.
In the world of free software under Windows 10 64-bit, Lossless Cut perfectly does the little I ask of it (splitting the movie over 4 GB in two, and why not removing the ads), except that it doesn't recognize the ts format as input; it knows how to convert it to mp4 before cutting, taking almost a day per film for high-quality lossless conversion and then cutting (which is quite fast).
I believe (I'm not sure anymore) that Bandicam does the job, but the free version is "watermarked".
If anyone has an idea of a small software that would accept the ts format as input before cutting, it would save me a lot of time, thanks.
10 answers
-
Hello,
The *.ts file is part of a DVD. More details here... https://www.commentcamarche.net/contents/453-fichier-ts
Otherwise, you can convert it to MP4 format... https://www.aiseesoft.fr/resource/convertir-ts-en-mp4.html
-
In this case, the TS files in question did not come from DVDs but from streams previously recorded on a hard drive from the TV channels of the ISPs (and at the time via ADSL TV if I remember correctly), but it doesn't matter: if I record a new movie via the DVB-T adapter, it will also be in TS without ever having seen a DVD.
And I already have, as I said, means to convert to mp4: the question is precisely to do without it and to cut the TS directly. -
Hello.
The free program Avidemux supports virtually all formats, it can cut out ads and unwanted parts, and save the result in Avi, MP4, Ts, Mkv, or mpeg formats, allowing you to choose audio and video codecs if you want to change them. You can submit files of unlimited size and even remove black bars from a movie. There are plenty of tutorials available online although it is very simple and intuitive to use.
Best regards-
Hello,
I agree with Duno59, Avidemux allows trimming .TS files without re-encoding, just keep the "copy" mode.
The software also exists in a portable version.
Best regards
-
-
OK, Thanks to both of you, while I download and tackle a 4 or 5 GB test file, I'll give you the feedback (for the record, I started a preliminary conversion from ts to mp4 this morning, 5.41 GB via lossless cut, we’re at 84%, it shouldn’t be done at this rate before the end of the evening...)
-
Indeed very quick, your thing, but surprising and not very user-friendly except for the experts that you are:
-Curiously, it happens that files without format change loaded into Avidemux significantly increase in size just for that reason.
-If the video format is automatically recognized but one settles for possibly adjusting the output format while keeping "copy" for video and audio, disaster looms, with totally choppy audio: you have to go to "info" and randomly select the audio format that seems the closest.
-As long as one hasn't read after searching for a while that it is necessary to segment the video at an "I-FRM" point (not easy to reach with the cursor and sometimes involving feeling out the "time"), one exposes oneself to errors (which apparently have no significant consequences).
-The mode of cutting into 2 (or n) pieces is hair-brained: it seems you can't do it in one single operation, requiring you to reposition the A and B markers at each step (B instead of A and A at the beginning, etc.).
That said, the result so far viewed on an external player (I haven't had time to test it on the hard drive and the TV yet) seems very good.-
Hello,
To cut and remove the selected part, you need to go to Edit --> Delete with Avidemux.
Thanks to extempor and Duno59 for suggesting this free software :-)
Otherwise, if you're willing to pay, the "must-have" is TS-Doctor which costs about €35.
A file is cut on the I-frames because they are complete images, not the other B (bidirectionally predictive encoded image) or P (predictively encoded image); for more information, see GOP on Wikipedia for example: https://fr.wikipedia.org/wiki/Group_of_pictures
To summarize, I had made a brief overview with screenshots on this: I had made a brief overview on this: https://forums.commentcamarche.net/forum/affich-36394419-decoupe-video#2
Personally, to avoid audio/video desynchronization in my M2TS recordings (analogous to TS) with Free, I first encode with Handbrake and then cut (removing ads) with Avidemux. The cut points are sometimes not clear; what's important is the start (cursor A), otherwise for B I preferably use a P frame, I think, unless it’s a B... you have to try.
On the other hand, for my DTT recordings with a tuner card on my PC which results in TS files, I only use Avidemux.
The audio can pose a problem (probably due to the E-AC-3/Dolby Digital Plus format or even HE-AAC or AAC-LC/ADTS... anyway, it depends on the channels, but I haven’t thought further about it) if there are multiple streams, so personally, I prefer to keep only one, but for that everyone does what they please ;-) Your approach of "randomly selecting the audio format that seems closest" is the one I use when I re-encode everything, meaning setting it to 128 kb/s or 192 kb/s because the frequency is most often 48 kHz based on my observations.
Best regards
-
-
Thanks for the clarifications, and I've gained a new trick since, after experimentation, the TNT adapter splits recordings into as many 1 GB chunks in a dedicated folder; as it has a nasty tendency to play a different title than the one selected, all that’s left to do is to stitch them back together for playback with the others via my old multimedia gateway, which works perfectly.
So now, no more problems to cut the ads in half or merge them, except for one MKV file that crashes inexorably: avidemux recognizes the video and audio codecs...but doesn’t offer the audio codec in question for output.
Now, the best is the enemy of the good. I have hundreds of recordings, I'm not going to spend my life cutting the ads perfectly; anyway, even if the sync isn’t “professional,” it’s also inherently the case with dubbing of foreign films, and then, if it’s not too intrusive, the ad in the middle allows for a quick drink and eliminates another one.
I think that, more or less, and since the segments will inevitably go through there, I will settle for removing what exceeds the film at the beginning and at the end, and this limits the risk of untimely desynchronizations. -
Yes, that's what I did: by removing 400-500 MB of ads, we can piece together the 4 parts of
1 GB into 1 or 2 files.
As for the infamous stubborn MKV, Lossless Cut split it in two without any fuss, proving that there is no universal solution... -
Hello again, I'm back.
I have a problem with the TNT recorder that automatically creates a "Records" folder on the disk, with one folder per movie that is split into as many 00n*ts as necessary, and at the root of "Records", there are a number of small files that apparently allow for stitching the pieces together during playback, but that doesn't work very well.
The idea is to place these newly recorded movies with the rest of the old alphabetized films on the disk, and that's where the trouble begins.
As I mentioned, I could only achieve audio-video synchronization (with or without cutting the ads) with Lossless Cut, but it only plays ts without being able to process or even save it, so I need to convert it to mp4, then stitch each piece back together.
That works very well as long as the original stream doesn't have more than 4 tracks (1 video, several audio languages, 1 subtitle track).
In this latter case, I have no means of identifying to remove foreign languages from audio1, audio2... and furthermore VLC crashes when opening any of those pieces.
If I think about removing the subtitle track to return to 4, it becomes impossible to stitch the pieces back together, with Lossless Cut telling me that the codecs of these pieces are no longer the same.
If anyone has any inspiration, thank you.-
I don't use LosslessCut, so I can't really help you, sorry... but I sympathize anyway ;-)
But if I understand correctly, your problem is that there are too many audio tracks and subtitles, and you can't figure out which ones to delete.
If you can play one of your original TS files with any player, or even a "editing" software, it should be possible to know the order of the languages and which ones to keep or remove afterward.
Otherwise, usually, I recommend the small utility MediaInfo to know the characteristics of a video file.
However, for storage space reasons, I only keep one audio stream, French, so I don't understand why you keep so many additional audio tracks (original version), but you must have your reasons...
After testing the 2 recordings of the series Chernobyl made with a Hauppauge tuner on my PC (each file is more than 10 GB and has 1 video stream, 3 audio streams, and 2 subtitle tracks, i.e., 6 tracks), using Merge (to join) with LosslessCut, I found that the exported file only retains one audio stream in French. It does not accept (unrecognized stream) the files individually!
Well, the attached files don't seem to be in the correct order, but since I don't know the software, it must just be a matter of settings. After that, all that's left is to cut the ads and reassemble the videos.
I also tried other things like removing the streams from one file, but since it struggles to recognize it at the start, the result is skewed from the beginning; indeed, out of more than 5 hours of recording, it only recognizes about half an hour because the file may be corrupted during recording.
Finally, maybe LosslessCut simply can't handle files with more than 4 tracks, but I'm surprised because it seems to rely on FFmpeg.
-
-
I'm not sure about your answer: Lossless Cut doesn't natively recognize ts, it just displays it, which might explain the bug you observed (and what leads me to a prior mp4 conversion of the n ts chunks of a movie extracted from the hard drive).
I believe the audio streams are not "named" by the broadcasting TV: I have audio(n), no way to know even in another software which language it corresponds to, otherwise I have of course no desire to keep the excess tracks.
In the realm of curiosities, one of the films I managed to process has been released in English version.
No difference in the number of tracks except that Lossless Cut does not comment on the language of the original ts file but returns for the mp4 chunks "und" (which is not German, but simply "undetermined"), it may be, it’s the case to say, one of the streams, but I haven’t found a way to force Lossless Cut to output to a specific language.
Now, as I mentioned, I have even less experience with Lossless Cut as the cutting process is much less user-friendly than in Avidemux (and ts is not native), but unless I find an audio-video sync solution with the latter (the sound lags behind the image and eventually slows down, distorts, or freezes the video stream)... -
I have the annoying habit of muting my PC because some websites bombard you with annoying noises.
I did a test with Avidemux by merging 4 TS clips from the recording and after checking that the total did not exceed 4 GB due to the FAT 32 of the hard drive (and restored the sound).
I indeed thought that it could be the ad cuts or an inappropriate output codec that were responsible for the issue, and I just merged everything as it was, video and audio on copy, output to TS.
Moral of the story, both audio and video play without any issues on the PC, it outputs without audio on one of my multimedia gateways, and it completely crashes the other; moral of the moral, the output formats are correct but involve codecs that are not interpreted by these devices.
(I can always work around the issue by casting the film directly to the TV but, for some time now, the sound doesn’t pass either without me knowing why).
So, before doing more cutting tests, I will have to see if I can find a merging output format with audio and video codecs that are both not out of sync and can be read by the gateways (which, in general, can read other TS containers in addition to AVI, MP4, MKV, MPG...).-
For the audio stream, generally, the first one should be in French. In principle, DTT is made to be broadcast in the country's language, isn't it?
Since your method works correctly in most cases, keep it, if I understood everything correctly!
It's only when you realize, upon checking, that the chosen language after export is not the right one that you should select another one. This has happened to me too, but it’s very rare anyway.
I'm too lazy to check every time, so I rely on my habits.
Secondly, regarding desynchronization, it can occur if you do not cut on I-Frames. Avidemux indicates this along the way. That’s why removing ads can cause the loss of a few frames from the video, at least for me. However, if I ignore the warning, I haven't noticed any impact, so it's up to everyone to choose their way of doing things.
Personally, I always re-encode my DTT or Free recordings.
Rather than leaving it in E-AC-3 (Dolby Digital Plus) or otherwise, I convert the audio to AAC because, as I've already said in this post, it’s this parameter that can cause issues.
For the video stream, I go for the classic, that is MPEG-4 AVC/x264.
I encapsulate everything in MP4, rather than in MP4 by personal choice since on my TVs, MKV doesn't always work.
If MediaInfo does not inform you about the language of the streams, then LosslessCut won't indicate it either. However, on my test file, Chernobyl, it is clearly indicated:
In MediaInfo, I have the following for the 3 audio streams:
Audio #1
ID: 130 (0x82)
Menu ID: 1025 (0x401)
Format: E-AC-3
Format/Info: Enhanced AC-3
Commercial name: Dolby Digital Plus
Format parameters: Dolby Surround
Codec ID: 6
Duration: 5 h 39 min
Bit rate type: Constant
Bit rate: 192 kb/s
Channels: 2 channels
Channel layout: L R
Sampling: 48.0 kHz
Frames per second: 31.250 fps (1536 SPF)
Compression mode: Lossy
Delay relative to Video: -229 ms
Stream size: 466 MiB (4%)
Language: French
Service kind: Complete Main
Audio #2
ID: 131 (0x83)
Menu ID: 1025 (0x401)
Format: E-AC-3
Format/Info: Enhanced AC-3
Commercial name: Dolby Digital Plus
Format parameters: Dolby Surround
Codec ID: 6
Duration: 5 h 39 min
Bit rate type: Constant
Bit rate: 96.0 kb/s
Channels: 2 channels
Channel layout: L R
Sampling: 48.0 kHz
Frames per second: 31.250 fps (1536 SPF)
Compression mode: Lossy
Delay relative to Video: -133 ms
Stream size: 233 MiB (2%)
Language: French
Service kind: Complete Main
Editorial classification: Visual impaired commentary
Mix type: Independent
Audio #3
ID: 132 (0x84)
Menu ID: 1025 (0x401)
Format: E-AC-3
Format/Info: Enhanced AC-3
Commercial name: Dolby Digital Plus
Format parameters: Dolby Surround
Codec ID: 6
Duration: 5 h 39 min
Bit rate type: Constant
Bit rate: 128 kb/s
Channels: 2 channels
Channel layout: L R
Sampling: 48.0 kHz
Frames per second: 31.250 fps (1536 SPF)
Compression mode: Lossy
Delay relative to Video: -101 ms
Stream size: 311 MiB (3%)
Language: qaa
Service kind: Complete Main
On the Windows 10 Films and TV player, it looks like this (note: the language numbering does not correspond to the reality of the file!):
Whereas with VLC, the order of the streams is correct:
Finally, in LosslessCut, the language is correctly noted as in MediaInfo:
There you go, I'm afraid I can't help you further since I don’t know either the characteristics of your recordings, nor the details of your devices as well as the files readable by them. The only thing I know is that in general AAC is well supported except for exceptions.
Good night ;-)
PS: sorry if I’m completely off track in my response, as it’s late and I don’t have a clear mind...
-