justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
861 stars 144 forks source link

Long opening theequalezer releases dv mp4 files #733

Open galactic76 opened 1 year ago

galactic76 commented 1 year ago

I count and its now 120 seconds for opening theequalizer releases dv mp4 files version 380ff48 and in version e346384

I remember that you ask for mention wich version will be faster for opening that files to determine why is that way goes...

And its about the same time when counter of persentage stays on zero - also about 2 minutes

Its exactly the same time like in previous versions

BUT 380ff48 mux to TS with 30fps properties when show it on the screen of a player m9702, and no subtitles showing

I think its a some sort of a bug.....

e346384 do the right fps and shows subtitles, but itshows 120 sec 100% and then start muxing and at the end shows 99,9% but file in fine

the middle version - 5231f3c hovewer significantly slower - to open a file in takes 230 sec instead on 120 sec

So, what version just fix 100% at the beginnign?

That all i need

And theolderst version seems the best

jcdr428 commented 1 year ago

@galactic76 do you import the mp4 from a NAS or server, or is it on your PC ?

galactic76 commented 1 year ago

From NAS server And I found that 3 month older releases from that releaser opens at once, like files from all other releases. I ask releaser what ру changed - he says nothing...

jcdr428 commented 1 year ago

@galactic76 can you please identify the latest release opening "at once" without delay. It will help me find the changes that have led to this.

galactic76 commented 1 year ago

No, I mean 3 month older releases from THAT releaser were opens at once in any of your version Its not the matter of your releases. Is the matter of his releases. the last one that opens at once from him is a swan song and abizou, and older Suwenney todd and showing up - already with big delay,,,

jcdr428 commented 1 year ago

@galactic76 maybe the metadata ('moov' box) is now placed after the data. Which means nearly all the file needs to be downloaded from the NAS on your PC (via WiFi ?) before tsMuxer can read the metadata. It cannot 'seek' through the file like it does on your PC.

You can check this with mp4analyser (needs Python installed on your PC).

jcdr428 commented 1 year ago

Here is the structure of GOTG vol. 3: MP4Analyser

As suspected, the metadata 'moov' box is located after the data 'mdat' box, 54,597,165,541 bytes from beginning of file. Do the same with older releases and I bet the metadata will be at the beginning of the file.

Nothing tsMuxer can do about. Edit: actually there is a fix: tsMuxer loops through the file via a 2MB read loop, which can be replaced with a large file seek.

jcdr428 commented 1 year ago

@galactic76 can you please try this tsMuxer.exe (for win64) with your usual tsMuxerGUI.exe and report, thanks.

galactic76 commented 1 year ago

No its even not open any file

jcdr428 commented 1 year ago

Ok, small adjustment... Please try https://github.com/justdan96/tsMuxer/suites/16399542998/artifacts/936958047 or tomorrow's release.

jcdr428 commented 1 year ago

@galactic76 can we close the issue ?

galactic76 commented 1 year ago

No. I try 051d59e on film The.Black.Phone.2021.2160p.UHDRemux.HDR.DV-TheEqualizer.mp4

it opens quick then error while muxing at 0%- moov atom not found

while e346384 slow, but ok for final result

jcdr428 commented 1 year ago

@galactic76 there is a double thread mechanism in tsMuxer which I am not too familiar with: it is the reason why the commit is working on my PC in Debug mode, and not in Release mode or on your PC. As a quick hack, I have introduced a 1-second sleep after the file seek to ensure that no bytes are read before the end of the file seek. Not the best method, but this should do the trick until somebody more knowladgeable in c++ looks at this (@xavery or @justdan96 maybe) ?

Please try tomorrow's release.

galactic76 commented 12 months ago

it seems 2539d07 works fine!

jcdr428 commented 12 months ago

@galactic76 this seems to be another issue: the releases pre 17-Sept (before the commits on the current issue) outputed the same result. Please close this issue if the long opening delay issue is confirmed fixed, and open a separate issue for the above mp4.

galactic76 commented 12 months ago

solved thanks

jcdr428 commented 11 months ago

@galactic76 I had to reverse on this commit as it creates unforeseen issues. Until this issue is fully solved, I reopen the issue.

galactic76 commented 11 months ago

New 2 films that no ts muxer opens -

Awareness.2023.2160p.WEB-DL.Hybrid.HDR.DV-TheEqualizer.mp4 The.Burial.2023.2160p.WEB-DL.Hybrid.HDR.DV-TheEqualizer.mp4

If it helps - clever FFMPEG says Interlaced BFF detected

galactic76 commented 8 months ago

Not opening at all - Silent.Night.2023.2160p.WEB-DL.Hybrid.HDR.DV-TheEqualizer.mp4 0c55f71