Help setting up RTSP stream for Android

Hi,

is there any helpful reference or tutorial on how to set up an RTSP Stream that will work for the android version of Xibo?

The way i understand it, you can set up an stream on your local network using VLC (unicast, transcoding for android) and then use the “Local Video” module to display it using the rtsp:// link - unfortunately, this doesn’t work the way it should for now. I’m not sure if the problem is in the stream we have set up or in the Xibo region…

The tutorials and blogs i found online were not specific enough, or the hardware setup was completely different.

Is there some place you can point us to? Some Do’s and Don’ts maybe?

Thanks in advance

Sundance

It needs to be a unicast RTSP stream with a codec that Android can display - ie webm or H264. Multicast streams are not supported as Android has no support for it.

Beyond that it’s just a case of entering the stream URL in the Local Video module as detailed here:

I think probably the next step if that doesn’t work is to detail what you have done (ie how you have your stream setup and what the Android device does).

Yes, i used the information to set up my stream, but it doesn’t work (screen stays black on android system, layout is being displayed though).

Here is how i set up my stream in VLC (on a Win7 machine in the same local network):

  1. Stream - Use a local mp4 file as a test-streaming file
  2. 1200ms caching
  3. Add RTSP Stream (Port: 8554 … Path: / )
  4. Activate Transcoding (Preset: “Video for Android HD” (uses MP4 / H264)
  5. VLC generates the following code output:

:sout=#transcode{vcodec=h264,vb=2000,venc=x264{profile=baseline},width=1280,height=720,acodec=mp3,ab=192,channels=2,samplerate=44100}:rtp{sdp=rtsp://:8554/} :sout-all :sout-keep

6.Add IP to of my machine to the code (DHCP)
7. Link is now: rtsp://192.168.xxx.xx:8554/
8. In Xibo, i added a “Local Video” and used the rtsp link above

Could a firewall or something else be causing problems or is my general approach wrong somewhere?

I’m aware that this might not be a Xibo issue - so i’m grateful for any help in setting this up… thanks!

Sundance

Certainly if your Windows PC is running with the firewall on that could be preventing the player connecting to VLC’s stream. Have you tried turning the firewall on your Windows PC off to test?

You could also try using an existing stream URL:
rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov

Does that one work?

2 Likes

Alex, thanks for your help…

I added your rtsp and it works with sound only, displaying the following error in the log:

Cannot display video. Uri=rtsp://192.168.xxx.xx:8554/. What=1. Extra=-2147483648.

The previous log-entries display the same error - i also tried disabling the firewall, but it still doesn’t work.

Log shows:

Error in Register: null

Any ideas what i’m doing wrong? Could the encoding preset be wrong - or do i have to check some special settings within my network?

Thanks in advance for any help and/or suggestions - much appreciated!!

EDIT: The “Error in Register” displayed when working with my former rtsp link without a firewall - not with your external link.

What device is this? That stream is correctly formatted for Android with H264 encoding so should work. The error logged is the Android OS telling us that it isn’t able to decode the video stream which suggests your device is missing that capability.

Error in Register: null just means that the last time the Player tried to connect to the CMS there was a connection error (perahaps a wifi dropout etc). It will retry on the next collection, so unless it stays like that over an extended period then that’s nothing to worry about.

In this example, i’m using an Amazon FireTV - H264 is exactly the kind of encoding the FireTV can use… i played back mp4 h264 files before, so it shouldn’t be a problem. I have no other device to test this right now, but i could try if it persists.

Is there anything else or any other way i could stream to the Xibo Client app?

Thanks again, alex

It really depends how the firmware on the device interacts. You say the FireTV can definitely play these files, but if the Amazon video player on the device uses its own codecs rather than ones built in to Android then the statement you make isn’t true at all.

I don’t have availability at the moment to test this, but I did write the guide with RTSP streaming from an H264 CCTV camera and that works fine, as can be evidenced from the screenshots in the guide.

When I get a chance I’ll try with a VLC stream and let you know the settings I use.

I’m not sure if the FireTV provides the same sort of core media support that stock Android provides - this may be the root cause of your problem.

I’m well aware that the Fire TV is not exactly the supported kind of android device - but i was assuming that if the playback of a file on the device works fine, the streaming of the exact same file should work as well. My bad…

I will try to find out which codecs can or can’t be use and how to possibly circumvent this problem - i will report back as this might be helpful for other users.

Thanks a lot @alex and @dan for the information - if anything turns up, i’d be happy if you let me know!

No problem - it is an obvious thing to assume and we wish it were the case!! We hope to spend some time soon writing a new video player component which tries to provide more consistent support across devices (or at the very least some more reasonable error messages!). Unfortunately it is often the case that the actual decoding has to be done by the hardware and therefore support has to be in the firmware (including extraction from the container, be that file or stream, etc).

1 Like

I’m excited to see the new development on this - if i can be of any help testing, let me know.

Is there any other way - for the moment - to stream live tv, maybe using an embedded iframe? I find it hard to get the right information on the web…

Thanks again

Hi @SundancePioneer

I explored a lot of options for live TV but I found that embedding a live YouTube feed is one of the best options.

It allows you to control many factors such as video quality, subtitles etc.

Sky News streams live TV through YouTube which is what I’m using currently on one of my displays.

Hope this helps
Sam

Hi @solane - thanks a lot for the heads up… Unfortunately, the live streaming capability is currently not fully available in Germany, due to license restrictions.

I will have this in mind as a possible solution though… thank you!

Ahh shame it doesn’t work in Germany!

Here’s a link to another possible solution: https://github.com/xibosignage/xibo/issues/363

More complicated than just embedding a stream as it requires you to setup a separate Linux server, take a look.

Sam

2 Likes