I have quite a few TV recordings originally made in MPEG2-TS or MPEG4-TS format, which I then converted (losslessly) to either MPEG2-PS (for MPEG2-TS recordings), or MP4, or MKV (for MPEG4-TS recordings), to get files which are smaller by about 10-15% and allow a quicker random access. If the conversion was successful, the original TS recording should no longer be necessary, but so far I've kept both versions, just in case. The question may be stupid but here it is : would it be possible to recreate a TS file 100% identical to the original file, from the converted file ? Meaning : converting TS to (MPG/MP4/MKV) then back to TS in such a way that the newly generated TS is 1:1 identical to the original one. That would allow to delete those redundant TS files, knowing that I can regenerate them if push comes to shove.
But from what I could see it doesn't seem possible, as TS files generated by different programs appear to be significantly different, and for instance whether ffmpeg or TSMuxer is used, the newly generated TS file is markedly different from the original (which was either created by a standalone “set top box” recorder or downloaded) ; and it's not just the header that is different and then a large chunk is identical in both files (as it can happen with MP4 / MKV files generated by different utilities), the whole structure is different, apparently there is no standard structure for TS files.
Still, a large proportion of the data should be identical between the original TS and its converted counterpart ; so, if it's not possible to achieve through a direct video conversion, would there be a way to sort of “compress” the TS file, based on similar data chunks that are present in the converted file, keeping only what's different/unique, and allowing to regenerate it by combining the converted file and the “compressed” file ? (Which should be only a fraction of the size of the original TS file.)
Hope it's not too convoluted...![]()
+ Reply to Thread
Results 1 to 10 of 10
-
-
TS is just a container, so there is no reason why a remux from mpg, mp4, mkv to TS should not be possible, provided that video codec and audio codex are compatible with the TS container.
You can do this with clever Ffmpeg-GUI. -
TS is just a container, so there is no reason why a remux from mpg, mp4, mkv to TS should not be possible, provided that video codec and audio codex are compatible with the TS container. You can do this with clever Ffmpeg-GUI.
Apparently xdelta mentioned above would seem to work for such purpose ; coincidentally, I've seen it mentioned first very recently : it was included in a patch meant to fix a mistake in a MKV file made available for download, and I've also seen, just a few days ago on a completely unrelated website, a similar patch meant to change the default audio track for a whole folder of MKV files in one click. Apparently this tool has become a staple in the “fansubbing” community.Last edited by abolibibelot; 31st Dec 2020 at 05:28.
-
Put file.ts into a mkv container using mkvtoolnix. If you want to go back to file.ts then extract the video and audio and remux in TSMuxer. But why on earth would one want to do this anyway?
SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851 -
You are also mistaken - there IS a standard for TS. It is in fact, THE MPEG2 TS standard.
However, there exist in the spec a bunch of provisions for metadata & user- or application-specific custom ("private") data, and part of the multiplexing has to do with proper timing (and timestamping) of these various elements, and it is VERY likely that many of the apps that support muxing (and demuxing) of TS streams do not necessarily support ALL of its features. Therefore,things could easily and reasonably get dropped or rearranged along the way, even for legit, compliant apps (much less the reverse engineered and only quasi-compliant ones you are familiar with).
Scott -
@Cornucopia
You are also mistaken - there IS a standard for TS. It is in fact, THE MPEG2 TS standard.
However, there exist in the spec a bunch of provisions for metadata & user- or application-specific custom ("private") data,and part of the multiplexing has to do with proper timing (and timestamping) of these various elements, and it is VERY likely that many of the apps that support muxing (and demuxing) of TS streams do not necessarily support ALL of its features. Therefore,things could easily and reasonably get dropped or rearranged along the way, even for legit, compliant apps
(much less the reverse engineered and only quasi-compliant ones you are familiar with).
@netmask56
Put file.ts into a mkv container using mkvtoolnix. If you want to go back to file.ts then extract the video and audio and remux in TSMuxer. But why on earth would one want to do this anyway?
@ProWo
copy file.ts newfile.ts
(If that was a serious reply and not stealth trolling : the idea in this case is to delete the TS file, yet preserve the possibility of re-creating it from its remuxed counterpart. I have yet to do specific tests with xdelta but it would seem like the most efficient solution, if it effectively detects redundant chunks of data between TS files and their remuxed counterparts despite their very different structure.)
Similar Threads
-
MkvТоMp4 v0.224 - rapid tool for repack Mkv to Mp4
By oreons in forum Video ConversionReplies: 808Last Post: 7th Mar 2022, 01:43 -
How to extract CC from an mp4 file and then remux them back after edit
By RoyZ7 in forum SubtitleReplies: 0Last Post: 5th May 2020, 20:35 -
How to convert an MKV to MP4 file and an MP4 to MKV file
By carlmart in forum Video ConversionReplies: 18Last Post: 25th Jun 2019, 09:02 -
FFMPEG Conversion from MKV to MP4 returns a empty MP4 file?
By lolmaisine in forum Video ConversionReplies: 4Last Post: 6th Mar 2019, 07:45 -
MKV Compression to a smaller MKV or MP4
By THRobinson in forum Video ConversionReplies: 9Last Post: 20th Jul 2018, 10:56