opening of mp4 file takes too long with V2.7.6

Started by Mac23, July 15, 2020, 01:04:15 PM

Previous topic - Next topic

Mac23

Somehow with version 2.7.6 of Avidemux (Linux) it takes much longer (several seconds) to open a mp4 file ("decoding frame type").
Using Avidemux 2.7.4 it took just milliseconds.

Should be something with these libraries:
- libADM_dm_mp4.so
- libADM_coreDemuxer6.so.3

The old ones are working great - even with Avidemux 2.7.6.

Is this a bug or is this behavior on purpose?
Anyone who has the old deb packages for avidemux 2.7.4 and Ubuntu 18.04? I can't find them anymore...

Marcus

eumagga0x2a

It is on purpose for mp4 files with H.264 video. Older releases didn't bother to decode frame type, so cases like field-encoded video were not manageable. We also couldn't catch cases of codec parameters changing on-the-fly.

eumagga0x2a

Quote from: Mac23 on July 15, 2020, 01:04:15 PM
Should be something with these libraries:
- libADM_dm_mp4.so
- libADM_coreDemuxer6.so.3

The old ones are working great - even with Avidemux 2.7.6.

A major part of improvements regarding mp4 handling from 2.7.4 to 2.7.6 are in these libraries. But you can trivially disable the check when building Avidemux form source by changing the line 477 of avidemux_plugins/ADM_demuxers/Mp4/ADM_mp4.cpp from

        }else if(isH264Compatible(_videostream.fccHandler) && VDEO.extraDataSize)

to

        }else if(false)

Some functionality like cut point checks in copy mode which relies on demuxers not lying about frame type as well as support for field-encoded H.264 streams, often used by British and French broadcasters, will be broken.

Mac23

Thanks for clarifying that.

Maybe it could be an configurable option? Otherwise I'll use the old version or try to compile the new one. For the last I need to figure out, how to compile it with XVIDEO support. Seems I need some more dev-packages...

eumagga0x2a

Quote from: Mac23 on July 17, 2020, 09:12:46 PM
For the last I need to figure out, how to compile it with XVIDEO support. Seems I need some more dev-packages...

Please use the convenience script.

bash createDebFromSourceUbuntu.bash --deps-only

will take care of dependencies (at least it should, if it doesn't, please report, I'll try to fix it) without starting the build. If you run the script without options as

bash createDebFromSourceUbuntu.bash

it will do all the steps in one go (and stop on errors). Don't forget to uninstall Avidemux packages from other sources first.

Mac23

#5
It's been a while but I want to post my (final) solution.

- I installed avidemux using apt - just as usual
- I changed ADM_mp4.cpp as described before and compiled avidemux:
 bash createDebFromSourceUbuntu.bash --deps-only
bash bootStrap.bash --prefix=/usr/local --deb --without-cli --without-qt --with-plugins
- I made a copy of the original file and moved the new one (changed plugin) inside the deb to /usr/lib/ADM_plugins6/demuxers/

Works :-) and I can revert it back if I want!