Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: Kohlhaas on February 08, 2024, 01:21:37 PM

Title: Can't open some TS-files
Post by: Kohlhaas on February 08, 2024, 01:21:37 PM
I use Avidemux under MX-Linux (Kernel 6.6.11-1) in two versions:
nightly build 2.8.1 and self-compiled 2.8.2.MediaInfo_Avidemux.pngError_Avidemux.png 

For some time now I have been unable to open some TS files (recorded by the TV).
In both versions I get an error message that the attempt to open the file failed.
What can I do?
Title: Re: Can't open some TS-files
Post by: alexstorm on February 08, 2024, 01:52:20 PM
I suspect encryption.  Check the network traffic during download.  There will probably be a small .key file in the download stream that comes before any .ts file.  You would have to run a script to process the .ts files with the key before you can open them.  It's complex and I've never bothered to create a script to do this.  There are discussions online.  It's the same type of encryption that can be used for .mp4 downloads.  Just a guess.  Hope that helps.
Title: Re: Can't open some TS-files
Post by: Kohlhaas on February 08, 2024, 02:38:37 PM
I don't think so:
I can play this files without problems with VLC or SMPlayer ...
Title: Re: Can't open some TS-files
Post by: eumagga0x2a on February 08, 2024, 06:49:36 PM
Please provide a sample MPEG-TS file (200 MiB should suffice).
Title: Re: Can't open some TS-files
Post by: Kohlhaas on February 09, 2024, 09:50:15 AM
It gets even more mysterious:

I had shortened the problem file to 200MB and then tried to play the shortened file with VLC.
Since that worked, I also tried to see if this file could be opened with avidemux.  That worked!
The original TS file (approx. 2.1 GB) still cannot be opened with avidemux.
Does it still make sense to provide the shortened file?
I could also upload the original file to my Onedrive and provide a link.
Title: Re: Can't open some TS-files
Post by: eumagga0x2a on February 09, 2024, 09:05:59 PM
Please split the original MPEG-TS file into 200 MiB chunks (preferably not named as <prefix><digits><.extension>. <prefix><digits><nodotsuffix><.extension> scheme should be fine), try to load the last one in Avidemux. If it works, delete the generated *.idx2 file, continue with the second last and so on until Avidemux fails to load a chunk. Then please provide that chunk as sample via WeTransfer, Mega, Dropbox or Google Drive (a link to OneDrive would be fine too as long as it doesn't require any authentication).
Title: Re: Can't open some TS-files
Post by: jimmyjim on February 10, 2024, 12:43:18 PM
Same happened to me awhile ago and eumagga was able to help (https://avidemux.org/smif/index.php/topic,20113.msg94906.html); open up the generated idx2 file in notepad and set the fps=0 to anything other than 0. To edit the video with avid, convert it to mp4 using ffmpeg or something
Title: Re: Can't open some TS-files
Post by: eumagga0x2a on February 10, 2024, 04:55:06 PM
As long as we have an alternative to coffee cup reading, let us try the alternative!
Title: Re: Can't open some TS-files
Post by: Kohlhaas on February 11, 2024, 08:30:32 AM
I came across the solution to the puzzle by chance:
When recording films or other programmes, my TV creates a (numerical) directory.
This directory contains several .TS video files as well as .ts.idx and .ts.idx2 files.
In my particular case, however, one of these .ts.idx2 files was empty (0 bytes).
After I had removed this empty file, I was able to open (all) .ts video files with Avidemux without any problems.
Title: Re: Can't open some TS-files
Post by: eumagga0x2a on February 11, 2024, 11:19:44 PM
Quote from: Kohlhaas on February 11, 2024, 08:30:32 AMThis directory contains several .TS video files as well as .ts.idx and .ts.idx2 files.

I wonder whether you tried some really ancient Avidemux versions on these files. Honestly, this topic proves my assumption that deleting existing .idx2 index files prior to reporting any problems has become universal knowledge being wrong ;D
Title: Re: Can't open some TS-files
Post by: Kohlhaas on February 12, 2024, 10:48:31 AM
I'm sorry, but I'm just an inexperienced user of avidemux who has no in-depth knowledge of the various video file types and their purpose/meaning. I would be happy if there was a short introduction to this topic on the Avidemux help website.

In the meantime I have found out for myself that these .idx2 files are generated by Avidemux (and not by my TV as I thought).
However, I still have no explanation as to how this empty .idx2 file came about - there is definitely no old version of Avidemux on my PC.

Thank you very much for the fact that Avidemux exists - it is perfectly adequate for my needs.