mkrufky / libdvbtee

dvbtee: a digital television streamer / parser / service information aggregator supporting various interfaces including telnet CLI & http control
GNU Lesser General Public License v2.1
79 stars 31 forks source link

UDP stream input doesn't work #35

Open gamelaster opened 7 years ago

gamelaster commented 7 years ago

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

mkrufky commented 7 years ago

@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

gamelaster commented 7 years ago

@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 commented 7 years ago

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

mkrufky commented 7 years ago

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.

gamelaster commented 7 years ago

@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:

mirmilad commented 7 years ago

@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.

gamelaster commented 6 years ago

@mirmilad can you share your UDP input?

mirmilad commented 6 years ago

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

mirmilad commented 6 years ago

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