Note
An HTML version of this file is availaible on MuMuDVB’s website.
http://mumudvb.braice.net/mumudvb/logo_mumu_wiki.png

1. Presentation

1.1. Description

MuMuDVB (Multi Multicast DVB) is originally a modification of dvbstream that cr@ns made. We have decided to redistribute it.

Now, it’s a standalone project.

MuMuDVB is a program that redistributes streams from DVB (Digital Television) on a network using multicasting or HTTP unicast. It can multicast a whole DVB transponder by assigning each channel a different multicast IP.

1.2. Website

Mumudvb main site

2. Authors and contacts

Upstream author
Contributions
Mailing list:
Note
When contacting about an issue, please join the config file used and the output of MuMuDVB in verbose mode ( -vvv on the command line) and any other information that could be useful.

3. Contents and features

3.1. Features overview

3.2. Detailled feature list

Others small programs are availaible from MuMuDVB Tools Repository :

4. Installation

4.1. From sources

4.1.1. From a snapshot

If you downloaded a snapshot, you will have to generate the auto(conf make etc …) files. In order to do this you will need the autotools and automake and, type in the folder of MuMuDVB

autoreconf -i -f

Then you have a source which can be installed as a release package.

4.1.2. From a release package

In order to install MuMuDVB type:

$ ./configure [configure options]
$ make
# make install

The [configure options] specific to MuMuDVB are:

  --enable-cam-support    CAM support (default enabled)
  --enable-coverage       build for test coverage (default disabled)
  --enable-duma           Debbuging DUMA library (default disabled)

You can have a list of all the configure options by typing

$ ./configure --help
Note
The CAM support depends on libdvben50221, libucsi (from linuxtv’s dvb-apps) and libpthread. The configure script will detect automatically the presence of these libraries and desactivate the CAM support if one of them is not present.
Note
The decoding of long channel names for autoconfiguration in ATSC depends on libucsi (from linuxtv’s dvb-apps). The configure script will detect automatically the presence of this library and desactivate the long channel name support if it is not present. The full autoconfiguration will still work with ATSC but the channel names will be the short channels names (7 characters maximum)
Note
If you want to compile the doc i.e. generate HTML files using asciidoc, type make doc. The rendering for the tables will work with asciidoc 8.4.4 (can work with lower version but not tested).

In order to install starting scripts (debian flavor) type:

# cp scripts/debian/etc/default/mumudvb /etc/default/mumudvb
# cp scripts/debian/etc/init.d/mumudvb /etc/init.d/mumudvb
Note
It is advised to create a system user for MuMuDVB, e.g. : _mumudvb, you have to add this user to the video group and make the directory /var/run/mumudvb RW by this user. By doing this, you’ll be able to get all the features of MuMuDVB.

4.2. From Debian package

If you want to install a version which is not in your repositories, you can install it by hand by typing:

# dpkg -i mumudvb*.deb

Otherwise you can use aptitude/synaptic as usual

5. Usage

The documentation for configuration file syntax is in doc/README_CONF.txt (HTML version).

Usage:

mumudvb [options] -c config_file
mumudvb [options] --config config_file

Possible options are:

-d, --debug
        Don't deamonize and print messages on the standard output.

-s, --signal
        Print signal strenght every 5 seconds

-t, --traffic
        Print the traffic of the channels every 10 seconds

-h, --help
        Show help

-v
        More verbose (add for more)

-q
        More quiet (add for less)

Signal: (see kill(1))

    SIGUSR1: switch the signal strenght printing
    SIGUSR2: switch the traffic printing

6. Autoconfiguration

MuMuDVB is able to find the channels in the transponder and their PIDs (Program IDentifiers).

Without autoconfiguration, you have to set the transponder parameters, and for each channel, the multicast ip, the name and the PIDs (PMT, audio, video, teletext etc…)

At the end of autoconfiguration, MuMuDVB generates a config file with the discovered parameters. This file is: /var/run/mumudvb/mumudvb_generated_conf_card%d

If the PIDs are changed, MuMuDVB will automatically update the channels except if you put autoconf_pid_update=0 in your configuration file.

MuMuDVB is able to do two kinds of autoconfiguration:

6.1. Full autoconfiguration

This is the easiest way to use MuMuDVB.

Use this when you want to stream a full transponder.

In this mode, MuMuDVB will find for you the different channels, their name and their PIDs (PMT, PCR, Audio, Video, Subtitle, Teletext and AC3).

In order to use this mode you have to: - Set the tuning parameters to your config file - Add autoconfiguration=2 to your config file - You don’t have to set any channels - For a first use don’t forget to put the -d parameter when you launch MuMuDVB: e.g. mumudvb -d -c your_config_file

Example config file for satellite at frequency 11.296GHz with horizontal polarization
freq=11296
pol=h
srate=27500
autoconfiguration=2

The channels will be streamed over the multicasts ip adresses 239.100.c.n where c is the card number (0 by default) and n is the channel number.

If you don’t use the common_port directive, MuMuDVB will use the port 1234.

Note
By default, SAP announces are activated if you use this autoconfiguration mode. To desactivate them put sap=0 after the autoconfiguration=2 line.
Note
A detailled, documented example configuration file can be found in doc/configuration_examples/autoconf_full.conf

6.2. Simple autoconfiguration

Use this when you want to control the name of the channels, and wich channel you want to stream.

MuMuDVB will find the audio, video, PCR, teletext, subtitling and AC3 PIDs for you before streaming.

Note
If you put more than one PID for a channel, MuMuDVB will desactivate autoconfiguration for this channel.
Note
A detailled, documented example configuration file can be found in doc/configuration_examples/autoconf1.conf
Note
Simple autoconfiguration can fail finding the good pids if a PMT pid is shared within multiples channels. In this case you have to add the ts_id option to the channel to specify the transport stream id, also known as service id.

7. SAP announces

SAP (Session Announcement Protocol) announces are made for the client to know which channels are streamed and what is their name and adress. It avoids to give to the client the list of the multicast ip adresses.

VLC and most of set-top boxes are known to support them.

MuMuDVB will automatically generate and send SAP announces if asked to in the config file or if you are in full autoconfiguration mode.

The SAP announces will be only sent for alive channels. When a channel goes down, MuMuDVB will stop sending announces for this channel, until it goes back.

7.1. Asking MuMuDVB to generate SAP announces

For sending SAP announces you have to add sap=1 to your config file. The other parameters concerning the sap announces are documented in the doc/README_CONF.txt file (HTML version).

7.2. Configuring the client to get the SAP announces

7.2.1. VLC > 0.8.2

You have to enter the settings, choose advanced settings. The SAP announces are in playlist→service discovery.

Don’t forget to save the settings.

You should have now a SAP section in your playlist.

7.2.2. VLC < 0.8.2

Click on the "Settings" menu, then on "add interface" and choose SAP playlist. Then open you playlist, the SAP announces should appear automatically.

8. HTTP Unicast

In addition to multicast, MuMuDVB also supports HTTP unicast. This make you able to use MuMuDVB on networks wich doesn’t support multicast.

There is one listening connection, the channel is selected via the HTTP path, see further.

And you can have listening sockets per channel, in this case the client will always get the same channel independantly of the path.

Note
Be careful with unicast, it can eat a lot of bandwith. Think about limitting the number of clients.
Note
If you don’t want the (always here) multicast traffic to go on your network set multicast_ttl=0

8.1. Activate HTTP unicast

To enable HTTP unicast you have to set the option ip_http. This option will set the ip adress on which you want to listen for incoming connections. If you want to listen on all your interfaces, put 0.0.0.0.

You can also define the listening port using port_http. If the port is not defined, the default port will be 4242.

8.2. Activate "per channel" listening socket

You can create listening connections only for a channel. In this case, when a client connect to this socket he will alway get the same channel independantly of the HTTP path.

8.2.1. If you use full autoconfiguration

You need to set the option autoconf_unicast_start_port which define what is the output port for the first discovered channel (for the following channels the port will be incremented).

8.2.2. If you don’t use full autoconfiguration

For the channels for which you want to have a listening unicast socket you have to set the option unicast_port which define the listening port of the socket

8.3. Client side, the different methods to get channels

8.3.1. Single channel socket

