Bug fixing on etmp4 tool of Evalvid framework

Hello,

This post is destined to people who had troubles with etmp4 tool of Evalvid framework. I got a problem like this:

*** glibc detected *** etmp4: double free or corruption (fasttop): 0x099066e8 ***

======= Backtrace: =========
/lib32/libc.so.6[0xf7e96044]
/lib32/libc.so.6(cfree+0x96)[0xf7e980d6]
etmp4[0x807b412]
etmp4[0x807d317]
etmp4[0x804c440]
etmp4[0x804d7c3]
etmp4[0x804dc1e]
/lib32/libc.so.6(__libc_start_main+0xe5)[0xf7e3c685]
etmp4[0x8049271]

======= Memory map: ========
08048000-080b0000 r-xp 00000000 08:05
 2535398                            /usr/local/bin/etmp4
080b0000-080b1000 rw-p 00067000 08:05 2535398                            /usr/local/bin/etmp4
09902000-09945000 rw-p 09902000 00:00 0                                  [heap]
...
...

After googled and waste a little time, I fixed the problem following these steps:

xvid codec:

$ wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz # you can search for newest version
$ tar zxvf xvidcore-1.3.2.tar.gz
$ cd xvidcore/build/generic
$ ./configure
$ make
$ sudo make install

ffmpeg codec:

$ git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
$ ./configure --enable-shared
$ make
$ sudo make install

GPAC library:

$ svn co https://gpac.svn.sourceforge.net/svnroot/gpac/trunk/gpac gpac
$ ./configure --enable-pic
$ make
$ sudo make install

Copy include/gpac subdirectory to /usr/include. This library is used by etmp4.

Assuming that you already have Evalvid source code, you should do the following steps:

1. Enter in Envalvid source code directory
2. Uncomment u64 typedef in types.h
3. Edit Makefile. Change -lgpac_static to -lgpac.
4. After done, compile and install:

$ make 
$ sudo make install

Following, set the MALLOC_CHECK_ environment variable to zero:

$ export MALLOC_CHECK_=0

After at all, etmp4 does not give that error. The tool should work well.

Advertisements

14 thoughts on “Bug fixing on etmp4 tool of Evalvid framework

  1. Hi,

    Could you please give me more details about the distribution, version and arch that you are running Evalvid-2.7? I’m facing some problems with GPAC under Debian.

    Thanks,
    V.

    • Hi,

      I’ve been using Ubuntu server version 11.10 (in VirtualBox) with kernel 3.0.0-12 (32-bit). I didn’t have trouble (I think, I don’t remember now if I had..) with GPAC. However, I remember that I had installed gpac and libgpac-dev package from apt-get command before using Evalvid any tools. If you’re trying to compile GPAC from a source-code, maybe need install some library dependencies… Unfortunately, it is common to face many problems in Evalvid installation.

      I hope I helped you,
      Thanks for comment.

  2. sir i have doubt in evalvid source code step that u specify
    1. Enter in Envalvid source code directory
    2. Uncomment u64 typedef in types.h
    3. Edit Makefile. Change -lgpac_static to -lgpac.
    4. After done, compile and install
    i can understand this it means
    what is mean be uncomment u64 typedef in types.h?
    how to compile and install ?
    i am a PG student
    i am in deadline plzzzzzzzzzzzzz
    tell me solution
    and i have also problem in gpac library installation
    i use ubuntu 10.04,ns-allinone-2.35

    • Hi, when I say ‘uncomment u64 typedef in types.h’ I mean you need to open types.h file located probably in include or lib directory (i don’t remember well) and uncomment tyhe where there is written u64. This u64 is new type defined by programmer (this way, named typedef). And I also had problems with gpac library. It’s been long time since I used Evalvid, so I’m not sure but I think putting -lgpac into the Makefile will work.

      • i find type.h file in evalvid 2.7 in that what can i do in type.h

        i can’t understand that “‘uncomment u64 typedef”

        it means what plz tell me clearly i am new to linux and ns2

        GPAC library shows errors while installing
        is there any easy way to install gpac

  3. Hi, when I say ‘uncomment’ I mean to remove the comment in the file at line where u32 is defined. In C the comment structure is made by this character /* and this */. For instance,

    /* This is a comment in C ignored by the gcc complier */

    In C++ the comment structure may be made by the way, or by using double slash //. For instance,

    // This is an example of comment in C++ ignored by g++ compiler

    So, you need to uncomment the line where u32 is defined. To do this, you need to delete the double slash // or this character /* and this */.

    I’m not sure which of the both comment is in the code, but whatever is you need to delete the character used to create comment lines. However, this process is only necessary if you are having compilation trouble. If not, forget it.

    About gpac, I think everyone gets trouble with it. I don’ t think that there is an easy way to install it. However, make sure that you really need gpac library, because gpac lib is only used by codecs. I think you can try to ignore it once and make some simulations by using Evalvid.

  4. It worked well
    after this how to draw xgraph for delay,jitter,loss?
    please explain this also like this sir
    i dont how to draw graph?
    how to draw graph with loss_foremanout.txt delay_foremanout.txt rate_s_foremanout.txt rate_r_foremanout.txt?
    plzzz tell this sir

  5. sir i got output but the output a01e.m4v is not able to play but a01e.mp4 is playing well
    the error shows in terminal is :
    *** loss_highout.txt ***: percentage of lost [frames|packets]
    column 1: I (including H)
    column 2: P
    column 3: B
    column 4: overall

    *** delay_highout.txt ***: jitter/delay statistics
    column 1: [frame|packet] id
    column 2: loss flag
    column 3: end-to-end delay [s]
    column 4: sender inter [frame|packet] lag [s]
    column 5: receiver inter [frame|packet] lag [s]
    column 6: cumulative jitter [s] [Hartanto et. al.]

    *** rate_s_highout.txt ***: sender rate
    column 1: time [s]
    column 2: momentary rate [bytes/s]
    column 3: cumulative rate [bytes/s]

    *** rate_r_highout.txt ***: receiver rate
    column 1: time [s]
    column 2: momentary rate [bytes/s]
    column 3: cumulative rate [bytes/s]

    Error parsing MPEG-4 VOP header
    Couldn’t export mp4-track 4: No Error
    Error parsing MPEG-4 VOP header
    Segmentation fault (core dumped)

    what can i do further plz tell this quickly
    i am waiting for ur reply

  6. mp4trace in evalvid-2.7 shows error while installing \
    the error is
    make: *** [mp4trace] Error 1
    plz tell me the soln
    i am in emergend=cy

  7. mp4trace in evalvid-2.7 shows error while installing \
    the error is
    make: *** [mp4trace] Error 1
    plz tell me the soln
    i am in emergend=cy

  8. Hi, my ubuntu14.04 64bits and evalvid2.7 source code. When I open the types.h, and comment it in one line as followed :
    #ifndef TRACE_TYPES
    #define TRACE_TYPES

    #if defined(_WIN32)
    #include
    typedef unsigned __int64 u64;
    typedef SOCKET sock_t;
    #elif defined(__linux__)
    typedef int sock_t;
    /*typedef unsigned long long u64;*/
    #else
    #include
    typedef int sock_t;
    typedef uint64_t u64;
    #endif

    enum prot { INV, UDP, TCP };

    #endif
    When make it, it occured errors:in the file def.h line 6:elif has nothing condition, so I mend it to else.
    Then make it again, it saied:write.o error:not reference to hit_..example.c

    • Maybe, some functions defined in write.c or hit_example.c are not defined in a .h file or it could be defined, but make sure those functions are not defined as ‘static’ function if another part of the code depends on them. If you’re defining a function without a .h file, you have to use the reserved name ‘extern’ if you wanna use this function in another .c file. I’m really not sure what’s the problem you’re going through.

  9. Hi airtoncomp:
    These days I spent lots of time to compile evalvid2.7 source code in my ubuntu14.04 64bits. I did all steps likes you,when I make it, it said:
    In file included from queue.c:12:0:
    timing.h:31:1: error: unknown type name ‘u64’
    u64 get_hpc(void);
    ^
    timing.h:35:1: error: unknown type name ‘u64’
    u64 freq(void);
    ^
    make: *** [queue.o] Error 1

    So I add #include in the file timing.h at __linux__ condition. Then I make it again, I cast some errors like this:
    L mp4trace …
    C read.c …
    C stat.c …
    C writemp4.c …
    C etmp4.c …
    L etmp4 …
    writemp4.o: In function `write_raw.isra.2′:
    writemp4.c:(.text+0x90a): undefined reference to `gf_isom_hint_sample_new’
    writemp4.c:(.text+0x93f): undefined reference to `gf_isom_hint_sample_read’
    writemp4.c:(.text+0xbd4): undefined reference to `gf_isom_hint_sample_new’
    writemp4.c:(.text+0xc0c): undefined reference to `gf_isom_hint_sample_read’
    writemp4.o: In function `WriteMP4′:
    writemp4.c:(.text+0x16f6): undefined reference to `gf_isom_hint_sample_new’
    writemp4.c:(.text+0x172b): undefined reference to `gf_isom_hint_sample_read’
    writemp4.c:(.text+0x1b4c): undefined reference to `gf_isom_set_visual_info’
    writemp4.c:(.text+0x1c9b): undefined reference to `gf_isom_hint_sample_new’
    writemp4.c:(.text+0x1cd3): undefined reference to `gf_isom_hint_sample_read’
    collect2: error: ld returned 1 exit status
    make: *** [etmp4] Error 1

    I used google to search it, but found no answer yet. I search these function declare in gpac/internal/isomedia_dev.h, and I the writeemp4 has included. Some said the error coming from not link the gpac lib. In the Makefile, I tried -Igpac or -Igpac_static, both of them did work.
    Can you give some advice to me.
    Thank you in advance.

    • Hi,

      I’m not sure what the source of the problem is, but it looks like you don’t have ffmpeg library installed in your system. Maybe you have, but as evalvid is originally developed for 32 bit system, the evalvid code might be trying to look for 32-bit library directories. And, if you have only 64-bit library installed in your system, probably evalvid won’t be able to find the libs that it needs. Maybe, you just have to install 32-bit libraries (ffmpeg, gpac, etc..).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s