-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide nginx example for advanced transcoding
- Loading branch information
1 parent
5b7cb3f
commit 0c78ef3
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# iptables -t nat -A PREROUTING \ | ||
# -i <incoming network interface> \ | ||
# -p tcp --dport GERBERA_PORT \ | ||
# --src <client's IP> \ | ||
# --dst GERBERA_IP> \ | ||
# -j REDIRECT --to-port NGINX_PORT | ||
|
||
server { | ||
listen GERBERA_IP:NGINX_PORT; | ||
|
||
location / { | ||
proxy_pass http://GERBERA_IP:GERBERA_PORT/; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header User-Agent "imperial DABMAN i250 (proxied by nginx)"; # Used for client filtering in Gerbera | ||
|
||
proxy_http_version 1.1; # This is important :) | ||
} | ||
} | ||
|
||
# <clients enabled="yes"> | ||
# <client userAgent="imperial DABMAN i250" flags="TRANSCODING1" /> | ||
# <!-- Identify the requests by User-Agent string and flag them accordingly --> | ||
# </clients> | ||
# <transcoding enabled="yes"> | ||
# <mimetype-profile-mappings> | ||
# <transcode mimetype="audio/ogg" client-flags="TRANSCODING1" using="profile"/> | ||
# </mimetype-profile-mappings> | ||
# <profiles> | ||
# <profile name="profile" enabled="yes" type="external"> | ||
# <mimetype>audio/mpeg</mimetype> | ||
# <dlna-profile>MP3</dlna-profile> | ||
# <accept-url>no</accept-url> | ||
# <first-resource>yes</first-resource> | ||
# <accept-ogg-theora>no</accept-ogg-theora> | ||
# <agent command="<path to shell script that does the actual transcoding>" arguments="%in %out" /> | ||
# <buffer size="1048576" chunk-size="131072" fill-size="262144"/> | ||
# </profile> | ||
# </profiles> | ||
# </transcoding> |