Livewire / AES67

661 views
Skip to first unread message

Fabien

unread,
Jul 11, 2018, 5:27:44 PM7/11/18
to mmbtools
Hello,

Has anyone been able to use odr with Livewire or AES67 audio streams?

Thanks
Have a nice day,
Fabien

Nick Piggott

unread,
Jul 12, 2018, 3:05:30 AM7/12/18
to crc-mm...@googlegroups.com
Hi Fabien,

I've done this in a number of ODR setups.

If you look in the documentation for how to set up supervisor (http://wiki.opendigitalradio.org/RaspDAB/Automate_operation_with_Supervisor), under Special Note for Commands that start Child Processes, you'll see a sample command to extract linear audio, convert and encode it.

It works very well, although you'll need to use a high quality network card, and adjust IP routing on the machine to bridge between multicast and unicast networks.


Nick


--
You received this message because you are subscribed to the Google Groups "mmbtools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crc-mmbtools...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fabien

unread,
Jul 12, 2018, 5:41:35 PM7/12/18
to mmbtools
Hi Nick,

Thanks for your answer.

If I understand correctly, I have to use rtpdump. How to download it? It is in this git https://github.com/columbia-irt/rtptools ?

Can you send me an Supervisor .conf file for example ? (my mail f...@bien.be)

Thanks

Best Regards,
Fabien
Message has been deleted

Fabien

unread,
Jul 12, 2018, 6:05:26 PM7/12/18
to mmbtools
I just clone & install rtptools, and configured my supervisor encoder, but I have no sound

Can you tell me if my config is correct ?

[program:enc-test]
# DAB encoding using odr-audioenc
command=bash -c "rtpdump -F payload 239.192.3.248/5004 | sox -t raw -e signed-integer -r 48000 -c 2 -b 24 -B /dev/stdin -t raw --no-dither -r 48000 -c 2 -b 16 -L /dev/stdout gain 4 | odr-audioenc --format=raw --dab --bitrate=128 --dabmode=j --dabpsy=2 --pad=24 --pad-fifo=/home/dab/DAB/dls/test/test.pad --input=/dev/stdin --output=tcp://127.0.0.1:79001"
stopasgroup=true
autostart=true
autorestart=true
startretries=100
priority=10
stderr_logfile=/var/log/supervisor/enc-test.log
stdout_logfile=/var/log/supervisor/enc-test.log

and the log in supervisor return :

Welcome to ODR-AudioEnc v2.2.0-15-g60140af, compiled at Feb  9 2018, 20:10:39
 
Using 8 subchannels. AAC type: HE-AAC. channels=2, sample_rate=48000
AAC bitrate set to: 64000
Bandwidth is 10125
DAB+ Encoding: framelen=1920 (7680B)
Initialising VLC...
You are using VLC with size_t size callbacks
[0000000000f92dc8] pulse audio output error: PulseAudio server connection failure: Connection refused
Starting encoding
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
 
Message has been deleted

Fabien

unread,
Jul 12, 2018, 7:18:35 PM7/12/18
to mmbtools
I forgot to install SOX.
Now Supervisor no longer gives me an error for the encoder, but I still have no sound


Welcome to ODR-AudioEnc v2.2.0-15-g60140af, compiled at Feb  9 2018, 20:10:39

Using 8 subchannels. AAC type: HE-AAC. channels=2, sample_rate=48000
AAC bitrate set to: 64000
Bandwidth is 10125
DAB+ Encoding: framelen=1920 (7680B)

Nick Piggott

unread,
Jul 13, 2018, 6:13:07 AM7/13/18
to crc-mm...@googlegroups.com
Hi,

You need to make sure that multicast IP is configured to route at the network layer.

Try running

rtpdump -F payload 239.192.3.248/5004 -o audio.wav

which will create an audio file called audio.wav. If the file size is 0 bytes, then no multicast is being received.

On most machines, there are two network cards:
* eth0 - connected to the normal LAN
* eth1 - connected to the Livewire dedicated LAN

You have to explicitly allow multicast to flow from eth1, otherwise it'll be ignored. I do this in the /etc/network/interfaces file

# Interface into LiveWire network                                                                                                                                                                                                    
allow-hotplug eth1                                                                                                                                                                                                                   
iface eth1 inet static                                                                                                                                                                                                               
address (a.b.c.d - the static address for this machine on the livewire network)
netmask 255.255.255.0                                                                                                                                                                                                                
post-up route add -net 224.0.0.0 netmask 240.0.0.0 eth

The last line is important, as that's the multicast subnet routing.


Nick


--

Fabien

unread,
Jul 13, 2018, 3:54:29 PM7/13/18
to mmbtools
Hi Nick,

Yes, it seems that it's a multicast problem.

I configured my Livewire network interface like you advised me :

auto lo
iface lo inet loopback

auto enp0s3 #Internet
iface enp0s3 inet
static
 address
10.30.10.61
 netmask
255.255.255.0
 gateway
10.30.10.1
 dns
-nameservers 10.30.10.1


auto enp0s8 #Livewire
iface enp0s8 inet
static
 address
10.30.40.105

 netmask
255.255.255.0
 post
-up route add -net 224.0.0.0 netmask 240.0.0.0 eth

ifconfig
enp0s3    
Link encap:Ethernet  HWaddr 08:00:27:58:e4:83  
          inet adr
:10.30.10.61  Bcast:10.30.10.255  Masque:255.255.255.0
          adr inet6
: fe80::a00:27ff:fe58:e483/64 Scope:Lien
          adr inet6
: 2a0a:800:50:10:a00:27ff:fe58:e483/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU
:1500  Metric:1
         
Packets reçus:109809 erreurs:0 :3 overruns:0 frame:0
          TX packets
:68663 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 lg file transmission:1000
         
Octets reçus:91939319 (91.9 MB) Octets transmis:45196585 (45.1 MB)


enp0s8    
Link encap:Ethernet  HWaddr 08:00:27:d6:ec:f9  
          inet adr
:10.30.40.105  Bcast:10.30.40.255  Masque:255.255.255.0
          adr inet6
: fe80::a00:27ff:fed6:ecf9/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU
:1500  Metric:1
         
Packets reçus:118 erreurs:0 :0 overruns:0 frame:0
          TX packets
:111 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 lg file transmission:1000
         
Octets reçus:11778 (11.7 KB) Octets transmis:12475 (12.4 KB)

PS : interface's names are enp0x because Ubuntu is installed on a virtual machine via VirtualBox with two network cards in bridge mode

And, we can ping other Livewire devices on L2 network. But multicast doesn't seem to work because when I try "rtpdump -F payload 239.192.3.248/5004 -o audio.wav", my audio file stays at 0Bytes :-(

Do you have any idea ? :--)

Thanks a lot for your help,

Have a nice weekend,
Fabien

Fabien

unread,
Jul 13, 2018, 4:30:46 PM7/13/18
to mmbtools
Oh, apologize for my mistake.. : post-up route add -net 224.0.0.0 netmask 240.0.0.0 enp0s8

It works!!

thanks a lot ! :-)

Fabien

unread,
Jul 13, 2018, 5:05:47 PM7/13/18
to mmbtools
One last question: if I want to use multiple Livewire sources for multiple services, I can duplicate theses commands by just changing the multicast IP address ?

command=bash -c "rtpdump -F payload 239.192.1.1/5004 | sox -t raw -e signed-integer -r 48000 -c 2 -b 24 -B /dev/stdin -t raw --no-dither -r 48000 -c 2 -b 16 -L /dev/stdout gain 4 | odr-audioenc --format=raw --dab --bitrate=128 --dabmode=j --dabpsy=2 --pad=24 --pad-fifo=/home/dabsys/site/mot/sam.mot --input=/dev/stdin --output=tcp://127.0.0.1:9010"


Because I just try with a second Livewire channel, and I have lot of audio drops in this second channel

Nick Piggott

unread,
Jul 15, 2018, 5:45:15 AM7/15/18
to crc-mm...@googlegroups.com
Yes, but you really need a good network card for it to work.

I had problems pulling multiple channels on a cheap USB network adaptor. Running the same code on a machine with a better network card was more reliable. Also consider if you're overloading the USB bus, if the same machine is also streaming data from odr-dabmod to a modulator.

Fabien

unread,
Jul 15, 2018, 7:41:38 AM7/15/18
to mmbtools
Exact! With another network card it's ok :-) Thanks a lot !
Have a nice sunday,
Fabien

Nick Piggott

unread,
Jul 15, 2018, 2:52:02 PM7/15/18
to crc-mm...@googlegroups.com
De rien!

Matthias Brändli

unread,
Jul 16, 2018, 1:24:35 AM7/16/18
to crc-mm...@googlegroups.com
Hi Nick,

I'll add a scenario to the ODR-AudioEnc README that describes this
usage. Have you tried using the VLC input to receive the multicast stream?

Or did that fail for some reason?

Cheers
mpb
> <mailto:crc-mmbtools...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "mmbtools" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools...@googlegroups.com>.

Nick Piggott

unread,
Jul 16, 2018, 5:48:35 AM7/16/18
to crc-mm...@googlegroups.com
Hi,

It's quite complicated to get VLC to pull Livewire/AE67 streams. The format can't be deduced by inspection of the packets, so if you try and use the rtp://@a.b.c.d format, it will fail...

> odr-audioenc --vlc-uri=rtp://@239.192.58.253 --dab --bitrate=128 --channels=2 --rate=48000 ==dabmode=J --output=tcp://127.0.0.1:9099
You are using VLC with size_t size callbacks
[00007fd7080046c8] rtp demux error: unspecified payload format (type 96)
[00007fd7080046c8] rtp demux: A valid SDP is needed to parse this RTP stream.
[00007fd7080046c8] core demux error: SDP required 
[00007fd7080046c8] core demux error: A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (96).    

There's a utility on the Axia website to help create an SDP file

If you plug in the details of the multicast to this, it creates an SDP file
v=0
o=Node 1 1 IN IP4 10.100.1.1
s=DAB_Audio_Enc_Service
t=0 0
a=type:multicast
c=IN IP4 239.192.58.253
m=audio 5004 RTP/AVP 97
a=rtpmap:97 L24/48000/2

But then something doesn't work.
Initialising VLC... 
You are using VLC with size_t size callbacks 
Setting outbuf size to 4092
Starting encoding
Detected fault in input! No data in time.     

The other reason I wanted to use rtpdump | sox | odr-audioenc is that I tend to believe that the re-sampler in sox is better than that in vlc, and I needed to bump an 8dB boost into the audio, as most livewire networks are configured for -23dBFS, which is too quiet for broadcast. (Resampling is a painful experience in vlc). You've got to shift the audio from 24 bit to 16 bit, although thankfully in most cases the sample rate (in this case 48kHz) doesn't need changing. (You may come across multicast setups using 44.1kHz as a master sample (nngggghhhhhh) and of course you may also have to re-sample to other sample rates in DAB/DAB+).

Nick


To unsubscribe from this group and stop receiving emails from it, send an email to crc-mmbtools...@googlegroups.com.

Matthias Brändli

unread,
Jul 16, 2018, 6:13:13 AM7/16/18
to crc-mm...@googlegroups.com
Hi,

thanks for the clarifictions. In the meantime, I found a discussion on
this list about generating the SDP file, and also added that to the README.

Maybe there's a way to get the SDP input to work too. Does it at least
work with "plain VLC" or with cvlc?

mpb

On 16/07/18 11:48, Nick Piggott wrote:
> Hi,
>
> It's quite complicated to get VLC to pull Livewire/AE67 streams. The
> format can't be deduced by inspection of the packets, so if you try and
> use the rtp://@a.b.c.d format, it will fail...
>
>> odr-audioenc --vlc-uri=rtp://@239.192.58.253 <http://239.192.58.253>
> --dab --bitrate=128 --channels=2 --rate=48000 ==dabmode=J
> --output=tcp://127.0.0.1:9099 <http://127.0.0.1:9099>
> <crc-mm...@googlegroups.com <mailto:crc-mm...@googlegroups.com>>
> <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>
> >     <mailto:crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>>.
> >     For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "mmbtools" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>
> > <mailto:crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>>.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "mmbtools" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>.

Nick Piggott

unread,
Jul 16, 2018, 6:53:30 AM7/16/18
to crc-mm...@googlegroups.com
Hi,

I noticed that the SDP Generator on the website is giving the wrong payload type. It should be 96, not 97.
v=0
o=Node 1 1 IN IP4 10.100.1.1
s=DAB_Audio_Enc_Service
t=0 0
a=type:multicast
c=IN IP4 239.192.58.253
m=audio 5004 RTP/AVP 96
a=rtpmap:96 L24/48000/2

cvlc will pull this audio fine, when routing to a raw demuxer:
cvlc file:///home/dabsys/file.sdp --no-video --sout file/raw:stream.wav

You can load this stream.wave file into an audio editor (specifying 24 bit audio, big endian bit order, 48kHz sample rate).

However, if you try and get this to happen in odr-audioenc, vlc seems to choke on the conversion...
[0000000001001f28] core input debug: Stream buffering done (1000 ms in 996 ms)
[0000000001001f28] core input debug: Decoder wait done in 0 ms
[00007f2c00000eb8] core encoder debug: looking for encoder module matching "any": 20 candidates
[00007f2c00000eb8] araw encoder debug: samplerate:48000Hz channels:2 bits/sample:32
[00007f2c00000eb8] core encoder debug: using encoder module "araw"
[00007f2c10001ed8] core stream out debug: input 's32l' 48000 Hz Stereo frame=1 samples/8 bytes
[00007f2c10001ed8] core stream out debug: conversion: 's32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo     
[00007f2c00011118] core audio converter debug: looking for audio converter module matching "any": 12 candidates
[00007f2c00011118] audio_format audio converter debug: s32l->f32l, bits per sample: 32->32
[00007f2c00011118] core audio converter debug: using audio converter module "audio_format"
[00007f2c10001ed8] core stream out debug: conversion pipeline complete
[00007f2c00011518] core audio resampler debug: looking for audio resampler module matching "any": 3 candidates
[00007f2c00011518] core audio resampler debug: using audio resampler module "samplerate" 
Detected fault in input! No data in time.                                 

It might be that there are additional parameters you can force into odr-audioenc, which in turn help libvlc understand what's going on?


Nick


To unsubscribe from this group and stop receiving emails from it, send an email to crc-mmbtools...@googlegroups.com.

Matthias Brändli

unread,
Jul 25, 2018, 4:07:59 AM7/25/18
to crc-mm...@googlegroups.com
You can use -L to pass more parameters to vlc, maybe there's a way to
get it working with that.

I'm afraid I can't be of much help, without a LiveWire signal available
here.

