Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: garm on June 08, 2023, 07:09:28 PM

Title: Crash when using HEVC nvidia encode in newer builds
Post by: garm on June 08, 2023, 07:09:28 PM
The crash happens on windows 10 64bit, 2.8.1 and 2.8.2 nightly, as well as 2.7.8. I skipped back to 2.7.5 where it uses the old dialog and it works. I think the bug was created when the nvidia HEVC config UI changed.

To reproduce, open an h264 mp4 file, select Nvidia HEVC video output, Configure -> bitrate 20000 (maybe unnecessary step, haven't tested without), save.

(https://i.imgur.com/Vz3WEJU.png)
Title: Re: Crash when using HEVC nvidia encode in newer builds
Post by: eumagga0x2a on June 08, 2023, 07:20:54 PM
Not related to (any) FFmpeg-based encoder, but probably to the source video (I would guess that the clock of the time base is very high). Please open Avidemux, load the source video, close Avidemux and provide admlog.txt from %localappadata%\avidemux.
Title: Re: Crash when using HEVC nvidia encode in newer builds
Post by: eumagga0x2a on June 08, 2023, 07:26:11 PM
The idea to expect a valid time base when setting up an FFmpeg-based encoder was a bad one as we can encounter an invalid time base that easily, however.

You should be able to work around the issue by adding "resample fps" video filter to the filter chain.
Title: Re: Crash when using HEVC nvidia encode in newer builds
Post by: garm on June 08, 2023, 08:00:47 PM
Thanks, that's the issue and those things worked.

The video I was importing is a clip that VLC generated and since one of their recent versions in the past year it has started doing something weird with the audio/video sync when it records clips because VLC can't play the clips itself properly without them being desynced, but they play fine in avidemux and other platforms.

Here's the log you asked for: https://pastebin.com/QPjg9rhy
Title: Re: Crash when using HEVC nvidia encode in newer builds
Post by: eumagga0x2a on June 08, 2023, 08:07:23 PM
Thanks, but the incomplete log file is useless.

Quote from: eumagga0x2a on June 08, 2023, 07:20:54 PMPlease open Avidemux, load the source video, close Avidemux and provide admlog.txt from %localappadata%\avidemux.

You have skipped the close part. It would be also preferable to use the latest available nightly due to high number of issues fixed in nightlies compared to the increasingly outdated release.
Title: Re: Crash when using HEVC nvidia encode in newer builds
Post by: garm on June 08, 2023, 08:09:31 PM
Sorry, not sure what happened. The link is fixed https://pastebin.com/QPjg9rhy
Title: Re: Crash when using HEVC nvidia encode in newer builds
Post by: garm on June 08, 2023, 08:12:02 PM
Here's the log from the nightly release

https://pastebin.com/UR2HBSKD
Title: Re: Crash when using HEVC nvidia encode in newer builds
Post by: eumagga0x2a on June 08, 2023, 09:39:09 PM
Thank you for the new log. As suspected, the video exhibits an insanely high clock (time base denominator) of 1 MHz:

[MP4Header::indexify] 20:11:22-860 Setting video timebase to 1 / 1000000
which Avidemux is known to not being able to handle properly, which is a bug.

The time base should be actually 1/60 for a constant frame rate 60 fps video:

[extractSPSInfo] 20:11:22-860 fps1000:60000