1

I have Ubuntu desktop 14.04 with two NIC, eth0 and eth1. One is just for internet and the other one is on local subnet where multicast UDP stream is coming. Default route is on eth0, and multicast route is on eth1. UDP stream is coming on eth1 and I can see that is here with TCPDUMP on that interface but can't open it in VLC. In VLC log I can see that VLC can't open that port or what? Can someone help me? Is that problem with some user rights or port is closed, or what? The same stream I can play on other computer with windows. Here is VLC log:

main debug: processing request item: udp://225.224.2.2:1002, node: Playlist, skip: 0
main debug: resyncing on udp://225.224.2.2:1002
main debug: udp://225.224.2.2:1002 is at 9
main debug: starting playback of the new playlist item
main debug: resyncing on udp://225.224.2.2:1002
main debug: udp://225.224.2.2:1002 is at 9
main debug: creating new input thread
main debug: Creating an input for 'udp://225.224.2.2:1002'
main debug: using timeshift granularity of 50 MiB, in path '/tmp'
main debug: `udp://@225.224.2.2:1002' gives access `udp' demux `' path `@225.224.2.2:1002'
main debug: creating demux: access='udp' demux='' location='@225.224.2.2:1002' file='(null)'
main debug: looking for access_demux module matching "udp": 20 candidates
main debug: no access_demux modules matched
main debug: creating access 'udp' location='@225.224.2.2:1002', path='(null)'
main debug: looking for access module matching "udp": 25 candidates
access_udp debug: opening server=:0 local=225.224.2.2:1002
main debug: net: opening 225.224.2.2 datagram port 1002
main error: socket bind error (Permission denied)
access_udp error: cannot open socket
main debug: no access modules matched
main error: open of `udp://@225.224.2.2:1002' failed
main debug: dead input
main debug: changing item without a request (current 9/10)
main debug: nothing to play

here is ip route:

ip route

default via 192.168.2.1 dev eth0  proto static 
192.168.2.0/24 dev eth0  proto kernel  scope link  src 192.168.2.50  metric 1 
192.168.10.0/24 dev eth1  proto kernel  scope link  src 192.168.10.25  metric 1 
224.0.0.0/4 via 192.168.10.25 dev eth1

I changed the Multicast port and still can't open stream that is easy opened on Windows mashine in the same subnet. Here is VLC stream:

main debug: incoming request - stopping current input
main debug: object waitpipe triggered
main debug: socket 25 polling interrupted
main debug: prebuffering done 0 bytes in 39s - 0 KiB/s
main error: cannot pre fill buffer
main debug: removing module "access_udp"
main warning: cannot create a stream_t from access
main debug: incoming request - stopping current input
main debug: finished input
dbus debug: Getting property CanRaise
main debug: incoming request - stopping current input
main debug: dead input
main debug: processing request item: udp://225.224.2.3:3003, node: Playlist, skip: 0
main debug: resyncing on udp://225.224.2.3:3003
main debug: udp://225.224.2.3:3003 is at 0
main debug: starting playback of the new playlist item

And firewall is disabled....

One more update: On Ubuntu desktop and even on (I have to try)Win 2008 server VLC won't open udp stream which coming on multicast when two NIC are connected. When is connected just one NIC VLC can play the stream....So the problem is with VLC and two NIC. I assume that VLC doesn't know on which NIC to look for stream but I don't know how to resolve this. Any idea???

I didn't find answer to my problem but can't wait any more and need to move on to other things to do....So, here is the whole thing: I need to multicast stream which comes on eth1 to forward on eth0 so other computers and students in subnet can see it(connecting mcast stream to router or switch for everyone just mess with network and bandwidth and stream is freezing and pixeling ), (in what ever manner, but best will be as http stream so students can open stream with VLC) First I need to verify that stream is available, and for that I try with Ubuntu desktop and its working with one NIC, but with two no. After to much time without solution I decide to move to server 14.04 and UDPXY. Now I Installed Ubuntu server 14.04, server is joined multicast group, with tcpdump -i I can see that mcast stream is here on eth1, can't open the stream because it's server without video card, I installed UDPXY, which is accepting mcast stream on eth1 and client requests on eth0 so they open stream like: http://192.168.2.50:5005/udp/225.224.2.3:3003 I try to open stream in VLC on Windows, and on Linux computer and nothing. The VLC log gives me the same massage like before on Ubuntu desktop.

Even if I changed the whole configuration that's the same problem...Ubuntu with two NIC can't open, or forward stream. Is it problem with kernel routing or permissions??? In this case VLC doesn't have problem to choose on witch NIC to look for stream so it's have to be with Ubuntu... please help???

4
  • do you use this url (with a @) to read multicast: udp://@225.224.2.2:1002
    – laugeo
    Feb 6, 2016 at 17:26
  • Yes, I use udp:@225.224.2.2:1002 Any Idea?
    – Dejan
    Feb 8, 2016 at 11:49
  • And did you try to specify multicast interface with: --miface=eth1 or eth0? Mar 16, 2016 at 14:50
  • I didn't find answer to my problem but can't wait any more and need to move on to other things to do....So, here is the whole thing:
    – Dejan
    Mar 17, 2016 at 12:59

1 Answer 1

0

From the VLC log it is clear that socket bind has failed:

main debug: net: opening 225.224.2.2 datagram port 1002
main error: socket bind error (Permission denied)

consider that ports below 1024 are privileged and can only be bound with the equally privileged user. So you can either run VLC with sudo or change the port number.

Also make sure that no other application is using the same port, ip and socket type.

5
  • Let's say you're running an RTP server on your computer at port 8000 and you want to open a stream from that server using VLC. So, you'll connect to rtp://127.0.0.1:8000. But VLC throws this socket bind error. Why? We don't need VLC to use that port. We need to receive the stream from a server already running at that port. I think this is a bug in VLC.
    – xyres
    Apr 7, 2018 at 13:43
  • @xyres I don't think its a bug. VLC just tries to bind a socket and it fails. This means that your system does not allow this for some reason. One of the possible reasons may be that this port is already used by another application. Another reason may be your firewall settings. Apr 7, 2018 at 18:49
  • Yes, the RTP server is running on that port to serve the stream. Why would VLC need to bind itself to that port, instead of just connecting to it and start receiving the stream from there? For example, if an HTTP server is running on port 80 and you connect to it via your browser, the browser doesn't try to bind itself to port 80. But if I fire up two VLC player windows and serve the stream from one and try to receive the stream from another, it all works fine. Anyway, thanks for replying. Just like OP, I've also moved on to do other things.
    – xyres
    Apr 7, 2018 at 19:20
  • @xyres if you start your HTTP server at port 80 and then start another one also at port 80, the second one will fail since port 80 already in use by first one right? :) You can not run 2 http servers at the same time on a same port. A port maps to a single application. The same happens for any other application. Apr 8, 2018 at 1:38
  • I know that. What I was trying to say is that if I run an RTP server at port 8000 and try to connect VLC to that server to receive the stream from the server, why VLC does try to bind itself to that port? Because in this case, VLC should be acting as a client, not as a server.
    – xyres
    Apr 8, 2018 at 7:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .