Code Monkey home page Code Monkey logo

dlna-dms's Introduction

dms

dms is a UPnP DLNA Digital Media Server. It runs from the terminal, and serves content directly from the filesystem from the working directory, or the path given. The SSDP component will broadcast and respond to requests on all available network interfaces.

dms advertises and serves the raw files, in addition to alternate transcoded streams when it's able, such as mpeg2 PAL-DVD and WebM for the Chromecast. It will also provide thumbnails where possible.

dms also supports serving dynamic streams (e.g. a live rtsp stream) generated on the fly with the help of an external application (e.g. ffmpeg).

dms uses ffprobe/avprobe to get media data such as bitrate and duration, ffmpeg/avconv for video transoding, and ffmpegthumbnailer for generating thumbnails when browsing. These commands must be in the PATH given to dms or the features requiring them will be disabled.

image

Installing

Assuming $GOPATH and Go have been configured already:

$ go get github.com/anacrolix/dms

Ensure ffmpeg/avconv and/or ffmpegthumbnailer are in the PATH if the features depending on them are desired.

To run:

$ "$GOPATH"/bin/dms

Running DMS using Docker

dms is distributed as Docker Image. Serve Media in /mediadirectory using `dms`:

Running DMS as a systemd service

A sample systemd .service file has been provided to assist in running DMS as a system service.

Running DMS as a FreeBSD service

Install the provided service file to /etc/rc.d or /usr/local/etc/rc.d add dms_enable="YES", and optionally dms_root="/path/to/my/media" and dms_user="myuser" to your /etc/rc.conf

Known Compatible Players and Renderers

  • Probably all Panasonic Viera TVs.
  • Android's BubbleUPnP and AirWire
  • Chromecast
  • VLC
  • LG Smart TVs, with varying success.
  • Roku devices
  • Apple TV 4K via VLC and 8player
  • iOS VLC and 8player

Usage of dms:

Usage
parameter description
-allowDynamicStreams turns on support for .dms.json files in the path
-allowedIps string allowed ip of clients, separated by comma
-config string json configuration file
-deviceIcon string device icon
-fFprobeCachePath string path to FFprobe cache file (default "/home/efreak/.dms-ffprobe-cache")
-forceTranscodeTo string force transcoding to certain format, supported: 'chromecast', 'vp8'
-friendlyName string server friendly name
-http string http server port (default ":1338")
-ifname string specific SSDP network interface
-ignoreHidden ignore hidden files and directories
-ignoreUnreadable ignore unreadable files and directories
-logHeaders log HTTP headers
-noProbe disable media probing with ffprobe
-noTranscode disable transcoding
-notifyInterval duration interval between SSPD announces (default 30s)
-path string browse root path
-stallEventSubscribe workaround for some bad event subscribers
-transcodeLogPattern pattern where to write transcode logs to. The [tsname] placeholder is replaced with the name of the item currently being played. The default is $HOME/.dms/log/[tsname]. You may turn off transcode logging entirely by setting it to /dev/null. You may log to stderr by setting /dev/stderr.

Dynamic streams

DMS supports "dynamic streams" generated on the fly. This feature can be activated with the -allowDynamicStreams command line flag and can be configured by placing special metadata files in your content directory. The name of these metadata files ends with .dms.json, their structure is documented here.

An example:

{
  "Title": "My awesome webcam",
  "Resources": [
     {
        "MimeType": "video/webm",
        "Command": "ffmpeg -i rtsp://10.6.8.161:554/Streaming/Channels/502/ -c:v copy -c:a copy -movflags +faststart+frag_keyframe+empty_moov -f matroska -"
     }
  ]
}

dlna-dms's People

Contributors

abdullah2993 avatar adirelle avatar anacrolix avatar demitroi avatar dependabot[bot] avatar e-dard avatar ebfe avatar edanbe avatar efreak avatar h31 avatar halfwit avatar irsl avatar kulak avatar mathieu-aubin avatar mattn avatar nicolov avatar olivierlemasle avatar pataquets avatar phillipberndt avatar qzhsjz avatar ronindev avatar rsteube avatar scottchiefbaker avatar tipabu avatar triole avatar tsynik avatar varbhat avatar yanceychiew avatar zjx20 avatar

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.