Data size too large

  • Tyler

    Tyler - 2013-01-30

    I have a limited amount of ram to install MiniDLNA on.  Right now the package is way too large, i've been able to narrow the culprit down to ffmpeg which seems to require 14mb…. Which is huge when the other dependencies and MiniDLNA itself all require around 100 kb each.   Is this normal that ffmpeg is requiring so much space?

    I configure ffmpeg with the docs, htmlpages, manpages, podpages, txtpages, avdevice, swresample, swscale, postproc, afilter, and optimizations disabled.  Is there anything else that I can disable to reduce the size of ffmpeg?


  • Cecil Coupe

    Cecil Coupe - 2013-01-31

    All you need a the appropriate libraries/codecs compiled for the OS and linked against (or with) minidlna.  People run minidlna on a Raspberry PI, is your device less limited?

  • Tyler

    Tyler - 2013-01-31

    do to other libraries that are needed I only have a few mb to work with, which I didn't think would be a problem till I found out that the ffmpeg library takes up 14 mb.  I'm not sure if I'm doing something wrong with the compilation, but 14mb seems like a lot for a single library.

  • Tyler

    Tyler - 2013-02-01

    So i narrowed it down to libavcodec, is it possible to compile without this?

  • Cecil Coupe

    Cecil Coupe - 2013-02-02

    Probably not.  Depends on your OS and how you configure it and then minidlna.  Please describe your system (OS and HW)

    My Buffalo NAS is a old low end box (128MB) . I compiled Minidlna on it. That was slow, but it worked.

    ccoupe@debian:~/minidlna$ ls -l /usr/lib/
    -rw-r-r- 1 root root 5726216 Oct  5  2010 /usr/lib/

    That would be 5MB and not all of it is used at once. 

  • Tyler

    Tyler - 2013-02-04

    I used bitbake to compile for an ARM device which is running the android kernel.  After compilation the FFMPEG libraries look like this.
    -rwxr-xr-x 2 twear users  11M Jan 30 14:21
    -rwxr-xr-x 2 twear users 1.3M Jan 30 14:21
    -rwxr-xr-x 2 twear users 167K Jan 30 14:21

    5M's is even a little higher than what I really want, but I might be able to manage if I got it down around that.

  • Tyler

    Tyler - 2013-02-04

    Also, I don't believe that libavcodec is needed for streaming, it looks like it is only being used to create the metadata.  is this correct?

  • Cecil Coupe

    Cecil Coupe - 2013-02-04

    That would be my guess too. Also when files are deleted or moved, assuming Android supports inotify. It's also possible that turning off optimization increased code size (or not).  You might be able to configure ffmpeg to build/use use some codecs that are unlikely to used on your device/application. That's beyond my experiece however.

  • Tyler

    Tyler - 2013-02-04

    Turning optimizations on or off didn't seem to works.

    This is the line I'm using to configure.  Any insights on something I can do to reduce the lib size?

    ./configure --enable-cross-compile --cross-prefix=/pkg/asw/compilers/codesourcery/arm-2010q1/bin/arm-none-linux-gnueabi- \
        --cc=/pkg/asw/compilers/codesourcery/arm-2010q1/bin/arm-none-linux-gnueabi-gcc \
        --arch=arm --target-os=linux --enable-armv5te --disable-armv6 --disable-mmx \
        --enable-shared --disable-doc --disable-htmlpages --disable-manpages --disable-podpages \
        --disable-txtpages --disable-avdevice --disable-swresample --disable-swscale \
        --disable-postproc --disable-avfilter --disable-debug --disable-ffserver --disable-ffplay
  • Cecil Coupe

    Cecil Coupe - 2013-02-05

    Check if the debug symbols are stripped. On my arm system

    ccoupe@debian:~$ file /usr/lib/
    /usr/lib/ ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped

    There's probably a way to figure out the command line that built that, but I'm remember how at the moment.

  • Tyler

    Tyler - 2013-02-05

    this is what my file shows. ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped

  • Cecil Coupe

    Cecil Coupe - 2013-02-05

    I'd suggest visiting a ffmpeg or arm linux forum with your question.

    Then again, I'd just build minidlna just to see if it works and discover other problems to be fixed cross compiling to Android. 

  • Cecil Coupe

    Cecil Coupe - 2013-02-05

    It also depends on the version of ffmpeg you're working with. On my Ubuntu 12_04 X64  where vlc drags in a bunch of stuff,

    ccoupe@twb:~$ ls -lh /usr/lib/x86_64-linux-gnu/
    -rw-r-r- 1 root root 6.7M Jan 24 11:50 /usr/lib/x86_64-linux-gnu/

  • Tyler

    Tyler - 2013-02-06

    after getting a response from the ffmpeg mailing list, the correct configure option to add is -enable-small.

    Reduced the size to ~4mb

  • aNSioN

    aNSioN - 2013-05-16

    -rwxr-xr-x 1 jeffery_chi jeffery_chi 570628 2013-05-16 18:01 rootfs/lib/
    -rwxr-xr-x 1 jeffery_chi jeffery_chi 875616 2013-05-16 18:01 rootfs/lib/
    -rwxr-xr-x 1 jeffery_chi jeffery_chi 113860 2013-05-16 18:01 rootfs/lib/

    In fact, i want to make the library smaller.  XD

    configure -prefix=/home/jeffery_chi/test/rootfs -cross-prefix=mipsel-linux- -arch=mips -target-os=linux -enable-shared -enable-pthreads -enable-small -disable-debug -disable-devices -disable-bsfs -disable-ffprobe -disable-parsers -disable-encoders -disable-decoders -disable-muxers -disable-mmx -disable-mmx2


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks