Unicast streaming of DVB-T channel

This forum is about all development around libVLC.
brushhead
Blank Cone
Blank Cone
Posts: 13
Joined: 04 Sep 2008 13:57
VLC version: 2.0.1
Operating System: Debian
Location: Wales, UK

Unicast streaming of DVB-T channel

Postby brushhead » 23 Dec 2011 09:56

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.
Robert Wilson,
Robstech Consulting Ltd,

brushhead
Blank Cone
Blank Cone
Posts: 13
Joined: 04 Sep 2008 13:57
VLC version: 2.0.1
Operating System: Debian
Location: Wales, UK

Re: Unicast streaming of DVB-T channel

Postby brushhead » 03 Jan 2012 14:59

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");
Last edited by brushhead on 04 Jan 2012 09:33, edited 1 time in total.
Robert Wilson,
Robstech Consulting Ltd,

MichaelMc
Blank Cone
Blank Cone
Posts: 63
Joined: 10 Jun 2009 17:55

Re: Unicast streaming of DVB-T channel

Postby MichaelMc » 03 Jan 2012 19:56

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.

brushhead
Blank Cone
Blank Cone
Posts: 13
Joined: 04 Sep 2008 13:57
VLC version: 2.0.1
Operating System: Debian
Location: Wales, UK

Re: Unicast streaming of DVB-T channel

Postby brushhead » 03 Jan 2012 20:33

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.
Robert Wilson,
Robstech Consulting Ltd,

MichaelMc
Blank Cone
Blank Cone
Posts: 63
Joined: 10 Jun 2009 17:55

Re: Unicast streaming of DVB-T channel

Postby MichaelMc » 03 Jan 2012 22:38

Got ya. That's the same functionality I've also been looking for from within libvlc also.

brushhead
Blank Cone
Blank Cone
Posts: 13
Joined: 04 Sep 2008 13:57
VLC version: 2.0.1
Operating System: Debian
Location: Wales, UK

Re: Unicast streaming of DVB-T channel

Postby brushhead » 04 Jan 2012 17:29

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.
Robert Wilson,
Robstech Consulting Ltd,


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 11 guests