Avidemux is crashing when encoding a MPEG2 video in copy mode

Started by honza.kurik, December 04, 2016, 08:41:02 AM

Previous topic - Next topic

honza.kurik

I am having a problem with crashing Avidemux when encoding one specific video file. I do not observe this issue with other video files I have edited.

What I have done:
1. Opened a video file encoded in MPEG-2 recorded from DVB-T
2. Cut off the first approx 10 minutes of the video and the last approx. 15 minutes to get rid of ads
3. Set "Video output" to "Copy" and "Audio output" to "Copy" as well. "Output format" has been set to "AVI Muxer".
4. Started the encoding.
5. Avidemux runs perfectly for the first approx. 2/3 of the video file, then it crashes with the attached backtrace

This is repeatable and I observe the same issue anytime I am encoding this specific video file. The video file causing this issue is possible to play without any problems in "mplayer" or in "vlc" players.
I am using Fedora 25 having Avidemux compiled with QT5. However I started to observe this issue on Fedora 24 compiled with QT4.

mean

If you build it from source, could you rebuild with debug symbol ?
Without either full backtrace or a sample file, it's hard to investigate

Jan Gruuthuse

You only allow 2 audio tracks in avi?
Avidemux Menu: Audio: Select Track: Audio Tracks Configuration: only 2 can be enabled.
In Avidemux: Edit: Preferences: [Output] you have enabled:
[v] Create OpenDML files

honza.kurik

Quote from: mean on December 04, 2016, 09:07:55 AM
If you build it from source, could you rebuild with debug symbol ?
Without either full backtrace or a sample file, it's hard to investigate
I am using a build from rpmfusion: http://download1.rpmfusion.org/free/fedora/releases/25/Everything/x86_64/os/Packages/a/ . However, I can try to rebuild it from source and see what happens.

Quote from: Jan Gruuthuse on December 04, 2016, 09:47:16 AM
You only allow 2 audio tracks in avi?
Avidemux Menu: Audio: Select Track: Audio Tracks Configuration: only 2 can be enabled.
I have just one track enabled, as there is only one track in the input file.

Quote from: Jan Gruuthuse on December 04, 2016, 09:47:16 AM
In Avidemux: Edit: Preferences: [Output] you have enabled:
[v] Create OpenDML files
The "Create OpenDML files" button is disabled.

mean


eumagga0x2a

Quote from: honza.kurik on December 04, 2016, 08:41:02 AM
I am using Fedora 25 having Avidemux compiled with QT5. However I started to observe this issue on Fedora 24 compiled with QT4.

Did the Qt4 build originate from rpmfusion.org as well? It was Avidemux 2.6.12 then.

honza.kurik

Quote from: mean on December 04, 2016, 10:45:20 AM
Saving as mkv shows the same issue i suppose ?
Yes, however there is a difference. When using AVI container it generates a backtrack. When using MKV container it crashes in a "hard way", so not even a backtrack is generated.

Quote from: eumagga0x2a on December 04, 2016, 10:57:23 AM
Did the Qt4 build originate from rpmfusion.org as well? It was Avidemux 2.6.12 then.
Yes, it was exactly this version.

eumagga0x2a

Quote from: honza.kurik on December 04, 2016, 11:42:02 AM
Quote from: eumagga0x2a on December 04, 2016, 10:57:23 AM
Did the Qt4 build originate from rpmfusion.org as well? It was Avidemux 2.6.12 then.
Yes, it was exactly this version.

The issue is not quite new then.

To compile a debug build, do the following:

# dnf builddep avidemux

then as a user

mkdir -p ~/adm/git
cd ~/adm/git
git clone https://github.com/mean00/avidemux2.git
cd avidemux2
bash bootStrap.bash --debug --prefix=/usr/local


(you are free to chose different paths, of course). You'll need /usr/local/lib64 somewhere in /etc/ld.so.conf.d/*.conf

cd as root into your ~/adm/git/avidemux2/install/usr directory and run

# unalias cp
# cp -rf local /usr/
# ldconfig


PS: I'd highly recommend to use the "fusion" Qt theme instead of the "gtk" one, e.g.:

export QT_STYLE_OVERRIDE=fusion
/usr/local/bin/avidemux3_qt5

honza.kurik

Thanks for the detailed description of the build process. I have followed it and the backtrace generated by the built avidemux is attached (bt2.txt).

mean

Can you run it through db and use the
bt
command ?
It will contain full informatiosn
i.e.
gdb avidemux3_qt5
r
xxxx wait for crash xxxx
bt


honza.kurik


mean

Thank you
It crashes because it tries to read a 30M image, a blowing up the buffer in the process

Might be tricky to fix that

You could try passing it through ffmpeg in copy mode, so that the resulting file is "clean", it will take 10 sec

honza.kurik

I tried to "clean" it using ffmpeg copy mode, however it desynchronize audio and video once it hits the 30M image. So, I tried mencoder and mkvtoolnix to do the "cleanup" with the same result as ffmeg (audio/video desync after the 30M image).
As such, I will consider the video file as corrupted  and I will try to get a new one, properly encoded (from a different DVB-T device).

Thanks all for your help.