Project

General

Profile

Feature #2481

Iptv RTSP support

Added by Bernard DELAVILLE about 10 years ago. Updated over 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-11-16
Due date:
% Done:

0%

Estimated time:

Description

I use OpenElec whith TVH about 3 years and very happy !
I've got TBS 6280 DVB-T/T2 and Free (france) as internet provider and IPTV service.
But Free use RTSP stream for Ip TV and it would be great for French users to have RTSP support into Tvh in the same appli than DVB-T.
Free use playlist.m3u with lines like this : rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201&flavour=hd

I read a spécial developpement for rtsp support here : https://github.com/Glandos/tvheadend/tree/iptv_rtsp_new

Should it be possible to intégrate that, to have a TV backend near the perfection ?
Regards,
Beber

History

#1

Updated by Sam Stenvall about 10 years ago

You might want to have a look at https://github.com/Jalle19/node-ffmpeg-mpegts-proxy, people are already using it successfully to play streams that tvheadend cannot use natively.

#2

Updated by Bernard DELAVILLE about 10 years ago

Ok, but can't it be integrated into tvh ? I'm not enough strong in linux to make it work .. Too much complicated ! How can I enable that into my htpc ? Can you explain what sould I do ?

#3

Updated by Rafal Kupiec about 10 years ago

I think 0d10db25143848c8a92d88f8e4786a59b33fca44 implements sth better than this and can also be used for RTSP streams.

#4

Updated by Bernard DELAVILLE about 10 years ago

Sorry but what is "0d10db25143848c8a92d88f8e4786a59b33fca44" ???

#5

Updated by Jaroslav Kysela about 10 years ago

Rafal main the latest tvh version. 3.9.2100+ ...

https://tvheadend.org/projects/tvheadend/wiki/Custom_MPEG-TS_Input

#6

Updated by Bernard DELAVILLE about 10 years ago

Ho sorry, I'm just an old man who is trying to understand things a bit too hard for me !
It's a very good news ! I'll investigate that and try to make it work !! Afraid that some questions will follow !!! Thanks a lot for your help,
Regards,
Beber

#7

Updated by Bernard DELAVILLE about 10 years ago

Ok so I just try Tvh 3.9.2102.
I add a network iptv with just network name
Then I add a muxes whith URL : rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd it's a url I have into playlist.m3u, interface eth0 and name of channel.
Tvh says :

2014-11-17 22:56:37.000 [ INFO] mpegts: paramount in Free - tuning on IPTV
2014-11-17 22:56:37.000 [ ERROR] iptv: paramount in Free - unsupported scheme [rtsp]
2014-11-17 22:56:37.000 [WARNING] mpegts: paramount in Free - failed to start on IPTV, try another

So what should I do ?
Many Thanks

#8

Updated by Piotr Kuchciak about 10 years ago

I try your url. Add to muxes to IPTV network and have this log:

2014-11-19 07:51:36.000 mpegts: tvh in IPTV - tuning on IPTV
2014-11-19 07:51:36.000 iptv: tvh in IPTV - unsupported scheme [rtsp]
2014-11-19 07:51:36.000 mpegts: tvh in IPTV - failed to start on IPTV, try another

#9

Updated by Bernard DELAVILLE about 10 years ago

Ok so the same of me ...
This URL is good ( rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd ) as when I put it into VLC the channel is correctly opened ...
I don't know what is appening in Tvh ...

#10

Updated by Jaroslav Kysela about 10 years ago

Try this url (assuming that you have ffmpeg enabled):

pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1
#11

Updated by Jaroslav Kysela about 10 years ago

ffmpeg enabled = ffmpeg installed ....

#12

Updated by Piotr Kuchciak about 10 years ago

I installed ffmpeg and then check. But have this:

2014-11-19 20:26:30.004 mpegts: pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1 - tuning on IPTV
2014-11-19 20:26:30.007 spawn: Executing "/usr/bin/ffmpeg"
2014-11-19 20:26:30.008 eit: registering mux pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1
2014-11-19 20:26:30.009 subscription: 0003: "scan" subscribing to mux, weight: 4, adapter: "IPTV", network: "IPTV", mux: "pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1", hostname: "", username: "", client: ""
2014-11-19 20:26:40.668 iptv: stdin pipe unexpectedly closed: No data
2014-11-19 20:26:45.005 mpegts: pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1 - scan no data, failed
2014-11-19 20:26:45.005 subscription: 0003: "scan" unsubscribing
2014-11-19 20:26:46.591 mpegts: pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1 - tuning on IPTV
2014-11-19 20:26:46.594 spawn: Executing "/usr/bin/ffmpeg"
2014-11-19 20:26:46.595 subscription: 0004: "scan" subscribing to mux, weight: 5, adapter: "IPTV", network: "IPTV", mux: "pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1", hostname: "", username: "", client: ""
2014-11-19 20:26:56.834 iptv: stdin pipe unexpectedly closed: No data
2014-11-19 20:27:01.004 mpegts: pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1 - scan no data, failed
2014-11-19 20:27:01.004 subscription: 0004: "scan" unsubscribing
2014-11-19 20:27:42.603 mpegts: pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1 - tuning on IPTV
2014-11-19 20:27:42.607 spawn: Executing "/usr/bin/ffmpeg"
2014-11-19 20:27:42.607 subscription: 0005: "scan" subscribing to mux, weight: 5, adapter: "IPTV", network: "IPTV", mux: "pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1", hostname: "", username: "", client: ""
2014-11-19 20:27:52.837 iptv: stdin pipe unexpectedly closed: No data
2014-11-19 20:27:57.004 mpegts: pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1 - scan no data, failed
2014-11-19 20:27:57.004 subscription: 0005: "scan" unsubscribing

