Page 1 of 1

ffmpeg on QNAP TS-439

PostPosted: Mon Feb 07, 2011 5:07 pm
by FourCandles
Hi all,

I've got serviio up and running on my QNAP TS-439 pro II and it works great. The only issue I have is the transcoding of any file using ffmpeg.

I installed ffmpeg using ipkg but it appears to be an older version perhaps not compiled with the correct options. Here's the output from ffmpeg:

  Code:
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --prefix=/opt/cross-project/x86/sys-root/usr --disable-static --enable-shared
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  built on Nov 10 2010 00:51:45, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)


I've scoured the web and can't find any info on how to compile on a QNAP nor any pre-compiled versions. I'm a bit of a linux noob so would really like some help on getting the correct version of ffmpeg on the QNAP.

Can anyone help?

Thanks!

Re: ffmpeg on QNAP TS-439

PostPosted: Tue Feb 08, 2011 11:21 pm
by FourCandles
Seems like someone has been there and done that, just on ARM architecture of a Synology box:

http://pcloadletter.co.uk/2011/02/07/serviio-on-synology-nas-with-arm-cpu/

I've followed this but with some changes / additions to get it working on QNAP TS-439 Pro II (Atom based):

1. Busybox on QNAP has a fubared mktemp so need to just get rid of it.

  Code:
cp /bin/mktemp /bin/mktemp-orig
rm /bin/mktemp


2. Needed YASM - just installed it using ipkg

3. The ./configure is slightly different

  Code:
./configure --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame


I'm currently in the "make" process and all is going well - I'll update this if it gets compiled and reports the correct version.

Re: ffmpeg on QNAP TS-439

PostPosted: Wed Feb 09, 2011 9:39 am
by zip
Yes, that someone is patters: viewtopic.php?f=14&t=1731

Re: ffmpeg on QNAP TS-439

PostPosted: Wed Feb 09, 2011 10:24 am
by FourCandles
Seems like we were both attempting it at the same time - thankfully patters got there first as his linux skills far outshine mine!

I did need to do one other thing to make ffmpeg run and that was to add to the path:

  Code:
export LD_LIBRARY_PATH=/usr/lib/


I can't remember now exactly what was missing from the path or where it was located but the error was due to a library not being found so I found the location of the library and used that location in the path.

Now I can view my MKV encoded videos on my Sony S370 - nice. I think that these get re-encoded rather than remuxed but hey, if it works that's fine with me.

Hope this helps someone else.

Re: ffmpeg on QNAP TS-439

PostPosted: Wed Feb 09, 2011 12:18 pm
by patters
If you have an unmodified profiles.xml the mkv files will be remuxed for the Sony BDP (except DTS audio ones which have the audio transcoded to AC3).

If you're on a wired connection and aren't bothered about seeking, but would rather have working DTS, comment out all the matroska transcoding matches in the device profile.

Re: ffmpeg on QNAP TS-439

PostPosted: Fri Apr 29, 2011 11:52 am
by moleculezz
Hi,

I tried to compile ffmpeg but I ran into some issues. I have the QNAP TS-459 Pro+ (Atom)

It seems that it cannot find lame. I did install it via ipkg install lame.
  Code:
# /opt/ffmpeg/ffmpeg
/opt/ffmpeg/ffmpeg: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory


I recompiled ffmpeg without --enable-libmp3lame and it worked. Just to check that ffmpeg was working and that lame was the issue.

Then I searched for libmp3.so.o and I get the following:
  Code:
[/] # find -name libmp3lame.so.0
./share/MD0_DATA/.qpkg/Optware/lib/libmp3lame.so.0

How can I get it to find lame?