Merge branch 'develop' into biconou_develop_PR_metrics
This commit is contained in:
+48
-21
@@ -20,25 +20,32 @@ free.
|
||||
|
||||
## Libresonic configuration
|
||||
|
||||
A few settings can be tweaked in Libresonic's startup script or Tomcat
|
||||
configuration.
|
||||
A few settings should be tweaked via Spring Boot or Tomcat
|
||||
configuration:
|
||||
|
||||
The reverse proxy will handle HTTPS connections, so there is no need for
|
||||
Libresonic to handle them, which is why we set `httpsPort` to 0:
|
||||
- Set the context path to `/libresonic`
|
||||
- Set the correct address to listen to
|
||||
- Set the correct port to listen to
|
||||
|
||||
libresonic.httpsPort=0
|
||||
#### Spring Boot
|
||||
|
||||
Furthermore, the internal Libresonic server should only be accessible from the
|
||||
inside of the reverse proxy : we tell Libresonic to listen on the local IP
|
||||
only:
|
||||
Add the following java args:
|
||||
|
||||
libresonic.host=127.0.0.1
|
||||
libresonic.port=4040
|
||||
```java -Dserver.port=4040 -Dserver.address=127.0.0.1 -Dserver.contextPath=/libresonic -jar libresonic.war```
|
||||
|
||||
Finally, if Libresonic should be accessible from a subdirectory, the context
|
||||
path must be set correctly:
|
||||
#### Tomcat
|
||||
Modify your `<Connector>` with the proper address and port:
|
||||
|
||||
libresonic.contextPath=/libresonic
|
||||
```
|
||||
<Connector
|
||||
port="4040"
|
||||
address="127.0.0.1"
|
||||
...
|
||||
```
|
||||
See [HTTP Connector](https://tomcat.apache.org/tomcat-7.0-doc/config/http.html) for further detail.
|
||||
|
||||
For the context path, tomcat will automatically deploy to a context path matching your war name. So if you're using
|
||||
libresonic.war, you do not need to change anything.
|
||||
|
||||
## Reverse proxy configuration
|
||||
|
||||
@@ -91,19 +98,39 @@ The following configuration works for Apache (without HTTPS):
|
||||
|
||||
### HAProxy
|
||||
|
||||
The following configuration works for HAProxy (HTTPS only):
|
||||
The following configuration works for HAProxy 1.7 (HTTPS with HTTP
|
||||
redirection):
|
||||
|
||||
```haproxy
|
||||
frontend https
|
||||
bind $server_public_ip$:443 ssl crt /etc/haproxy/ssl/$server_ssl_keys$.pem
|
||||
|
||||
# Let Libresonic handle all requests under /libresonic
|
||||
acl url_libresonic path_beg -i /libresonic
|
||||
use_backend libresonic-backend if url_libresonic
|
||||
# Make sure that we are in HTTP mode so that we can rewrite headers
|
||||
mode http
|
||||
|
||||
# Change default backend to libresonic backend if you don't have a web backend
|
||||
default_backend web-backend
|
||||
# Listen on the HTTPS and HTTP ports
|
||||
bind :80
|
||||
bind :443 ssl crt /etc/haproxy/cert_key.pem
|
||||
|
||||
# Some useful headers
|
||||
option httpclose
|
||||
option forwardfor
|
||||
|
||||
# HTTP: Redirect insecure requests to HTTPS
|
||||
http-request redirect scheme https if !{ ssl_fc }
|
||||
|
||||
# HTTPS: Forward requests to the Libresonic backend
|
||||
acl is_libresonic path_beg -i /libresonic
|
||||
use_backend libresonic-backend if is_libresonic
|
||||
|
||||
backend libresonic-backend
|
||||
server libresonic 127.0.0.1:4040 check
|
||||
|
||||
# Make sure that we are in HTTP mode so that we can rewrite headers
|
||||
mode http
|
||||
|
||||
# Rewrite all redirects to use HTTPS, similar to what Nginx does in the
|
||||
# proxy_redirect directive.
|
||||
http-response replace-value Location ^http://(.*)$ https://\1
|
||||
|
||||
# Forward requests to Libresonic running on localhost on port 4040
|
||||
server libresonic 127.0.0.1:4040 check
|
||||
```
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
Upgrade ffmpeg
|
||||
http://ffmpegmac.net/
|
||||
http://www.activeobjects.no/libresonic/forum/viewtopic.php?t=5466&highlight=
|
||||
FFmpeg now accesses x264 presets via libx264. This extends functionality by introducing several new libx264 options including -preset, -tune, and -profile. You can read more detailed information about these options with "x264 --fullhelp".
|
||||
The syntax has changed so be sure to update your commands. Example:
|
||||
ffmpeg -i input -vcodec libx264 -preset fast -tune film -profile main -crf 22 -threads 0 output
|
||||
Use baseline profile
|
||||
ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -vcodec libx264 -preset fast -threads 0 -
|
||||
|
||||
http://mewiki.project357.com/wiki/X264_Settings
|
||||
One-step audio encoding without lame
|
||||
More compact transcoding format.
|
||||
Create new transcoding packs.
|
||||
Downsampling using only ffmpeg?
|
||||
Test h264 with Android.
|
||||
Create universal binary for mac.
|
||||
Update all installers.
|
||||
|
||||
HOW TO BUILD FFMPEG (Ubuntu 11.04)
|
||||
----------------------------------
|
||||
http://ubuntuforums.org/showthread.php?t=786095
|
||||
|
||||
sudo apt-get remove ffmpeg x264 libx264-dev
|
||||
sudo apt-get update
|
||||
sudo apt-get install build-essential checkinstall git libfaac-dev libjack-jackd2-dev \
|
||||
libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \
|
||||
libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev texi2html \
|
||||
yasm zlib1g-dev
|
||||
|
||||
cd
|
||||
cd projects
|
||||
git clone git://git.videolan.org/x264
|
||||
cd x264
|
||||
./configure --enable-static
|
||||
make
|
||||
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes --fstrans=no --default
|
||||
|
||||
cd
|
||||
cd projects
|
||||
sudo apt-get remove libvpx-dev
|
||||
git clone git://review.webmproject.org/libvpx
|
||||
cd libvpx
|
||||
./configure
|
||||
make
|
||||
sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default
|
||||
|
||||
cd
|
||||
cd projects
|
||||
git clone git://git.videolan.org/ffmpeg
|
||||
cd ffmpeg
|
||||
./configure --disable-ffplay --disable-ffprobe --disable-ffserver --enable-gpl --enable-nonfree --enable-postproc \
|
||||
--enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libtheora --enable-libvorbis \
|
||||
--enable-libx264 --enable-libxvid --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb \
|
||||
--enable-libvpx --enable-version3 --enable-bzlib \
|
||||
--enable-static --disable-shared --extra-libs=-static --extra-cflags=--static
|
||||
make
|
||||
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default
|
||||
hash x264 ffmpeg
|
||||
|
||||
|
||||
HOW TO BUILD LAME (Ubuntu 11.04)
|
||||
----------------------------------
|
||||
cd
|
||||
cd projects
|
||||
sudo apt-get install nasm
|
||||
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
|
||||
tar xzvf lame-3.98.4.tar.gz
|
||||
cd lame-3.98.4
|
||||
./configure --enable-nasm --disable-shared
|
||||
make
|
||||
|
||||
|
||||
Reference in New Issue
Block a user