This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Serviio Mediaserver on N4F?

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by fsbruva »

After you changed the ratecontrol.c, did you make reinstall?

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by himbrr »

Yes
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by fsbruva »

I am reticent to recommend moving the source code obtained from the serviio site into the folder and hoping all goes well. I don't know enough about the mentality behind all the patches applied within the port to "fix" the stock tarball to work with FreeBSD. Send an email to the port maintainer, and see if he/she can assist with using more up to date source code.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by alexey123 »

Noob question: May be need linux kernel ?
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by fsbruva »

No. Both of the ffmpeg ports download the standard ffmpeg source tarball and build it after 5 or 6 patches have been applied to the source code. It is kind of strange that building ffmpeg requires perl and so many other things to be built, but I think that is an artifact of automake being used to process the Makefile. I suspect the FreeBSD build environment is why so many packages are built along with ffmpeg.

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by himbrr »

So.. what should I do now?
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by fsbruva »

fsbruva wrote:Send an email to the port maintainer, and see if he/she can assist with using more up to date source code.
I am not sure beyond this. There doesn't seem to be a lot of results for Googling "build ffmpeg from source FreeBSD."

The first step would be rebuild the stock ffmpeg with ALL options enabled. It might be that there is an undocumented dependency within the modules.

I suppose you could untar the Serviio ffmpeg tarball and attempt to gmake (because FreeBSD's make is pretty awful) the software, and then troubleshoot all the build errors until there are none. Or, look into what patches get applied to the stock makefile by the ports collection to make building ffmpeg palatable.

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by himbrr »

Building the source from serviio doesn't work.
I'm trying now to install the ffmpeg developer release. This is the newest build I found on ports...
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by himbrr »

damn.

Code: Select all

root@proto:/root # /usr/local/bin/ffmpeg -i /mnt/Mediashare/Videos/Filme/Abraham\ Lincoln\ Vampirjaeger/Abraham\ Lincoln\ Vampirjaeger.avi -y -copyts -c:v flv -b:v 1000k -maxrate:v 1000k -bufsize:v 1000k -r 24000/1001 -g 15 -c:a libmp3lame -b:a 192k -ar 44100 -ac 2 -map 0:0 -map 0:1 -sn -f flv /usr/local/etc/serviio-1.0.1/tmp/transcoding-temp-43-flv_player-MEDIUM.stf         ffmpeg version 1.0.git-79133fd Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 16 2012 16:11:47 with gcc 4.2.1 (GCC) 20070831 patched [FreeBSD]
  configuration: --prefix=/usr/local --mandir=/usr/local/man --incdir=/usr/local/include/ffmpeg-devel --libdir=/usr/local/lib/ffmpeg-devel --shlibdir=/usr/local/lib/ffmpeg-devel --datadir=/usr/local/share/ffmpeg-devel --build-suffix=-devel --progs-suffix=-devel --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-pthreads --enable-memalign-hack --disable-libstagefright-h264 --disable-libutvideo --cc=cc --extra-cflags='-I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib ' --extra-libs=-pthread --disable-debug --disable-sse --disable-mmx --enable-libaacplus --disable-indev=alsa --disable-outdev=alsa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass --enable-libcdio --enable-libcelt --enable-libfaac --enable-libfdk-aac --enable-fontconfig --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-libbluray --enable-libv4l2 --enable-libmodplug --disable-openal --enable-libopencv --enable-libopenjpeg --  libavutil      51. 76.100 / 51. 76.100
  libavcodec     54. 65.100 / 54. 65.100
  libavformat    54. 32.100 / 54. 32.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 19.102 /  3. 19.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
Input #0, avi, from '/mnt/Mediashare/Videos/Filme/Abraham Lincoln Vampirjaeger/Abraham Lincoln Vampirjaeger.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 01:44:59.63, start: 0.000000, bitrate: 1856 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x304 [SAR 1:1 DAR 45:19], 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), s16, 384 kb/s
[flv @ 0x2acf3c10] impossible bitrate constraints, this will fail
Output #0, flv, to '/usr/local/etc/serviio-1.0.1/tmp/transcoding-temp-43-flv_player-MEDIUM.stf':
  Metadata:
    encoder         : Lavf54.32.100
    Stream #0:0: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 720x304 [SAR 1:1 DAR 45:19], q=2-31, 1000 kb/s, 1k tbn, 23.98 tbc
    Stream #0:1: Audio: mp3 ([2][0][0][0] / 0x0002), 44100 Hz, stereo, s16p, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> flv)
  Stream #0:1 -> #0:1 (ac3 -> libmp3lame)
Press [q] to stop, [?] for help
Assertion failed: (q>0.0), function ff_rate_estimate_qscale, file libavcodec/ratecontrol.c, line 781.
Abort
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

asmodeas
NewUser
NewUser
Posts: 5
Joined: 17 Nov 2012 06:42
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by asmodeas »

I'm not one to usually post, however, I got this working by basically following this guide including transcoding.

Only differences are that I built everything from ports including openjdk6.

And I built ffmpeg1 using the options from fsbruva's post.

Here is the output of a ffmpeg1 -version:

Code: Select all

root@serviio:/root # ffmpeg1 -version
ffmpeg version 1.0
built on Nov 14 2012 23:40:46 with gcc 4.2.1 (GCC) 20070831 patched [FreeBSD]
configuration: --enable-x11grab --prefix=/usr/local --mandir=/usr/local/man --incdir=/usr/local/include/ffmpeg1 --libdir=/usr/local/lib/ffmpeg1 --shlibdir=/usr/local/lib/ffmpeg1 --datadir=/usr/local/share/ffmpeg1 --build-suffix=1 --progs-suffix=1 --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-pthreads --enable-memalign-hack --disable-libstagefright-h264 --disable-libutvideo --cc=cc --extra-cflags='-msse -I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib ' --extra-libs=-pthread --disable-debug --disable-libaacplus --disable-indev=alsa --disable-outdev=alsa --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-libass --disable-libcdio --disable-libcelt --enable-libfaac --disable-libfdk-aac --enable-fontconfig --enable-libfreetype --enable-frei0r --enable-gnutls --disable-libgsm --enable-libmp3lame --disable-libbluray --disable-libv4l2 --disable-libmodplug --disable-openal --enable-libopencv --disable-libopenjpeg --disable-libpulse --enable-librtmp --enable-libschroedinger --disable-ffplay --disable-libspeex --enable-libtheora --disable-vaapi --disable-vdpau --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-version3
libavutil      51. 73.101 / 51. 73.101
libavcodec     54. 59.100 / 54. 59.100
libavformat    54. 29.104 / 54. 29.104
libavdevice    54.  2.101 / 54.  2.101
libavfilter     3. 17.100 /  3. 17.100
libswscale      2.  1.101 /  2.  1.101
libswresample   0. 15.100 /  0. 15.100
libpostproc    52.  0.100 / 52.  0.100

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by himbrr »

asmodeas wrote:I got this working by basically following this guide including transcoding.
Including transcoding on the mediabrowser?
Can you play streams from the mediabrowser?
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

asmodeas
NewUser
NewUser
Posts: 5
Joined: 17 Nov 2012 06:42
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by asmodeas »

Yes, I can watch streams via mediabrowser. I tested with a 1080p mkv movie. It played fine in mediabrowser. I also was able to play some flac audio.

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by fsbruva »

Another thought I had, himbrr, is try and transcode that video to another format. That will narrow down if it's the decoding or the re-encoding that is failing. So, try to make it into an avi, or something.

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by himbrr »

I think h264 is working:

Code: Select all

root@proto:/ # /usr/local/bin/ffmpeg -i /mnt/Mediashare/Videos/Filme/Abraham\ Lincoln\ Vampirjaeger/Abraham\ Lincoln\ Vampirjaeger.avi -y -copyts -c:v h264 -b:v 1000k -maxrate:v 1000k -bufsize:v 1000k -r 24000/1001 -g 15 -c:a libmp3lame -b:a 192k -ar 44100 -ac 2 -map 0:0 -map 0:1 -sn -f avi /usr/local/etc/serviio-1.0.1/tmp/transcoding-temp-43-flv_player-MEDIUM.avi
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 18 2012 23:25:10 with gcc 4.2.1 (GCC) 20070831 patched [FreeBSD]
  configuration: --prefix=/usr/local --mandir=/usr/local/man --incdir=/usr/local/include/ffmpeg1 --libdir=/usr/local/lib/ffmpeg1 --shlibdir=/usr/local/lib/ffmpeg1 --datadir=/usr/local/share/ffmpeg1 --build-suffix=1 --progs-suffix=1 --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-pthreads --enable-memalign-hack --disable-libstagefright-h264 --disable-libutvideo --cc=cc --extra-cflags='-I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib ' --extra-libs=-pthread --disable-debug --disable-sse --disable-mmx --disable-libaacplus --disable-indev=alsa --disable-outdev=alsa --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-libass --disable-libcdio --disable-libcelt --enable-libfaac --disable-libfdk-aac --disable-ffserver --enable-fontconfig --disable-libfreetype --disable-frei0r --disable-gnutls --disable-libgsm --enable-libmp3lame --disable-libbluray --disable-libv4l2 --disable-libmodplug --disable-openal --disable-libopencv --disable-libopenjpeg  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 59.100 / 54. 59.100
  libavformat    54. 29.104 / 54. 29.104
  libavdevice    54.  2.101 / 54.  2.101
  libavfilter     3. 17.100 /  3. 17.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, avi, from '/mnt/Mediashare/Videos/Filme/Abraham Lincoln Vampirjaeger/Abraham Lincoln Vampirjaeger.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 01:44:59.63, start: 0.000000, bitrate: 1856 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x304 [SAR 1:1 DAR 45:19], 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), s16, 384 kb/s
[libx264 @ 0x29cccc10] using SAR=1/1
[libx264 @ 0x29cccc10] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x29cccc10] profile High, level 3.0
Output #0, avi, to '/usr/local/etc/serviio-1.0.1/tmp/transcoding-temp-43-flv_player-MEDIUM.avi':
  Metadata:
    ISFT            : Lavf54.29.104
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 720x304 [SAR 1:1 DAR 45:19], q=-1--1, 1000 kb/s, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> libx264)
  Stream #0:1 -> #0:1 (ac3 -> libmp3lame)
Press [q] to stop, [?] for help
frame=  515 fps= 51 q=21.0 size=    2909kB time=00:00:21.99 bitrate=1083.4kbits/s
I have a i386 system... Maybe this is a problem?

Code: Select all

root@proto:/ # uname -a
FreeBSD proto.domain.local 9.1-RC2 FreeBSD 9.1-RC2 #0: Mon Oct  8 03:51:12 JST 2012     aoyama@nas4free.local:/usr/obj/nas4free/usr/src/sys/NAS4FREE-i386  i386
I built ffmpeg1 again, but not working.
Also I built openjdk6... damn...

Maybe something is missing?

Code: Select all

root@proto:/ # ffmpeg1 -version
ffmpeg version 1.0
built on Nov 18 2012 23:25:10 with gcc 4.2.1 (GCC) 20070831 patched [FreeBSD]
configuration: --prefix=/usr/local --mandir=/usr/local/man --incdir=/usr/local/include/ffmpeg1 --libdir=/usr/local/lib/ffmpeg1 --shlibdir=/usr/local/lib/ffmpeg1 --datadir=/usr/local/share/ffmpeg1 --build-suffix=1 --progs-suffix=1 --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-pthreads --enable-memalign-hack --disable-libstagefright-h264 --disable-libutvideo --cc=cc --extra-cflags='-I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib ' --extra-libs=-pthread --disable-debug --disable-sse --disable-mmx --disable-libaacplus --disable-indev=alsa --disable-outdev=alsa --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-libass --disable-libcdio --disable-libcelt --enable-libfaac --disable-libfdk-aac --disable-ffserver --enable-fontconfig --disable-libfreetype --disable-frei0r --disable-gnutls --disable-libgsm --enable-libmp3lame --disable-libbluray --disable-libv4l2 --disable-libmodplug --disable-openal --disable-libopencv --disable-libopenjpeg --disable-libpulse --enable-librtmp --disable-libschroedinger --disable-ffplay --disable-libspeex --enable-libtheora --disable-vaapi --disable-vdpau --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-nonfree --enable-version3
libavutil      51. 73.101 / 51. 73.101
libavcodec     54. 59.100 / 54. 59.100
libavformat    54. 29.104 / 54. 29.104
libavdevice    54.  2.101 / 54.  2.101
libavfilter     3. 17.100 /  3. 17.100
libswscale      2.  1.101 /  2.  1.101
libswresample   0. 15.100 /  0. 15.100
libpostproc    52.  0.100 / 52.  0.100
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

asmodeas
NewUser
NewUser
Posts: 5
Joined: 17 Nov 2012 06:42
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by asmodeas »

I'm not sure what I might have done to make this work. Here is the output from my logfile when I play something via mediabrowser.

Code: Select all

2012-11-19 11:26:01,011 DEBUG [CDSRetrieveMediaServerResource] Request for content delivery accepted
2012-11-19 11:26:01,011 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'IPAddress=/xxx.xxx.xxx.xxx, Profile=Flash player'
2012-11-19 11:26:01,012 DEBUG [ResourceDeliveryProcessor] Request for resource 1 and type 'MEDIA_ITEM' received
2012-11-19 11:26:01,012 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 1 (local)
2012-11-19 11:26:01,012 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 1)
2012-11-19 11:26:01,012 DEBUG [VideoDAOImpl] Reading a Video (id = 1)
2012-11-19 11:26:01,013 DEBUG [VideoDeliveryEngine] Delivering item '1' for client 'IPAddress=/xxx.xxx.xxx.xxx, Profile=Flash player'
2012-11-19 11:26:01,013 DEBUG [VideoDeliveryEngine] Delivering file '10,000 BC.mkv' using transcoding
2012-11-19 11:26:01,013 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'IPAddress=/xxx.xxx.xxx.xxx, Profile=Flash player'
2012-11-19 11:26:01,013 DEBUG [MediaItemDAOImpl] Getting file of media item 1
2012-11-19 11:26:01,014 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: /media/10,000 BC/10,000 BC.mkv
2012-11-19 11:26:01,014 DEBUG [ProcessExecutor] Starting /usr/local/bin/ffmpeg1 -i /media/10,000 BC/10,000 BC.mkv -y -copyts -c:v flv -b:v 1000k -maxrate:v 1000k -bufsize:v 1000k -vf scale=1158:480 -r 24000/1001 -g 15 -c:a libmp3lame -b:a 192k -ar 44100 -ac 2 -map 0:0 -map 0:1 -sn -f flv /tmp/Serviio/transcoding-temp-1-flv_player-MEDIUM.stf
2012-11-19 11:26:02,031 DEBUG [FileBasedTranscodingDeliveryStrategy] Sending transcoding stream
2012-11-19 11:26:02,171 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 10,000 BC.mkv: FLV
2012-11-19 11:26:02,171 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 10,000 BC.mkv: FLV
2012-11-19 11:26:02,171 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file 10,000 BC.mkv: FLV
2012-11-19 11:26:02,171 DEBUG [MediaItemDAOImpl] Marking MediaItem (id = 1) as read
2012-11-19 11:26:02,184 DEBUG [LocalContentCacheDecorator] Cleared cache (local_resetafterplay)
2012-11-19 11:26:02,184 DEBUG [ResourceDeliveryProcessor] Stream entity has length: 50000000000
2012-11-19 11:26:02,184 DEBUG [ResourceDeliveryProcessor] Sending file back

I am running a amd64 system:

Code: Select all

root@serviio:/root # uname -a
FreeBSD serviio.homenas.local 9.1-RC3 FreeBSD 9.1-RC3 #0: Tue Nov 13 01:10:02 JST 2012     aoyama@nas4free.local:/usr/obj/nas4free/usr/src/sys/NAS4FREE-amd64  amd64

asmodeas
NewUser
NewUser
Posts: 5
Joined: 17 Nov 2012 06:42
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by asmodeas »

I got serviio working on a friend's NAS4Free.

Here's what I did. Most, if not all of this was from fsbruva and himbrr posts. Feel free to improve on this as I am not a FreeBSD or Serviio expert.

Create a new jail called serviio by following the jail guide: http://wiki.nas4free.org/doku.php?id=do ... owto:jails

Once inside the jail grab a portage tree.

Code: Select all

portsnap fetch
portsnap extract
Once that's done build ffmpeg1 and make sure the correct options (listed below) are selected:

Code: Select all

cd /usr/ports/multimedia/ffmpeg1
make config
Build with these options:
AMR_NB
AMR_WB
FAAC
LAME
RTMP
THEORA
VORBIS
VPX
X264
XVID

Then build and install.

Code: Select all

make install clean
This takes a while. I took the default options that popped up for dependencies.

When this is done build and install openjdk6 from ports. (You might be ok to install this from packages but I built it from ports.)

Code: Select all

cd /usr/ports/java/openjdk6
make install clean
Once again, this takes a while and I accepted the default build options.

Fetch and install Serviio.

Code: Select all

cd /tmp
fetch http://kairoh.bitbucket.org/serviio-webui/dist/serviio-webui-unix-1.0.1-a.tar.gz
fetch http://download.serviio.org/releases/serviio-1.0.1-linux.tar.gz
tar xvf serviio-1.0.1-linux.tar.gz -C /usr/local/etc/
tar xvf serviio-webui-unix-1.0.1-a.tar.gz -C /usr/local/etc/serviio-1.0.1
mkdir /usr/local/etc/prefs
pw groupadd dlna 
pw useradd dlna -g dlna -s /usr/sbin/nologin -c "DLNA Daemon" -d /usr/local/etc/serviio-1.0.1/prefs/
chown -R dlna:wheel /usr/local/etc/serviio-1.0.1
Now edit your /etc/hosts file and add an entry with your jail's IP address and hostname.

