gfto / tomcast

tomcast reads mpeg transport streams over http or udp (multicast or unicast) and outputs them to chosen multicast group. Basically a simple http2multicast daemon designed to work 24/7.
GNU General Public License v2.0
33 stars 12 forks source link

RFE: IGMP support #2

Open lars18th opened 7 years ago

lars18th commented 7 years ago

Hi,

I have one suggestion: Add support for IGMP server support. The idea is do the streaming only when someone joins the multicast address. The objective is execute the HTTP request only when some user needs the multicast stream.

This sounds good?

joolzg commented 7 years ago

Great idea. Question is there a mechanism that allows the notification of someone joining a new group

Sent from Yahoo Mail on Android

On Fri, 27 Jan 2017 at 15:31, lars18thnotifications@github.com wrote:
Hi,

I have one suggestion: Add support for IGMP server support. The idea is do the streaming only when someone joins the multicast address. The objective is execute the HTTP request only when some user needs the multicast stream.

This sounds good?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

lars18th commented 7 years ago

Hi @joolzg ,

Great idea. Question is there a mechanism that allows the notification of someone joining a new group

Fortunately exists one opensource project with this function implemented: the VDR plugin streamdev.

See the help here: http://github.com/varaslt/vdr-plugin-streamdev/blob/master/README#L297

The code related to IGMP management is here: http://github.com/varaslt/vdr-plugin-streamdev/blob/9c12dba267d0ad21258a0e847ba99c6cebc75ae2/server/componentIGMP.c http://github.com/varaslt/vdr-plugin-streamdev/blob/9c12dba267d0ad21258a0e847ba99c6cebc75ae2/server/connectionIGMP.c

And the main code only instantiates the "componentIGMP class": http://github.com/varaslt/vdr-plugin-streamdev/blob/9c12dba267d0ad21258a0e847ba99c6cebc75ae2/server/server.c#L44

I don't say that you need to incorporate this code, but you can use it as example. All the useful functions are here. However, if you like a more simple protocol description, then we can work together for describe it.

What you think?

lars18th commented 7 years ago

Hi @joolzg ,

I found another interesting source that you can use: the good old "imgpproxy" project. Here one uptodate fork: http://github.com/ViToni/igmpproxy

I feel you can use this project to incorporating some code. Let me to explain it:

You will like to implement some initial support?

lars18th commented 7 years ago

Hi @gfto ,

You agree to implement this function?

At time, I can't found any opensource project (except the VDR plugin streamdev) with this funcionality. I feel will be very useful to have one "on-demand" multicast server based on IGMP.

I hope this sounds good to you! ;) Regards.

lars18th commented 7 years ago

Hi,

I'm considering an alternative implementation for supporting IGMP:

For implementing in this way, some changes are needed in tomcast. One of them is the avility for starting/stopping channels on-the-fly. So I suggest an approach similar to dvblast.sock and the dvblastctl tool:

echo "start 239.80.80.80:5000" > /tmp/tomcast.sock
echo "stop 239.80.80.80:5000" > /tmp/tomcast.sock
echo "start chan3" > /tmp/tomcast.sock
echo "stop chan3" > /tmp/tomcast.sock

I prefer the option for using the multicast output address as the id of the channel, instead of the name used in the channels.conf file. However, I feel it's easy to support both, and several users should prefer to use the name.

What you think?

lars18th commented 6 years ago

Hi @gfto ,

You feel that you can add some support for "starting"/"stoping" the channels using an external tool? If yes, then I can program an external tool for sending such messages (start-stop) to your tool based on IGMP requests.

You agree?

lars18th commented 6 years ago

Hi,

I discovered that someone is working on it: https://github.com/nerosketch/tomcast/commit/b30b45c8cce6019beed798e4f2915e99af77e758

lars18th commented 4 years ago

Hi,

I hope someone will continue developing this: https://github.com/nerosketch/tomcast/commit/b30b45c8cce6019beed798e4f2915e99af77e758

Regards.

lars18th commented 3 years ago

Hi,

No one interested in merge this? https://github.com/nerosketch/tomcast/commit/b30b45c8cce6019beed798e4f2915e99af77e758

lars18th commented 3 months ago

Hi @gfto ,

It's now time to merge https://github.com/nerosketch/tomcast/commit/b30b45c8cce6019beed798e4f2915e99af77e758 ? And https://github.com/nerosketch/tomcast/commit/a717fd9c8ae1ae011e94834b3d470e205ad2ef2f too?

Please, comment. Regards.

gfto commented 3 months ago

Sure, just submit a MR and I'll check it out.

lars18th commented 3 months ago

Hi,

Some news: Initial (external) support is added in #12 .