Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: flameproof on December 05, 2022, 07:26:59 AM

Title: 2.8.1: B-Frame file opening very slow
Post by: flameproof on December 05, 2022, 07:26:59 AM
I want to cut out ads from some TV stuff and loading the ~500Mb *.avi file takes like 10 Minutes or so.

Original format ist AVI / Codec: H264 - MPEG-4 AVC (part 10) (H264)

With 2.8.0 it was much faster, maybe 3 Minutes. My A/V settings are copy/copy and saving format is MKV (MP4 takes same time).

Is there any way to speed it up?

This video contains B-frames, but the presentation time stamps (PTS) are either missing or monotonically increasing. Avidemux can try to reconstruct correct PTS by decoding the entire video. This may take a lot of time. Proceed?
Title: Re: 2.8.1: B-Frame file opening very slow
Post by: eumagga0x2a on December 05, 2022, 09:51:26 PM
Whoever puts H.264 with frame reordering (with B-frames) into an AVI container, does a grave disservice to humankind.

Please check that hardware accelerated decoding is available and enabled. Depending on video resolution, hardware and hwaccel API (depending on platform, VDPAU, VA-API, VideoToolbox or DXVA2), it can vastly increase decoding speed. If the CPU is very powerful, enabling multi-threaded decoding in libavcodec (in Avidemux Preferences) and disabling decoding in hardware may be faster, however.
Title: Re: 2.8.1: B-Frame file opening very slow
Post by: flameproof on December 06, 2022, 02:40:51 AM
Quote from: eumagga0x2a on December 05, 2022, 09:51:26 PMWhoever puts H.264 with frame reordering (with B-frames) into an AVI container, does a grave disservice to humankind.

Well, it's from an online TV recorder. They have MP4 too, but in much lower resolution, unfortunately.

Quote from: eumagga0x2a on December 05, 2022, 09:51:26 PMPlease check that hardware accelerated decoding is available and enabled. Depending on video resolution, hardware and hwaccel API (depending on platform, VDPAU, VA-API, VideoToolbox or DXVA2), it can vastly increase decoding speed. If the CPU is very powerful, enabling multi-threaded decoding in libavcodec (in Avidemux Preferences) and disabling decoding in hardware may be faster, however.

I have a 6th gen i3 without extra GPU. So I presume I am stuck with what I have.
Title: Re: 2.8.1: B-Frame file opening very slow
Post by: eumagga0x2a on December 06, 2022, 09:21:05 PM
Quote from: flameproof on December 06, 2022, 02:40:51 AMit's from an online TV recorder.

The usual offenders.

Quote from: flameproof on December 06, 2022, 02:40:51 AMI have a 6th gen i3 without extra GPU

Hw accelerated decoder and encoder are quite powerful in this processor. Are you sure you used the same settings with 2.8.0? I am not aware of any changes which might have caused such a major slowdown of PTS reconstruction. Could you please provide admlog.txt from loading the same AVI/H.264 video in 2.8.0 and in 2.8.2 (the latest nightly)?
Title: Re: 2.8.1: B-Frame file opening very slow
Post by: flameproof on December 08, 2022, 04:58:36 AM
Hi, seems 2.8.0 was already wiped from the PC when I installed the latest. For the decoder option I see only "Swap U and V". Output is copy/copy and format is MKV. I did an "Enable OpenGL", but AviDx crashed.
Title: Re: 2.8.1: B-Frame file opening very slow
Post by: eumagga0x2a on December 08, 2022, 07:29:44 AM
Quote from: flameproof on December 08, 2022, 04:58:36 AMFor the decoder option I see only "Swap U and V"

This means, HW accelerated decoding is disabled. It can be enabled in Avidemux Preferences in the HW accel. tab.

Quote from: flameproof on December 08, 2022, 04:58:36 AMI did an "Enable OpenGL", but AviDx crashed.

Enabling OpenGL requires restart of Avidemux, did you do that?

If probing OpenGL features results in a crash on Avidemux startup, this points to a broken graphics driver. If you are on Windows, please provide admlog.txt (from %localappdata%\avidemux) from such a crash and try to use the "DXVA2" display.
Title: Re: 2.8.1: B-Frame file opening very slow
Post by: flameproof on December 09, 2022, 05:43:01 AM
I give up!

On another PC I have 2.7.8 which takes about 3 Minutes for the decoding. I copied those settings to 2.8.1 and it did not make a difference. Also tried all the OpenGL, QT etc. options and decoding did not change from the 8 Minutes.

So I tried 2.8.0 - and that takes about 2 Minutes. I will keep using that.
Title: Re: 2.8.1: B-Frame file opening very slow
Post by: szlldm on December 09, 2022, 11:37:42 AM
Could you try the latest nightly build https://avidemux.org/nightly/win64/ (https://avidemux.org/nightly/win64/) ?
There are portable versions (.zip)
Title: Re: 2.8.1: B-Frame file opening very slow
Post by: eumagga0x2a on December 10, 2022, 08:29:35 AM
@flameproof:

It is a pity that you are not willing to help to assess the situation. This just ensures that the problem (if there is one) lives on.

Prioritizing faster PTS reconstruction (for whatever reason) over tons of bugfixes in 2.8.2 development versions (skip 2.8.1) in comparison to 2.8.0 is a very strange choice IMHO, to say the least.
Title: Re: 2.8.1: B-Frame file opening very slow
Post by: flameproof on December 12, 2022, 03:05:43 AM
Quote from: szlldm on December 09, 2022, 11:37:42 AMCould you try the latest nightly build https://avidemux.org/nightly/win64/ (https://avidemux.org/nightly/win64/) ?
There are portable versions (.zip)

The zip makes it easier. avidemux_r221127_win64Qt5_147.zip loads the data without any setting change in about 3-4 Minutes. Seems that is a good improvement.

Processor   Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz, 3700 Mhz, 2 Core(s), 4 Logical Processor(s)
16Gb RAM, no graphic card.

So that nightly is on the right track for me.