If the client connect to a single client socket he will get the associated channel independantly of the path.

If you server is listening on the ip 10.0.0.1 and the port for the channel is 5000,

vlc http://10.0.0.1:5000/

8.3.2. Get the channel by number

You can ask the channel by the channel number (starting at 1).

If you server is listening on the ip 10.0.0.1 and the port 4242,

vlc http://10.0.0.1:4242/bynumber/3

will give you the channel number 3. This works also with xine and mplayer.

8.3.3. Get the channel by name

Note
This is not implemented for the moment, it will be implemented in a future release

8.3.4. Get the channels list

If you server is listening on the ip 10.0.1 and the port 4242,

To get the channel list (in basic html) just enter the adress http://10.0.0.1:4242/channels_list.html in your web browser.

To get the channel list (in basic plain text with more informations) just enter the adress http://10.0.0.1:4242/channels_list.txt in your web browser.

8.4. HTTP unicast and monitoring

This HTTP connection can be used to monitor MuMuDVB. This feature will be implemented in a near future release. Please tell wich data can be interesting for you.

9. Monitoring

You can use Monit to monitor MuMuDVB an restart it when it experiences problems (MuMuDVB kill himself when big issues appear).

You have to install the init scripts (automatic if you used the Debian package) and add the following lines to your /etc/monit/services file:

check process mumudvb with pidfile /var/run/mumudvb/mumudvb_carte0.pid
    start program = "/etc/init.d/mumudvb start"
    stop program = "/etc/init.d/mumudvb stop"
Note
The 0 have to be replaced by the DVB card number if you have multiples cards.

For more detailled information, refer to the Monit Website.

MuMuDVB usually run for many days without problems, but with monit you are safe. Monit is also able to send e-mails in case of problems.

10. Scrambled channels support

Important note : check the contract with your broadcaster to see if you are allowed to stream the scrambled channels you’re subscribed to.

10.1. Hardware descrambling

MuMuDVB supports scrambled channels via hardware descrambling i.e. a CAM (Conditionnal Access Module). It can ask the CAM to descramble multiple channels if the CAM supports it (Aston Pro, or PowerCam Pro are known to work with multiple channels).

If you are limited by the number of PIDs the can can decrypt simultaneously, it is possible to ask the CAM to decrypt only the audio and video. This feature is not implemented, please ask if you need it.

Note
The hardware descramblig uses almost no CPU, all the descrambling is made by the CAM.
Note
MuMuDVB doesn’t query the CAM before asking for descrambling. The query is not reliable. Most of CAMs answer a menu when the descrambling is not possible and MuMuDVB will display it on the standard error.

The information concerning the CAM is stored in '/var/run/mumudvb/caminfo_carte%d''' where %d is the DVB card number.

Example contents of '/var/run/mumudvb/caminfo_carte%d'''
CAM_Application_Type=01
CAM_Application_Manufacturer=02ca
CAM_Manufacturer_Code=3000
CAM_Menu_String=PowerCam_HD V2.0
ID_CA_Supported=0100
ID_CA_Supported=0500

10.1.1. How to ask MuMuDVB for descrambling?

You are using full autoconfiguration :

Just add cam_support=1 to your config file

You are using partial autoconfiguration or no autoconfiguration
Note
You have an example of CAM support in doc/configuration_examples/autoconf1.conf

10.2. Software descrambling

Important note : this solution is not allowed by some provider contracts.

MuMuDVB has been reported to work with software descrambling solutions like sascng + newcs + dvbloopback.

In this case you don’t need to set the cam_support option. Just ajust the card option to fit with your virtual dvbloopback card.

If you use these solutions, see reduce MuMuDVB CPU usage section.

10.3. Scrambling status

The scrambling status is stored together with the streamed channel list.

Example
239.100.0.7:1234:ESCALES:PartiallyUnscrambled
239.100.0.8:1234:Fit/Toute l'Histoire:PartiallyUnscrambled
239.100.0.9:1234:NT1:PartiallyUnscrambled
239.100.0.10:1234:ACTION:PartiallyUnscrambled
239.100.0.11:1234:MANGAS:PartiallyUnscrambled
239.100.0.12:1234:ENCYCLOPEDIA:PartiallyUnscrambled
239.100.0.13:1234:XXL PL:PartiallyUnscrambled
239.100.0.14:1234:France 5:HighlyScrambled
239.100.0.16:1234:LCP:FullyUnscrambled
239.100.0.17:1234:VIDEOCLICK:FullyUnscrambled

