Here's a problem that I've noticed for quite some time: after loading some MPEG files, such as VOB files from a DVD, scrubbing to the end causes Avidemux to hang for several seconds. Here's a link to an example file:
https://1drv.ms/u/s!AtRWanx5i6MM9xMqTcN6rBgM_D8f
Confirming, going to the end of the video takes very long. Maybe something is wrong with getLastKeyFramePts.
The issue is specific to peculiarities of the sample. If I save it in copy mode to e.g. remuxed.mpg and open remuxed.mpg in Avidemux, the latter has no problems seeking to the end of the video.
Actually, we spend 15 seconds(!) in getFrameNumFromPtsOrBefore because we slide in the loop past the last frame of the video and continue until unsigned long wraps around :-D
Indeed, I remux such files when I hit the problem, and I agree it does work around the issue. I just get frustrated when I hit the end, and then have to wait for the application to unhang before I can get on with the remuxing.
If you would have reported the issue a day earlier, the fix (or at least a quick band-aid to avoid the hang) would have been in 2.7.3.
Let me know when a version with the quick band-aid fix is available, and I'll be happy to test it. I'm comfortable using a development build, if necessary.
Thanks for all your work on the project. It's the only free tool I've ever found that can real-time scrub through video on a Windows platform! What a time saver.
If you are okay with a private MinGW win64 build as ZIP, I can do it in a few minutes and upload it e.g. to WeTransfer. Official nightlies will probably take a break for a while.
Your choice. If you make a fixed version available to me now, I'll happily test it and use it until the next release. Otherwise, I'll wait for the fix to get rolled into a later build. As I've already waited hundreds of times for the getFrameNumFromPtsOrBefore() loop to wrap around, I can clearly wait a little longer!
Done: https://we.tl/t-5LqGH8cyGj (https://we.tl/t-5LqGH8cyGj)
It is 2.7.3 code-wise + the both attached patches, built on Linux using MXE cross-build environment as described in https://github.com/mean00/avidemux2/blob/ffmpeg4x/cross-compiling.txt
Checksums:
md5sum avidemux_r190321-233132_win64Qt5.zip
272eb65bfe0fb7e74ec7a07e54a131a2 avidemux_r190321-233132_win64Qt5.zip
sha256sum avidemux_r190321-233132_win64Qt5.zip
dc846d704ee672074480660b39ac7026c9083ac2453ea20d8aa630433269bea7 avidemux_r190321-233132_win64Qt5.zip
Extract the content of the ZIP, no installation needed.
Works perfectly on several, previously troublesome, VOB / MPEG files. Thanks again!
You're welcome. Please don't hesitate to report issues in the future.
(by the way, it was me who caused this bug in the first place)