New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTSP support for IPTV #190
Conversation
return it when it start, and ask it to stop RTSP stream
rename multicast open to multicast start to match current name scheme start rtsp if we recognize it's RTSP
implement bind method to the correct port
change a small test to return the correct value call rtsp start with the pointer to the fd, rtsp open the socket itself
we take care of free'd memory for rtsp_info transport string is set correctly based on the free port we had
check that client_port sent by server match our wish
open the socket with client port, that's the one we will sending packets from
rename attribute count cycles
initial packet sending (not functional for now)
…Freebox seems to like it
Hi All, this feature seems very interesting and smthing like I was really looking for. Have you got please any howto/help which would describe how to compile TVH with this feature and where and how to set this up? What versions of TVH are compatible with this? Thx a lot |
You'll need to checkout the iptv_rtsp branch, then configure and build the usual way - you can then add rtsp sources in the configuration section. The branch is pretty much up to date with the master development branch so it is ahead of the stable releases. |
@adamsutton: I've added a configuration page for RTSP services to Glandos' great work on RTSP. Also added a simple sub type for IPTV services to make them distinguisable, even if they're still stored in the same configuration structure. That could be a beginning of support for multiple IP transports such as http. Last, the branch has been brought a bit more up to date. |
@HuntieDK I'm sorry to say, that this code will need lots of work as the DVB code has been completely rewritten. However the framework for adding other IPTV transports should be a bit better. Currently it just supports the same as current tvh + HTTP. If someone wants to try integrating into that feature/dvb-rewrite branch, that would be very useful. |
@adamsutton: Interesting, I'll have a look at the branch :) RTSP support may be interesting for accessing SAT>IP tuners; I've successfully added services from a SAT>IP cable tuner using Glandos' changes; it quite much worked out of the box. Of course scanning still lacks. |
Hi, If anyone's interested ... |
@HuntieDK I did not seen that you had already done with branch master of tvheadend ... |
@Glandos: Hey Glandos, are you thinking of trying to port your RTSP additions to the new DVB-wise reworked tvheadend master (has undergone a lot of changes)? If not, I'm probably going to have a look at it. There's now an actual URL field in tvheadend (I believe http support have been, or is about to be, added). So there should be a good entry point there. |
I'd love to. I've seen that a lot of good work has been integrated for IPTV, and that RTSP streams can now have their own place next to DVB and other sources. |
I did actually start looking at the RTSP code and integrating it into the new stuff. Unfortunately, as usual, I got distracted and had more pressing concerns. However I think that some of the concepts that @Glandos used, are actually now an intrinsic part of the system. So I don't think its a massive job, just as has been said it needs some cleaning and tweaking. I imagine you could integrate a quick and dirty hack pretty quickly. Now... to sidetrack and hijack this thread... @Glandos I'm going to break the unwritten rule of parent hood (as a father of ~3 year old twin boys), this is the easy part :p We look back on those first few months and wonder at how simple the boys needs were. Yes it means getting up in the night a lot to feed them, but compared to what's to come it's much simpler! So don't listen to those that tell you "it gets easier", I'm sure it does eventually, around the time they leave home! But for now I think it just gets "different". But, and its a big one, it's still all worth it, so enjoy him/her :) And I'm sure we all look forward to you being able to contribute some new code :) |
@Glandos: Congrats on the new fatherhood :-) I'll start looking at the code when I have a bit of spare time and keep a repository updated here when I move on. And @adamsutton: Kudos on the DVB rewrite - it definitely has improved the structure of the input source code! :-) |
@Glandos excited to see this PR bringing internet TV as regular channels in tvheadend. What is the status of this? |
@Mettbrot looks like Glandos has been working on this - see his branch iptv_rtsp_new. I tried it but couldn't find a working rtsp stream to test. |
@Mettbrot Does any RTSP Stream work? Google gives me http://www.wowza.com/html/mobile.html |
@ckarrie - I tried this and got this http://pastebin.com/rv7aFVvM |
Only real IPTV (MPEG-TS) works in tvheadend. |
@nmaclean @Jalle19 yes, I got it. you have to "restream" as TS to get some streams working. Example command to restream my Edimax IP Camera for TVHeadend:
Would be nice if TVHeadend could do the job... :-) |
@ckarrie - thanks. I think you helped me on IRC. I used cvlc http:// --sout '#standard{access=http,mux=ts,dst=:8180/ch168}' I agree it would be nice if TVH could do this :) |
It looks easy (converting container to MPEG-TS) when you do it with VLC but there's probably a lot going on behind the scenes. I don't think any of this stuff belongs in tvheadend since the idea is that whatever video you feed into it is in the correct format, just like all DVB signals are in an agreed format. |
I've managed to get it working on tvheadend 3.9! The "initial scan no data, failed" error is there because tvheadend waits for too much TS packets in the transport stream. |
@manupap1 : Nice. But it's not a correct fix. I would do an extra time check using dispatch_clock to deliver waiting packets sooner. |
I just tested, it does not work. |
Hello, Thanks for this branch. I'm trying to build it on my Syno DS212J but I face this error during make: [...] Could someone point me to a possible solution ? Thanks a lot in advance ! PS: I've installed every (I think) required packages thru ipkg and ran the following commands: git clone git://github.com/Glandos/tvheadend.git |
Closing this PR, if somone @Glandos ? has this working in 3.9, please re-submit. |
Yes, I should have closed this long time ago, since it doesn't compile, and make people believe it will. |
Large PR for RTSP support, including basic stuff for RTCP.
This add a new dependency against libcurl for RTSP init.
Feel free to slap me if something seems wrong in the code.
However, I've tested it with valgrind, and it seems memory leak-free for now. I've also checked that performances are nearly the same.
I'd really appreciate that someone tests that the old IPTV behavior is not broken.
IMPORTANT
For now, the "interface" field is used to read the RTSP URL. So if you want to test, you have to put "rtsp://server/stream1" instead of "eth0", and the stream will be detected as RTSP. The "port" field is unused for now, but it could be used as a hint for RTP port.
If you think this "interface" field should not be used, feel free to provide me a good solution. This PR is done to test RTSP support, it is large enough, and I didn't want to make it larger (and with more bugs) by changing the web interface and the configuration.