11. PAT (Program Allocation Table) Rewriting

This feature is mainly intended for set-top boxes. This option will announce only the streamed channel in the Program Allocation Table instead of all transponder channels. Computer clients parse this table and decode the first working program. Set-top boxes usually try only the first one which give usually a blank screen in most of the channels.

To enable PAT rewriting, add rewrite_pat=1 to your config file. This feature consumes few CPU, since the rewritten PAT is stored in memory and computed only once per channel.

Note
PAT rewrite can fail (i.e. doesn’t solve the previous symptoms) for some channels if their PMT pid is shared. In this case you have to add the ts_id option to the channel to specify the transport stream id, also known as service id.

12. Reduce MuMuDVB CPU usage (Experimental)

Normally MuMuDVB reads the packets from the card one by one and ask the card if there is data avalaible between each packets (poll). But often the cards have an internal buffer. Because of this buffer, some pollings are useless. These pollings eat some CPU time.

To reduce CPU usage, one solution is to try to read several packets at the same time. To do this use the option dvr_buffer_size.

Example
dvr_buffer_size=40

To see if the value you put is too big or to low, run MuMuDVB in verbose mode, the average number of packets received at the same time will be shown every 2 minutes. If this number if below your buffer size, it is useless to increase it.

The CPU usage reduction can be between 20% and 50%.

This feature is very new and can have sides effets, please contact if you see any.

If you use this option feel free to report the improvements at mumudvb @AT@ braice DOT net

13. Technical details (not sorted)

14. Known issues

14.1. VLC can’t read the stream but it is fine with xine or mplayer

14.2. VLC reads the video but no audio

14.3. MuMuDVB can’t deamonize

14.4. The system crashes or freeze

14.5. Tuning issues with DVB-T

14.6. The set-top box display a blank screen

14.7. Simple autoconfiguration fails finding the right pids

14.8. The CAM is complaining about locked channels

You have to set the maturity rating to maximum and unlock Maturity rating in Bolts submenu.

14.9. VLC doesn’t select the good program even with PAT rewriting

This is a VLC bug https://trac.videolan.org/vlc/ticket/2782

The PAT rewrite announces only the streamed channel in the PAT, but VLC also read the SDT to find channels (it should only refer to the PAT) and sometimes select the bad program. A temporary workaround is avoid sending the SDT PID. You can do this using the dont_send_sdt option.

This option will be replaced by a SDT rewrite.

14.10. HELP ! my multicast traffic is flooded (I have a HP procurve switch)

The best explanation is found in the HP multicast routing guide.

On switches that do not support Data-Driven IGMP, unregistered multicast groups are flooded to the VLAN rather than pruned. In this scenario, Fast-Leave IGMP can actually increase the problem of multicast flooding by removing the IGMP group filter before the Querier has recognized the IGMP leave. The Querier will continue to transmit the multicast group during this short time, and because the group is no longer registered the switch will then flood the multicast group to all ports.

On ProCurve switches that do support Data-Driven IGMP (“Smart” IGMP), when unregistered multicasts are received the switch automatically filters (drops) them. Thus, the sooner the IGMP Leave is processed, the sooner this multicast traffic stops flowing.

Switches without problems (supporting data driven igmp):

Switches WITH problems (NOT supporting data driven igmp):

So if you have one of the above switches this is "normal". The workaround is to make MuMuDVB join the multicast group. For this put multicast_auto_join=1 in your configuration file.

14.11. MuMuDVB is eating a lot of CPU with sasc-ng !

If you use sasc-ng + dvbloopback, MuMuDVB will eat more CPU than needed.

A part of this CPU time is used to descramble the channels, another part is due to the way dvbloopback is implemented and the way MuMuDVB ask the card.

To reduce the cpu usage, see reduce MuMuDVB CPU usage section. In the case of using MuMuDVB with sasc-ng this improvement can be quite large.