Crash on copy-saving part of video encoded by Avidemux (mpeg4-asp(xvid)/mp3/mkv)

Started by tuharsky, February 12, 2012, 05:40:12 PM

Previous topic - Next topic

Jan Gruuthuse

when doing an @ ~/avidemux_2.5_branch_gruntster$ sudo ./bootStrap_debug.sh the error is occurring to, as mean noticed in the other thread?
QuoteLD   ffmpeg_g
gcc: error: ffmpeg.o: No such file or directory
gcc: error: cmdutils.o: No such file or directory
make[3]: *** [ffmpeg_g] Error 1

nibbles

I was just going to try to reproduce his error.  I'll start that when svn starts working again.

As far as trying to get his software to link, the avidemux cmake code is ok.  It is likely a compiler or optimization issue like Mean suggested.  This is a widespread bug though, and we should figure it out why he can't compile this.

@Jan I'm sorry I didn't understand why you posted that, unless you think it's similar.  But that's ffmpeg.o not found, as versus golomb.o not being linked into libavcodec, which we can't see what's happening because no verbose output.  We should be able to ldd the thing though and find whether the golomb symbols are there.

gruntster

Quote[ 94%] Building CXX object avidemux/ADM_UIs/ADM_QT4/src/CMakeFiles/ADM_UIQT4.dir/FAC_frame.cpp.o
ADM_infoExtractor/libADM_infoExtractor_cli.a(ADM_infoextractor_h264.cpp.o): In function `get_se_golomb':
ADM_infoextractor_h264.cpp:(.text+0x347): undefined reference to `ff_se_golomb_vlc_code'
collect2: ld returned 1 exit status
make[2]: *** [avidemux/avidemux2_cli] Error 1
make[1]: *** [avidemux/CMakeFiles/avidemux2_cli.dir/all] Error 2

We patch ffmpeg during the CMake process to make private APIs available to Avidemux.  "ff_se_golomb_vlc_code" is not one we've needed to expose in the past but you could try adding "ff_se_golomb_vlc_code" to the "libavcodec.v" file (in avidemux/ADM_libraries/ffmpeg/libavcodec) so it is exported.  Not sure why other platforms don't need this though.

nibbles

I was able to confirm the OP original issue in 2.5.6.  Encode an xvid lame mkv, open the mkv, mark ab, save in copy copy as mkv, error.  Working on a decent analysis with output and debug trace.

nibbles

On OSX, looking up the symbols inside libavcodec, using

$ nm -gm /usr/local/lib/libADM5avcodec.53.dylib | grep ff_se_golomb
0000000000340a60 (__TEXT,__const) external _ff_se_golomb_vlc_code


I see it there on my system, consistent with Gruntster's experience.
I expect you will not find it if you do the same thing.

As Grunster mentioned, they patch libavcodec.v already using a patchfile.
We will give you a new patchfile for 2.5.6 with ff_se_golomb_vlc_code in it.

Replace this original:
cmake/patches/libavcodec_libavcodec.v.patch

with this new patchfile I crafted and stored on github.  Let us know how it works.


nibbles

Interesting.  I created the patch for 2.5.6.  You might tray that.
From your gist, it looks like it patched ok:

-- Checking for patch
-- ******************
-- Found patch

patching file libavcodec/avcodec.h
patching file libavcodec/ff_spsinfo.h
patching file libavcodec/mpeg12enc.c
patching file libavcodec/ffv1.c
patching file libavcodec/h264_parser.c
patching file libavcodec/h264.c
patching file libavcodec/mpegvideo.c
patching file libavcodec/libavcodec.v
patching file libavcodec/mpegvideo_enc.c
patching file libavformat/isom.c
patching file libavcodec/mpeg12.c
patching file libavcodec/h263dec.c
patching file libavcodec/vc1dec.c
patching file libavutil/avutil.h
patching file libavformat/matroskaenc.c
patching file common.mak


But then it complains about configure failing:

-- Configuring incomplete, errors occurred!
*** fail cmake ***


We'll have to investigate whether I did something weird to the patch that could affect configure.  Seems odd, but anyway.  Let's have you find your config.log for ffmpeg which should be left in the directories somewhere.  Start in the top level where bootStrap.sh is, and

find . -type f -name "config.log"

tuharsky

The log is here: /usr/src/avidemux_2.5_branch_gruntster/buildMain/avidemux/ADM_libraries/ffmpeg

posted at Gist:
https://gist.github.com/2002970

nibbles

I can't tell from that last gist.  It looks like normal output as it tries different flags.
Don't build as root though.  That's asking for problems you might wish to avoid risking.

What I would do, and it's complex sort of, but essentially this is the idea:
extract the source from tarball and hack admFFMpegBuild.cmake so that
you exit 1 just before it runs configure for ffmpeg.

Then manually run configure in the terminal, copying the configure command
from that gist you posted.  That way ffmpeg will be freshly extracted and
patched by cmake as usual.

tuharsky

I'm sorry, but this is beyond my skills.

Any idea, what is making Avidemux crash upon saving a part of MKV?

tuharsky

Hi,

has anybody else been successfull debuging the crash on copy-save mkv?

Jan Gruuthuse

No, that is far beyond my knowledge. You're still trying to compile 2.5.6? When you started in your terminal it shows you where logged in as root or as superuser and not as normal user. Normal terminal prompt should end like this:
Quotejan@DH67BL:~$
The prompt for your terminal showed:
Quoteroot@bluetux:/usr/src/avidemux_2.5_branch_gruntster#
That might have created problems with read-write rights issues.
Best you remove/delete /usr/src/avidemux_2.5_branch_gruntster might need to do that as root and try the complete process again.
Make sure you're in User Terminal and not Root terminal! if prompt not ending with $ you don't have a user terminal!

Change to your home directory:
cd ~

Get source code
svn co svn://svn.berlios.de/avidemux/branches/avidemux_2.5_branch_gruntster/

Go into to newly created directory
cd ~/avidemux_2.5.6

Start building:
sudo ./bootStrap.sh

If all goes well it should end with this:
Quote-- Installing: /usr/lib/ADM_plugins/audioEncoders/libADM_ae_faac.so
*  All Done  *



tuharsky

I have successfully compiled SVN Avidemux 2.5.5 (r7908).

Now, the videos are saved without error message, however, the resulting files are incorrect - sound synchronisation seems corrupt, and the latter part of video cannot seek properly.

In contrast, the stable version complains during save with some files, however the resulting files seem fully correct.

Jan Gruuthuse


mean

Check ff_se_golomb_vlc_code is present in the text file
libavcodec.ver