GithubHelp home page GithubHelp logo

n0y / mediatheken-dlna-bridge Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 592 KB

consumes contents of various (german) Mediatheken, and serves it's content to your local network using DLNA

Home Page: https://github.com/n0y/mediatheken-dlna-bridge

License: MIT License

Java 99.59% Dockerfile 0.41%
mediathek mediathekview dlna dnla-upnp dlna-server

mediatheken-dlna-bridge's Introduction

Mediatheken DLNA Bridge

Mediatheken DLNA Bridge is a java standalone program, which consumes contents of various (german) Mediatheken, and serves its content to your local network using DLNA.

Find us at our HOME.

See LICENSE for the Mediatheken DLNA Bridge license.

For a list of all authors, see the AUTHORS file.

Usage

There are two options running the Mediatheken DLNA Bridge: Local installation, or docker.

Local installation

  • Download latest tar.gz from the RELEASES page.
  • unpack it
  • run the provided JAR file with java -jar mediatheken-dlna-bridge.jar.
  • you may give a java parameter -Xmx256m or so for a memory limit. The memory will be used for a lucene query cache. Giving it more than 512MB doesn't improve things.

You may override any setting in three ways:

  • Create a file config/application.properties, and put the settings there, or
  • Add the settings to your java command line with -DSETTING=VALUE, or
  • Create environment variables SETTING=VALUE

A local index directory will be created in a directory local to your working directory. It's a Lucene index. Feel free to dig into it.

Docker installation

Find the released Docker images at DOCKERHUB. Simply run them with:

docker run corelogicsde/mediatheken-dlna-bridge:latest

You may set a memory limit with adding --memory=500M to the docker line. The memory will be used for a lucene query cache. 128MB seem to work fine, and giving it more than 500 MB doesn't improve things.

You may override any setting in two ways:

  • set environment variables with -e SETTING=VALUE. These will be picked up by the image.
  • create a configuration file, and link it into /app/config/application.properties.

The image will then run with host networking, which should usually be fine.

Docker Compose

Use something like this docker-compose.yaml:

version: "3.3"

services:
  mediathekbridge:
    image: "corelogicsde/mediatheken-dlna-bridge"
    restart: unless-stopped
    deploy:
      resources:
        limits:
          memory: 256M
    # This volume can be used to store the lucene index outside of the container
    #volumes:
    #  - source: ./data/mediathek-data
    #    target: /app/data
    #    type: bind
    #  - source: ./data/mediathek-cache
    #    target: /app/cache
    #    type: bind
    # You may overwrite any property here, i.e. the Database Location
    environment:
       DISPLAY_NAME: "My Mediathek DLNA Bridge"
    #  ENABLE_VIEWTRACKING: "true"
    #  DATABASE_LOCATION: /app/data/clipdb
    #  ENABLE_PREFETCHING: 'true'
    #  CACHE_SIZE_GB: '30'

Configuration

Common configuration

  • DATABASE_LOCATION points to the directory and name of the lucene index directory. Defaults to ./data/clipdb
  • UPDATEINTERVAL_FULL_HOURS number of hours between full db updates. Defaults to 24.
  • DISPLAY_NAME under this name, the Mediatheken-DLNA-Bridge will be visible in your network. Defaults to Mediatheken.
  • PUBLIC_HTTP_PORT all DLNA and media data (if prefetching is enabled) will be answered using this port number. Defaults to 9301.
  • ENABLE_VIEWTRACKING: a boolean value (true) indicates that all views should be tracked, and it will give you another menu entry (Meistgesehen). Defaults to false

Configuration for prefetching

  • ENABLE_PREFETCHING (boolean) decides if prefetching is turned on. Defaults to false.
  • PUBLIC_BASE_URL optionally specifies the public address of the prefetching HTTP server. Could be http://<your-hostname>:9301/ or any other location, if you put this behind a reverse proxy. By default, files are served on the address where the query was received.
  • CACHE_DIRECTORY is path to a directory where prefetched files are placed. May be absolute or relative to the run directory. It defaults to ./cache.
  • CACHE_SIZE_GB the amount of disk space (in Gigabyte) dedicated to prefetched files. Defaults to 10. Values below 10GB are rejected.
  • CACHE_DOWNLODERS_PER_VIDEO number of parallel connections, per video, that are used to fetch the file. Defaults to 2.
  • CACHE_MAX_PARALLEL_DOWNLOADS number of videos that can be prefetched in parallel. Defaults to 4. Note that each downloads requires at least 1.3MBytes/s of bandwidth!

Configure prefetching

Sometimes the Mediatheken's CDN is slow. Most of the time, that only means that some servers, or clusters are slow, over some time.

