1

I'm trying to do streaming from a source (tv box transmitting in multicast in this source rtp://@X.X.X.X:Y) to Internet (to my mobile phone as example or another device inside of my LAN) but I can not achieve it. The command I'm using is something like this

ffmpeg -i rtp://@X.X.X.X:Y -vcodec copy -f mpegts udp://127.0.0.1:1234

But it does not work as I expected, I mean, I'm able to open vlc and play the streaming in the same machine I'm running ffmpeg but not in another machine in the same LAN. Somebody can help me?

Thank you!

EDIT: Finally I solved installing a software called "udpxy" that forwards multicast content to the clients. I installed in a raspberry and it works perfect for this purpose.

Thank you for all your explanations. It helped me to understand what I want to do and the limitations I have using a transcoder. I guess I can do the same with udpxy with ffmpeg but I can publish directly the TV Box IPs.

  • Lets narrow down your question, some. The TV box is running linux AND the program ffmpeg? Is it okay to narrow down to your local LAN only? – jc__ Apr 23 '18 at 17:01
  • I'm going to upvote this question, because I am interested in the answer. – jc__ Apr 23 '18 at 17:02
  • Can you expand a little of what you want to achieve over all with the stream and re-stream? – jc__ Apr 23 '18 at 17:07
  • Is the client in this setup running VLC? – jc__ Apr 23 '18 at 17:28
0

With the command as given, 127.0.0.1 is localhost, the computer this command runs on. So of course you'll only be able to open vlc and play the stream on the same machine.

To forward to another machine on the same LAN, you'll need at least the IP address of this machine on your LAN.

You can't stream "to the internet", because neither the computer this command runs on, nor the mobile phone will have a fixed public IP. Both will be behind NAT (Network Address Translation), too. So you won't be able to do this.

If you are in the LAN, what prevents you from using the multicast stream directly from the "other machine" (after all, it's multicast, and that's exactly what multicast is made for...)? Converting a good RTP multicast stream into error-prone single-address UDP packets doesn't seem like the ideal solution to me...

0

I will use this answer spot to help in trouble shooting.

TV box (multicast) --> ffmpeg (multicast into MPEG transport stream) --> client VLC? (rx mpegts)

Assume:

The Video stream will not exit the local LAN.

The client that receives the MPEG transport stream cannot join or receive a multicast stream.

The TV box cannot transmit a MPEG transport stream.

Like @dirkt said. "Converting a good RTP multicast stream into error-prone single-address UDP packets doesn't seem like the ideal solution to me..."

Would changing UDP to TCP work, and changing from localhost to the client address?

ffmpeg -i rtp://@X.X.X.X:Y -vcodec copy -f mpegts tcp://192.168.1.100:1234

tcp://192.168.1.100:1234 -- The client PC receiving the mpegts stream

rtp://@X.X.X.X:Y -- The broadcast stream (224.0.0.0 - 239.255.255.255) Transmitted by the TV box.

Ideally one would want to change the TV box transmit to mpegts, OR change the client receive from mpegts to broadcast removing the middle ffmpeg translation.

Vocabulary:

mpegts -- MPEG transport stream. Wraps an Audio, Video, other in an error correction and synchronization pattern...

IP multicast -- One source PC and multiple destination PCs. IPv4 Address range of: 224.0.0.0 - 239.255.255.255. Some of that is excluded for routing, gateway, etc. A "client" will join a multicast "stream". One to many. messages may be lost or delivered out of order...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.