Code: Select all

192.168.1.100	    serviio.homenas.local
Create a /usr/local/sbin/serviiod file, and fill it with:

Code: Select all

#!/bin/sh
### ====================================================================== ###
##                                                                          ##
##  Serviio start Script                                                    ##
##                                                                          ##
### ====================================================================== ###

SERVIIO_HOME=/usr/local/etc/serviio-1.0.1
SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/plugins/*:$SERVIIO_HOME/config"


# Find the best max heap size for JAVA ( From kairoh's serviio-webui 
# scripts - https://kairo.bitbucket.org/serviio-webui, who references 
# Platter's (http://pcloadletter.co.uk/2012/01.15/serviio-syno-paackages
JAVA_MAX_HEAP=512M
RAM=$(dmesg | grep 'real memory'| uniq | awk '{print $4/1048576}')
if [ $RAM -le 128 ]; then
    JAVA_MAX_HEAP=80M
elif [ $RAM -le 256 ]; then
    JAVA_MAX_HEAP=192M
fi

# Setup Serviio specific properties - might not need to specify ffmpeg
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=/usr/local/bin/ffmpeg1"
JVM_OPTS="-Xmx${JAVA_MAX_HEAP} -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20"

# A kludge to get the -D... flags to Java, rather than to Serviio itself:
for o in "$@"
do
   case $o in
   -D*)
      JAVA_OPTS="$JAVA_OPTS $o"
      ;;
   esac
done

# Execute the JVM in the foreground
exec java $JVM_OPTS $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.restui.ServiioWrapper "$@"
Create a /usr/local/etc/rc.d/serviio file, and fill it with:

Code: Select all

#!/bin/sh

# $FreeBSD: ports/net/serviio/files/serviio.in,v 1.2 2012/01/14 08:56:27 dougb Exp $
#
# PROVIDE: serviio
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf[.local] to enable serviio:
#
# serviio_enable="YES"

. /etc/rc.subr

name=serviio
rcvar=serviio_enable
command=/usr/local/sbin/serviiod

load_rc_config $name

serviio_user=${serviio_user-"dlna"}

command_args=" &"

stop_cmd="$command -stop"

run_rc_command $1
Make both files executable.

Code: Select all

chmod +x /usr/local/sbin/serviiod
chmod +x /usr/local/etc/rc.d/serviio
Enable serviio in your /etc/rc.conf file.

Code: Select all

serviio_enable="YES"
At this point you should be able to start serviio.

Code: Select all

/usr/local/etc/rc.d/serviio start
Serviio should now be up and running. Browse to the console http://<your serviio jail ip>:8123/serviio/console to get started. Refer to the Serviio documentation on how to configure.

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by fsbruva »

The problem was not with the Serviio install, but with himbrr's copy of ffmpeg not properly transcoding his mkv file to flv.

I wonder if a new, clean jail is needed? I don't know why that might matter... but you never know.

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by raulfg3 »

Please asmodeas, can you copy&paste your last post to a new Trhead named [HOWTO] Install serviio on NAS4Free ? , thanks.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by himbrr »

I did this like asmodeas described on the first install with ffmpeg1.
But this isn't working for me. FLV transcoding is not working :S
Will try this again.

EDIT: Installed with your instructions. Streams don't work :/
Same error
Last edited by himbrr on 20 Nov 2012 22:12, edited 1 time in total.
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

asmodeas
NewUser
NewUser
Posts: 5
Joined: 17 Nov 2012 06:42
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by asmodeas »

I created a new topic from my post above. viewtopic.php?f=79&t=1796

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by raulfg3 »

thanks
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

himbrr
Advanced User
Advanced User
Posts: 153
Joined: 21 Oct 2012 21:16
Location: Germany
Status: Offline

Re: Serviio Mediaserver on N4F?

Post by himbrr »

This won't work for me...
I still can't transcode to flv...
Nas4Free 9.2.0.1.972, ASUS P8H77-I, 8GB RAM, Intel Celeron CPU G530 @ 2.40GHz, 5x 2TB WD Red, 1x 60GB OCZ Vertex 2

Post Reply

Return to “Jails”