Using prefetching, the Mediatheken-Dlna-Bridge will try to fetch in advance your videos, discard servers that are too slow to handle the required bandwidth.

To use prefetching, you need to:

  • create, and maybe mount a temporary directory for prefetched files
  • configure the base URL, where this server will be reachable, using the PUBLIC_HTTP_PORT configuration. For standalone operation, this will be http://<hostname>:8080/. For docker, the port may differ. You are free to place the Mediathek-Dlna-Bridge behind a reverse proxy. In that case, you may also add a URL prefix here.
  • maybe override the cache directory, using the CACHE_DIRECTORY configuration
  • decide on how much space you'll assign to prefetched videos. Use the CACHE_SIZE_GB configuration. Mediathek-Dlna-Bridge will never use more disk space than that.
  • set the 'ENABLE_PREFETCHING' configuration to true

Configure Favourites

Favourite entries appear at the root level of the DLNA directory tree, just befor all other entries.

You can configure what to display there. Currently, this is done by configuration settings (file, env, ... as you like).

Create entries starting with FAVOURITE_. All entries will be sorted alphabetically, and rendered in that order.

In the value, you configure what to display. Currently, only show entries are supported. Value is in the form:

FAVOURITE_1=show:<channel>:<show title>, i.e. FAVOURITE_ONE=show:ard:Tagesschau

All texts will be compared ignoring the case.

mediatheken-dlna-bridge's People

Contributors

n0y avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mediatheken-dlna-bridge's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • amazoncorretto 21.0.4-alpine
  • arpaulnet/s6-overlay-stage 2.2
github-actions
.github/workflows/part-compile-and-test.yaml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • stCarolas/setup-maven v5
  • actions/upload-artifact v4
.github/workflows/part-release.yaml
  • actions/checkout v4
  • actions/download-artifact v4
  • TriPSs/conventional-changelog-action v5
  • actions/create-release v1
  • actions/upload-release-asset v1
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/build-push-action v5
maven
pom.xml
  • com.fasterxml.jackson:jackson-bom 2.17.2
  • org.eclipse.jetty:jetty-bom 12.0.12
  • org.eclipse.jetty.ee8:jetty-ee8-bom 12.0.12
  • org.apache.logging.log4j:log4j-bom 2.23.1
  • org.jetbrains.kotlin:kotlin-bom 1.9.25
  • net.bytebuddy:byte-buddy 1.14.18
  • net.bytebuddy:byte-buddy-agent 1.14.18
  • org.slf4j:slf4j-api 2.0.16
  • org.jetbrains:annotations 24.1.0
  • org.projectlombok:lombok 1.18.34
  • org.jupnp:org.jupnp 3.0.2
  • org.jupnp:org.jupnp.support 3.0.2
  • com.github.ben-manes.caffeine:caffeine 3.1.8
  • io.whitfin:siphash 2.0.0
  • org.tukaani:xz 1.10
  • com.squareup.okhttp3:okhttp 4.12.0
  • org.apache.lucene:lucene-core 9.11.1
  • org.apache.lucene:lucene-facet 9.11.1
  • org.eclipse.jetty.toolchain:jetty-servlet-api 4.0.6
  • jakarta.servlet:jakarta.servlet-api 6.1.0
  • javax.servlet:javax.servlet-api 4.0.1
  • commons-io:commons-io 2.16.1
  • org.junit.jupiter:junit-jupiter-api 5.10.3
  • org.junit.jupiter:junit-jupiter-params 5.10.3
  • org.junit.jupiter:junit-jupiter-engine 5.10.3
  • org.assertj:assertj-core 3.26.3
  • org.mockito:mockito-core 5.12.0
  • org.mockito:mockito-junit-jupiter 5.12.0
  • org.codehaus.mojo:license-maven-plugin 2.4.0
  • org.apache.maven.plugins:maven-dependency-plugin 3.7.1
  • org.apache.maven.plugins:maven-jar-plugin 3.4.2
  • org.apache.maven.plugins:maven-surefire-plugin 3.3.1
  • org.codehaus.mojo:versions-maven-plugin 2.17.1
  • org.apache.maven.plugins:maven-enforcer-plugin 3.5.0
  • org.apache.maven.plugins:maven-compiler-plugin 3.13.0

  • Check this box to trigger a request for Renovate to run again on this repository

Favourits entries must be configurable

As of now, there's three static entries, just to test for them to work.

These should be configurable for each installation.
Easiest seems to be to pass on environment variables describing what to do, i.e.

  • FAVORITE_1=ard:tagesschau
  • FAVORITE_2=zdf:die anstalt

or something like that

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.