Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: marks5231 on December 23, 2022, 08:56:37 PM

Title: After PTS reconstruction, the video file cannot be saved as mp4 format
Post by: marks5231 on December 23, 2022, 08:56:37 PM
I have an h264 mp4 video file. When I open this file, Avidemux asks me to reconstruct the PTS, I click yes.
Then, after the reconstruction, the file fails to save in mp4 format. But can be saved as MPV format
 


Avidemux version: 2.8.1
Operation system: windows 11
Title: Re: After PTS reconstruction, the video file cannot be saved as mp4 format
Post by: eumagga0x2a on December 23, 2022, 10:05:24 PM
PTS reconstruction is a delicate process, but could you please first update to the latest 2.8.2 nightly (https://avidemux.org/nightly/), then, if the issue with that file persists, start Avidemux, reproduce the failure to save to MP4, close Avidemux and provide admlog.txt from %localappdata%\avidemux directory?

Regarding nightlies, the choice between cross-compiled MinGW "win64" or natively compiled VC++ "vsWin64" builds is mostly one of a personal preference. There have been reports of application startup taking a very long time on Windows 10 and 11, caused by on-access virus scanner. Adding Avidemux program directory to the list of exceptions should mitigate this annoyance.

In any case, it would be necessary to obtain a sample video to develop a fix (if Avidemux is at fault, of course).
Title: Re: After PTS reconstruction, the video file cannot be saved as mp4 format
Post by: marks5231 on December 24, 2022, 07:12:05 PM
Thanks for your reply. I updated to the nightly build of 2.8.2. However, the result is still the same.

Another thing I noticed is the font size of 2.8.2 is bigger than 2.8.1 on my laptop with a 150% scale. Is this the desired behavior?

Here is the sample video: [link removed]
This video may not be appropriate the see in public. Sorry about it. I cannot find a better sample..
Title: Re: After PTS reconstruction, the video file cannot be saved as mp4 format
Post by: eumagga0x2a on December 24, 2022, 07:55:51 PM
Quote from: marks5231 on December 24, 2022, 07:12:05 PMAnother thing I noticed is the font size of 2.8.2 is bigger than 2.8.1 on my laptop with a 150% scale. Is this the desired behavior?

Probably different Qt versions VC++ build environment vs MinGW one?

Quote from: marks5231 on December 24, 2022, 07:12:05 PMThis video may not be appropriate the see in public.

NSFW is not a big deal, but does it contain any criminal content? Because if it does, I'll have to remove the link (and won't inspect the file as well, obviously).

Title: Re: After PTS reconstruction, the video file cannot be saved as mp4 format
Post by: marks5231 on December 24, 2022, 08:56:23 PM
It is only NSFW.

I downloaded the (221127_75880397d26-fflibs 4.4.2 version). This one is the MinGW build.
I then downloaded the VC++ build, this time it has the same font size as 2.8.1 (which is better for me.)
Title: Re: After PTS reconstruction, the video file cannot be saved as mp4 format
Post by: eumagga0x2a on December 24, 2022, 10:10:09 PM
Quote from: marks5231 on December 24, 2022, 08:56:23 PMI downloaded the (221127_75880397d26-fflibs 4.4.2 version). This one is the MinGW build.
I then downloaded the VC++ build, this time it has the same font size as 2.8.1 (which is better for me.)

VC++ builds use a much older Qt version, if I am not mistaken. This might explain the difference.

I'll remove the link to the huge sample nevertheless, will look at it later, thanks.
Title: Re: After PTS reconstruction, the video file cannot be saved as mp4 format
Post by: eumagga0x2a on December 26, 2022, 08:46:14 PM
The problem with the sample might be caused by Avidemux trying to replace its very high timescale 1/1200000 and frame duration oscillating between 40040 and 40041 ticks with a timescale with lower frequency (it defaults to 1/90000, the standard MPEG timestamp resolution) instead of guessing that the standard timescale 1001/30000 may be applicable to this video (it may be, it may be not, but the H.264 decoder configuration says so).

Not sure how to fix this properly ATM.