Page 1 of 1

Unicast streaming of DVB-T channel

Posted: 23 Dec 2011 09:56
by brushhead
Hi,
I am trying to stream a DVB-T channel with PID=4222. I am calling libvlc_new with the arguments "DVB://786000000:8000000", "--dvb-adapter=0", "--no-video-title-show".

I get a pointer returned which suggests it likes that.

Then i'm calling:

VLC_PUBLIC_API int libvlc_vlm_add_broadcast( libvlc_instance_t *p_instance,
const char *psz_name, const char *psz_input,
const char *psz_output, int i_options,
const char * const* ppsz_options,
int b_enabled, int b_loop );

With arguments

int respon = libvlc_vlm_add_broadcast(VLC_Inst, "BBC1 Wales->192.168.254.142",
"NULL",
"standard{mux=tsdst=rtp{dst=192.168.254.142:10555,mux=ts},select=program=4222", 0, NULL, 1, 1);

Now i'm obviously missing something easy with the concept of how this is meant to work. Advice would be very welcome. Also is it possible to stream multiple PIDs from the same tuners and add/remove them on the fly?

Thanks and regards,

Rob.

Re: Unicast streaming of DVB-T channel

Posted: 03 Jan 2012 14:59
by brushhead
Hi,
I've managed to get a stream from a DVB-T channel by passing arguments to the libvlc_new function thus. The only thing I need now is how to pass the program so I can create extra program streams from the same DVB adapter, to different recipients. I was hoping that I could do this from the same libvlc_instance_t pointer and just adding calls to libvlc_vlm_add_broadcast.

Thanks,

Rob.

const char * const vlc_args[] =
{
"dvb://", "--dvb-frequency=786000000", "--dvb-bandwidth=8", "--dvb-adapter=1"
};

const char * const vlc_options[] =
{
"program=6784"
};

libvlc_instance_t * VLC_Inst = libvlc_new(sizeof(vlc_args)/sizeof(vlc_args[0]), vlc_args);

Result = libvlc_vlm_add_broadcast(VLC_Inst,
"BBC NEWS->192.168.254.127:10555",
"dvb://",
"udp://192.168.254.127:10555",
sizeof(vlc_options)/sizeof(vlc_options[0]),
vlc_options,
1,
1);

Result = libvlc_vlm_play_media(VLC_Inst, "BBC NEWS->192.168.254.127:10555");

Re: Unicast streaming of DVB-T channel

Posted: 03 Jan 2012 19:56
by MichaelMc
I didn't think it was possible to stream multiple PID's from the same tuner, at least not from the HVR dongle I have. It's also not possible to change to another PID in real time (without recreating stream, like VLC does), which is a shame.

Re: Unicast streaming of DVB-T channel

Posted: 03 Jan 2012 20:33
by brushhead
Hi,
Actually you can from within the VLC app. See a conversation I had ages ago

viewtopic.php?f=13&t=49857&p=159465#p159465

I want to be able to do this from within libvlc, so I can add a remove PID stream from the same tuner.

Regards,

Rob.

Re: Unicast streaming of DVB-T channel

Posted: 03 Jan 2012 22:38
by MichaelMc
Got ya. That's the same functionality I've also been looking for from within libvlc also.

Re: Unicast streaming of DVB-T channel

Posted: 04 Jan 2012 17:29
by brushhead
Hi,
Done some more digging and it seems you cannot after all create multiple streams from one DVB card in the libvlc API. I did manage to get libvlc_vlm_add_broadcast to take the program number but found that you have to have a delay between that and calling play, otherwise it would just play the first PID each time (BBC1 Wales in my case). But adding extra calls to libvlc_vlm_add_broadcast results in error trying to call an already opened dvb device. I'm now going to try and do this via the LinuxTV API.

Rob.