dlna

package
v1.70.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 39 Imported by: 6

Documentation

Overview

Package dlna provides DLNA server.

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "dlna remote:path",
	Short: `Serve remote:path over DLNA`,
	Long: `Run a DLNA media server for media stored in an rclone remote. Many
devices, such as the Xbox and PlayStation, can automatically discover
this server in the LAN and play audio/video from it. VLC is also
supported. Service discovery uses UDP multicast packets (SSDP) and
will thus only work on LANs.

Rclone will list all files present in the remote, without filtering
based on media formats or file extensions. Additionally, there is no
media transcoding support. This means that some players might show
files that they are not able to play back correctly.

Rclone will add external subtitle files (.srt) to videos if they have the same
filename as the video file itself (except the extension), either in the same
directory as the video, or in a "Subs" subdirectory.

### Server options

Use ` + "`--addr`" + ` to specify which IP address and port the server should
listen on, e.g. ` + "`--addr 1.2.3.4:8000` or `--addr :8080`" + ` to listen to all
IPs.

Use ` + "`--name`" + ` to choose the friendly server name, which is by
default "rclone (hostname)".

Use ` + "`--log-trace` in conjunction with `-vv`" + ` to enable additional debug
logging of all UPNP traffic.

` + vfs.Help(),
	Annotations: map[string]string{
		"versionIntroduced": "v1.46",
		"groups":            "Filter",
	},
	Run: func(command *cobra.Command, args []string) {
		cmd.CheckArgs(1, 1, command, args)
		f := cmd.NewFsSrc(args)

		cmd.Run(false, false, command, func() error {
			s, err := newServer(context.Background(), f, &Opt, &vfscommon.Opt)
			if err != nil {
				return err
			}
			defer systemd.Notify()()
			return s.Serve()
		})
	},
}

Command definition for cobra.

View Source
var OptionsInfo = fs.Options{{
	Name:    "addr",
	Default: ":7879",
	Help:    "The ip:port or :port to bind the DLNA http server to",
}, {
	Name:    "name",
	Default: "",
	Help:    "Name of DLNA server",
}, {
	Name:    "log_trace",
	Default: false,
	Help:    "Enable trace logging of SOAP traffic",
}, {
	Name:    "interface",
	Default: []string{},
	Help:    "The interface to use for SSDP (repeat as necessary)",
}, {
	Name:    "announce_interval",
	Default: fs.Duration(12 * time.Minute),
	Help:    "The interval between SSDP announcements",
}}

OptionsInfo descripts the Options in use

Functions

This section is empty.

Types

type Options added in v1.70.0

type Options struct {
	ListenAddr       string      `config:"addr"`
	FriendlyName     string      `config:"name"`
	LogTrace         bool        `config:"log_trace"`
	InterfaceNames   []string    `config:"interface"`
	AnnounceInterval fs.Duration `config:"announce_interval"`
}

Options is the type for DLNA serving options.

var Opt Options

Opt contains the options for DLNA serving.

type UPnPService

type UPnPService interface {
	Handle(action string, argsXML []byte, r *http.Request) (respArgs map[string]string, err error)
	Subscribe(callback []*url.URL, timeoutSeconds int) (sid string, actualTimeout int, err error)
	Unsubscribe(sid string) error
}

UPnPService is the interface for the SOAP service.

Directories

Path Synopsis
Package data provides utilities for DLNA server.
Package data provides utilities for DLNA server.
Package upnpav provides utilities for DLNA server.
Package upnpav provides utilities for DLNA server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL