two nic multicast

About encoding, codec settings, muxers and filter usage
ch3mik
New Cone
New Cone
Posts: 3
Joined: 03 Apr 2014 18:33

two nic multicast

Postby ch3mik » 03 Apr 2014 19:19

Hi,
I have linux server with two nic. On first I have multicast stream from provider (eth0), second nic is connected to my network (eth1).
I want transcode stream from my provider to h264.

Now i am only trying to get stream from eth0 and transmit it with vlc to eth1 without transcoding, but it doesnt work for me.

I have this vlm.conf configuration :

new CH1 broadcast enabled
setup CH1 input udp://@239.1.1.1:1234
setup CH1 output #standard{access=udp,mux=ts,dst=239.2.1.1:1234}
control CH1 play

this command I run:
cvlc --miface eth1 --vlm-conf /etc/vlm.conf
and I added routes
ip route add 239.1.0.0/16 dev eth0
ip route add 224.0.0.0/4 dev eth1 (also tried "ip route add 239.2.0.0/16 dev eth1")

I seems that "--miface eth1" also looking for input stream on eth1. So I tried:
cvlc --vlm-conf /etc/vlm.conf
with tcpdump I can see stream incoming on eth0 but no output on eth1

I tried also combination with miface eth0 and "ip route add 239.2.0.0/16 dev eth1"

Stil no luck. Can you help me?

mstevan
New Cone
New Cone
Posts: 3
Joined: 10 Feb 2014 09:41

Re: two nic multicast

Postby mstevan » 03 Apr 2014 21:04

Well, first you should put --miface=eth0 not eth1, on eth0 you get multicast input, if i understand correctly.

And what linux you exactly use?

If it is Ubuntu (i use this combination Ubuntu 12.04 LTS + two NIC, multicast UDP/RTP inputs to HTTP outputs), you should edit /etc/sysctl.conf to be like this:

# Uncomment the next two lines to enable Spoof protection (reverse-path
filter)
# Turn on Source Address Verification in all interfaces to # prevent some
spoofing attacks
net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.all.rp_filter=0

# Uncomment the next line to enable TCP/IP SYN cookies # See
http://lwn.net/Articles/277146/ # Note: This may impact IPv6 TCP sessions
too
net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1


Then you should reboot or do sysctl -p command...

After that it should work even without routes, at least it work in my case.

Hope i help you.

ch3mik
New Cone
New Cone
Posts: 3
Joined: 03 Apr 2014 18:33

Re: two nic multicast

Postby ch3mik » 03 Apr 2014 21:25

--miface=eth0 I tried too ... I understand, that this overides routing table, so
there is no need any multicast route on eth0, but this affect also output?

may be there is any way for configuring output to send multicast to another interface?

linux is Alpine Linux

ch3mik
New Cone
New Cone
Posts: 3
Joined: 03 Apr 2014 18:33

Re: two nic multicast

Postby ch3mik » 03 Apr 2014 22:16

now I have
/proc/sys/net/ipv4/conf/eth0/rp_filter .. 0
/proc/sys/net/ipv4/conf/eth1/rp_filter .. 0
/proc/sys/net/ipv4/ip_forward ..1
and
--miface=eth0

On eth0 interface I can see original stream and my stream on udp://@239.2.1.1.
On eth1 I see nothing :-(

You sending out http ... I dont understand situation completly, but your output is not multicast?
I need multicast on input and output

Thank you for suggestion

mstevan
New Cone
New Cone
Posts: 3
Joined: 10 Feb 2014 09:41

Re: two nic multicast

Postby mstevan » 03 Apr 2014 23:37

Hm, well, multicast is for UDP, RTP... not HTTP, as far i know.

That configuration i wrote is for Ubuntu, i dont know if it works on Alpine linux (Alpine is not derivate of Debian) so maybe it is something ditribution specific settings that you need...

Maybe somebody on Alpine forum can help you (if there is any Alpine forum). This is more linux problem, not VLC i think, but, maybe i am wrong.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 7 guests