mpb
> <crc-mm...@googlegroups.com <mailto:crc-mm...@googlegroups.com>>
> wrote:
>
> Hi,
>
> thanks for the clarifictions. In the meantime, I found a discussion on
> this list about generating the SDP file, and also added that to the
> README.
>
> Maybe there's a way to get the SDP input to work too. Does it at least
> work with "plain VLC" or with cvlc?
>
> mpb
>
> On 16/07/18 11:48, Nick Piggott wrote:
> > Hi,
> >
> > It's quite complicated to get VLC to pull Livewire/AE67 streams. The
> > format can't be deduced by inspection of the packets, so if you
> try and
> > use the rtp://@a.b.c.d format, it will fail...
> >
> >> odr-audioenc --vlc-uri=rtp://@239.192.58.253
> <http://239.192.58.253> <http://239.192.58.253>
> <mailto:crc-mm...@googlegroups.com
> >     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com
> <mailto:crc-mmbtools%252Buns...@googlegroups.com>>
> >     >     <mailto:crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>
> >     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com
> <mailto:crc-mmbtools%252Buns...@googlegroups.com>>>.
> >     >     For more options, visit https://groups.google.com/d/optout.
> >     >
> >     > --
> >     > You received this message because you are subscribed to the
> Google
> >     > Groups "mmbtools" group.
> >     > To unsubscribe from this group and stop receiving emails
> from it, send
> >     > an email to crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>
> >     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com
> <mailto:crc-mmbtools%252Buns...@googlegroups.com>>
> >     > <mailto:crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>
> >     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com
> <mailto:crc-mmbtools%252Buns...@googlegroups.com>>>.
> >     > For more options, visit https://groups.google.com/d/optout.
> >
> >     --
> >     You received this message because you are subscribed to the Google
> >     Groups "mmbtools" group.
> >     To unsubscribe from this group and stop receiving emails from it,
> >     send an email to crc-mmbtools...@googlegroups.com
> <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>
> >     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com
> <mailto:crc-mmbtools%252Buns...@googlegroups.com>>.

Fabien

unread,
Jul 25, 2018, 9:34:25 AM7/25/18
to mmbtools
Hi Matthias,

PS : IIf you want to test on my ODR virtual test machine in Teamviewer, with livewire sources. Do not hesitate to contact me
>     >     >     For more options, visit https://groups.google.com/d/optout.
>     >     >
>     >     > --
>     >     > You received this message because you are subscribed to the
>     Google
>     >     > Groups "mmbtools" group.
>     >     > To unsubscribe from this group and stop receiving emails
>     from it, send
>     >     > an email to crc-mmbtools...@googlegroups.com
>     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>
>     >     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com
>     >     > For more options, visit https://groups.google.com/d/optout.
>     >
>     >     --
>     >     You received this message because you are subscribed to the Google
>     >     Groups "mmbtools" group.
>     >     To unsubscribe from this group and stop receiving emails from it,
>     >     send an email to crc-mmbtools...@googlegroups.com
>     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>
>     >     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com
>     >     For more options, visit https://groups.google.com/d/optout.
>     >
>     > --
>     > You received this message because you are subscribed to the Google
>     > Groups "mmbtools" group.
>     > To unsubscribe from this group and stop receiving emails from it, send
>     > an email to crc-mmbtools...@googlegroups.com
>     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>
>     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>>.
>     > For more options, visit https://groups.google.com/d/optout.
>
>     --
>     You received this message because you are subscribed to the Google
>     Groups "mmbtools" group.
>     To unsubscribe from this group and stop receiving emails from it,
>     send an email to crc-mmbtools...@googlegroups.com
>     <mailto:crc-mmbtools%2Bunsu...@googlegroups.com>.
>     For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "mmbtools" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crc-mmbtools...@googlegroups.com

Matthias Brändli

unread,
Jul 25, 2018, 10:20:33 AM7/25/18
to crc-mm...@googlegroups.com
Hi Fabien,

> PS : IIf you want to test on my ODR virtual test machine in Teamviewer,
> with livewire sources. Do not hesitate to contact me

Thanks for the proposal, but I don't have time to look into this.

However, if there's anything I can do to help you all from the community
to do tests and improve the tools, tell me.


As a general remark, I hope to one day be able to share the maintenance
responsibility of the mmbTools with someone else, because the low bus
factor is bad for the project.

https://en.wikipedia.org/wiki/Bus_factor

mpb

Fabien

unread,
Jul 25, 2018, 2:58:51 PM7/25/18
to mmbtools
Hi Matthias,

I understand.
That said, the technique with rtpdump|sox works great!

Not easy to establish a large community on such a precise domain

thanks for your work!
Reply all
Reply to author
Forward
0 new messages