libdvbtee icon indicating copy to clipboard operation
libdvbtee copied to clipboard

UDP stream input doesn't work

Open gamelaster opened this issue 8 years ago • 9 comments

Hello, I builded libdvbtee on Debian 7 x64. After running this command:

root@test:~/libdvbtee/dvbtee# ./dvbtee -iudp://239.1.1.1:1234/ -t10 -d -s
# dvbtee v0.5.4 - http://github.com/mkrufky/libdvbtee

1495452659 LOG::libdvbtee_set_debug_level: (0xff)
1495452659 rbuf::rbuf: ()
1495452659 listen::socket_listen: ()
1495452659 out::output: ()
1495452659 parse::init: ()
1495452659 listen::socket_listen: ()
1495452659 feed::feed: ()
1495452659 tune::tune: ()
1495452659 linuxtv_tuner::linuxtv_tuner: ()
1495452659 feed::start_socket: ()
1495452659 feed::start_socket: (<--udp://239.1.1.1:1234/)
1495452659 feed::start_udp_unbound_listener: (1234)
1495452659 feed::start_socket: ~(-->udp)
1495452659 feed::udp_listen_feed_thread: (sock_fd=3)
^C1495452661 feed::close_file: ()
1495452661 parse::cleanup: ()
1495452661 parse::detach_demux: ()
1495452661 feed::close_file: ()
1495452661 parse::cleanup: ()
1495452661 parse::detach_demux: ()

iptraf doesn't show any UDP packets so it's not pulling or something. My todo is to parse EPG from multicast TS stream. I tested this on node-dvbtee but I can't figure out how.

Thanks

gamelaster avatar May 22 '17 11:05 gamelaster

@gamelaster I am not sure if the -s "scan for services" argument is compatible with UDP streaming mode... I'll have to try this myself later on to be sure. If you remove this option, does it work? UDP multicast should work, recently merged #32

Make sure your multicast stream is running before you try to join as a listener using dvbtee

Meanwhile, You mentioned that you tested this using node-dvbtee as well but without any luck? If you can manage to receive the stream within node, just pipe it to the dvbtee.Parser object. There are examples in the node-dvbtee README.md Also, I pushed a basic working example this morning here: dvbtee-express

mkrufky avatar May 22 '17 18:05 mkrufky

@mkrufky UDP multicast streams running nonstop, and system have access on it (tested another script and I saw traffic in iptraf). I tested solo ./dvbtee -iudp://239.1.1.1:1234/ -t10 -d but that doesn't do anything (I mean, the response is same as log upper). I have problem to understand the documentation so I probably doing something bad, I just tested some arguments and scenarios but I didn't make it working.

My target is simple, just extract EPG from stream, by dvbtee or process it via node-dvbtee.

gamelaster avatar May 22 '17 19:05 gamelaster

While testing dvbtee-express, probably it's not suited for UDP: image

gamelaster avatar May 22 '17 19:05 gamelaster

dvbtee-express is just a sample piece of code that will show you how to write your own parser yourself. Look in routes/parse.js. If you want it to receive multicast UDP, you will have to write some code to enable it. dvbtee-express right now will just pull down a file or http resource and parse it. It's just a demo that I pushed when I saw your issue this morning without any time to respond :-P

I'll be happy to take a look at libdvbtee UDP multicast streaming when I have time, hopefully before the weekend, but you should be able to write a multicast parser using node.js and node-dvbtee easily in javascript.

mkrufky avatar May 22 '17 19:05 mkrufky

@mkrufky Thank you, I did it working thanks to dvbtee-express and using unicast stream, and timeout the pipe to 15 seconds. I will try to implement UDP, if it will works, I will make pull request with example file. Thank you a lot :blush:

gamelaster avatar May 22 '17 20:05 gamelaster

@mkrufky We solved the udp input issue on dvbtee-express and now we read all data but we have a problem with content encoding. As our content is utf-8, I appreciate if you could help us to solve this issue. Thank you a lot.

mirmilad avatar Jul 01 '17 08:07 mirmilad

@mirmilad can you share your UDP input?

gamelaster avatar Jul 01 '17 13:07 gamelaster

@gamelaster Of course, I'm not in office right now. I'll commit it tomorrow and let you know.

mirmilad avatar Jul 01 '17 13:07 mirmilad

@gamelaster You can find UDP input sample here: https://github.com/Pymossy/dvbtee-express

mirmilad avatar Jul 03 '17 11:07 mirmilad