#13

Updated by Bernard DELAVILLE about 10 years ago

I did some tests, it's better, I think I am near ...
Here's log : http://pastebin.com/UkwbtHUf

Seam that tvh find a service, but the channel doesn't open in xbmc ...
A message in xbmc appears "No input detected"

#14

Updated by Piotr Kuchciak about 10 years ago

Why for me not search and not find ? Please help me.

#15

Updated by Jaroslav Kysela about 10 years ago

Try the command on the command line without pipe:// and remove "-loglevel fatal" using redirection for stdout to a file to check for errors. If it succeeds (file will contains the TS stream), you may try it in tvh.. Again, check examples in wiki:

https://tvheadend.org/projects/tvheadend/wiki/Custom_MPEG-TS_Input

#16

Updated by Bernard DELAVILLE about 10 years ago

Ok I'll give some tests this evening or on week-end ..
But, can you give me the right line to put into url with the stream informations given by VLC :
http://dl.free.fr/clO3F5fGF
and
http://dl.free.fr/tmePGO27t

Must I transcode or not ? ...

#18

Updated by Bernard DELAVILLE almost 10 years ago

Ok I tryed this url : pipe:///usr/bin/ffmpeg -i rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=1050&flavour=hd -vcodec copy -acodec copy -f mpegts pipe:1

and get this on log : http://pastebin.com/ZHiaxjBv

please help !!!

#19

Updated by Bernard DELAVILLE almost 10 years ago

So, after some hours of tests ... I stop here !
The only thing I've got is a very bad quality of video in xbmc stutering etc ... so it doesn't work for me.
The only change for me to read and record tv stream of my internet provider (free in france) with tvheadend and openelec/kodi would be that tvh have a native support of those streams (h264/mpeg4)
Until that, I'll have to put my playlist.m3u file into kodi which read great those streams. But no recording possibility and no EPG !
Regards,
beber

#20

Updated by Sam Stenvall almost 10 years ago

2014-11-22 08:14:39.524 [ ERROR]:spawn: [NULL @ 0xab3f60] Requested output format 'mpegts' is not a suitable output format
2014-11-22 08:14:39.524 [ ERROR]:spawn: pipe:1: Invalid argument

That is obviously the problem. Please try running the command directly in a terminal, replacing "pipe:1" with e.g. "out.ts". You'll need to wrap the source URL inside quotes, e.g. "http://blabla". For anyone else trying to get the stream working, it won't work unless you're on free.fr I assume (cause I can't play it).

#21

Updated by Sam Stenvall almost 10 years ago

I would also add the "-re" switch to the beginning of the command, e.g. "ffmpeg -re -i <source>"

#22

Updated by Bernard DELAVILLE almost 10 years ago

Ok I've got it !!!
with : /usr/bin/ffmpeg -i "rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=202&flavour=hd" -vcodec copy -acodec libfaac -f mpegts /home/beber/essai.ts

http://pastebin.com/mefi2BXE

IT DOES WORK !!! I'm very happy !
Just put the url into tvh last build and it works !!!

Just for the info the -re parametter doesn't work lost of frames lost ..

So now, my work is to make it work into OpenELEC ...
Thanks a lot ..

#23

Updated by Bernard DELAVILLE almost 10 years ago

In OpenELEC I've got "Requested output format 'mpegts' is not a suitable output format"
It seems that transcode or mpegts format is not activated in openelec ... I'm going to ask for help at OpenELEC forums ...

#24

Updated by Bernard DELAVILLE almost 10 years ago

Ok solved for me in OpenELEC by adding --enable-muxer=mpegts \ into ./configure section of ffmpeg's package.mk file.
I made a bug report to OE to ask the developpers to add this.

So all is Ok now for me, I can see and record channels of my iptv provider (free.fr) with Tvh.

Thanks a lot for this feature,
Regards,
Beber

#25

Updated by Adrien CLERC almost 10 years ago

I am the original author of the IPTV RTSP branch, and I have one good news, and one bad news.

The good news is that my patch seems stable enough to be working for more than 2 years, without any issue, except on HD channels.

The bad news is that since my branch (iptv_rtsp), everything change in TVH (and indeed, API is far better now). So my branch can't be applied anymore. I tried to have some time to work on this, but unfortunately, it's more difficult now.

RTSP integration into TVHeadend would be great, cause it makes channel switching really fast. And TVHeadend is the only PVR application that meets all need for watching and recording Freebox TV, without being a bloated software like MythTV.

I know it didn't help, but…

#26

Updated by Jaroslav Kysela over 9 years ago

  • Status changed from New to Fixed

I added very basic rtsp:// support to the IPTV code now. The code should allow to use rtsp:// urls, but the implementation is really basic - the Adrien's branch was more featured. Anyway, I'm closing this issue, open a new one if you find a bug.

#27

Updated by Piotr Kuchciak over 9 years ago

I added for example this url
http://194.116.252.129:4022/udp/239.239.2.27:1234

and try play by XBMC and have this i syslog:

2015-05-01 22:50:55.004 TS: IPTV Test/test/VOX: MPEG2VIDEO #167 Continuity counter error (total 1)
2015-05-01 22:50:55.004 TS: IPTV Test/test/VOX: TELETEXT
#71 Continuity counter error (total 1)
2015-05-01 22:50:55.230 TS: IPTV Test/test/VOX: MPEG2AUDIO @ #136 Continuity counter error (total 1)

Also available in: Atom PDF