[Solved] RTSP Video Stream problem

I am also interested in a fix as I am having the same issues as noted above by GG07.

@deejayspinz you can try my app to see if your camera is supported by Android.

I can view my camera in TinyCam on my Android unit. Your app seems to want an RTSP. I assume Blynk would aim to support more than that?

Most Android apps that play videos have extra magic that is not provided in the core Android module.

The app that I knocked up isn’t only rtsp and I have played mp4 over http.

What format is the url for your stream?

What codecs does VLC show?

As Dmitriy had written Blynk is not using any 3rd party libraries for video playback and rely only on default mediaplayer. All apps you have mentioned are using custom solutions for video playback (even RTSP Viewer which is using some custom c++ bindings for rtsp playback). Seems you video stream is not supported by default android’s MediaPlayer due to some reasons. In future we will try to incorporate google’s ExoPlayer into the app, which i think could fix most video formats support issue.

Also I need to mention that on some Android versions there were bugs with playback of videos without audio (@Dmitriy had such issue on his Lollipop Android device) - we tried to make some workarounds for them, but i’m not sure it was fixed for all cases, so you could try to add audio to you stream and re-check.

I’ve checked sent log, but seems I have no solution for your issue, as android’s mediaplayer is throwing UNKNOWN ERROR, so probably you need to try change something in your video stream: maybe several video streams are the reason of such behavior, but i’m not sure.

@BlynkAndroidDev @Dmitriy - Thanks for looking into this issue. Hopefully it’s gets sorted in future updates. It’s a great feature. It’ll be interesting to know what cameras are supported. I own 3 different brands of ip cameras all of which successfully stream via rstp in other apps just not in blynk :frowning:

We’ll work on a better video support, but after planned features.

ExoPlayer has great potential but it will currently break many more streams than it fixes. I recently built my own ExoPlayer for Android and the response time and quality of high end TV streams is excellent. I’ve never seen any player work as well as ExoPlayer for TV streams.

Unfortunately almost all the streams required by Blynkers will not work with ExoPlayer. It doesn’t support rtsp or mpeg-ts etc which are provided by millions of cameras around the world.

ExoPlayer is very lightweight with a basic apk coming in at less than 600Kb and the installed player from 1MB to 2MB depending which additional codecs you include.

RTSP can be made to work with ExoPlayer and I have asked if it can be added to the library. The maintainers are a little reluctant to add functionality for something they think is not a core requirement but there is certainly demand for it and we will see how it goes.

1 Like

Hey @Dmitriy @BlynkAndroidDev,

Just wondering if there’s been any movement on this issue? I’m keen to stream video within Blynk. Thanks fellas. G.

Hello. Rare widget. So - no. We have other high priority tasks.

OK, I just have to comment… it is likely a rarely used widget because it is so limited in it’s connectivity :wink:

Who wouldn’t want video to confirm or observe a distant IoT interaction? But it has to support a much larger range of formats, such as from a USB camera stream on a Blynk Local Server, or from something like YawCam, and all the different mjpeg based IP cams, etc.

1 Like

@Gunner with your Pi as the MCU rather than the server, a bit of javascript and existing Linux utilities you can have confirmation snapshots emailed to you via Blynk’s cloud server. As per one of our other posts it can also be done with the Omega’s. See screenshot below of our implementation.

All true… and if I was an app developer I could just make my own video viewer :smiley:

I was just commenting on how a nice simple, works-with-many-common-input-type-video-widget would likely become a much used item (for us non-coder types) instead of the current rare use one.

(Build it and they will come… and complain that it isn’t good enough :stuck_out_tongue: )

That all said… I like the look of what you have… and one of these days I will hit you up for more assistance with something like that of my own :wink:

PS, where are all the cute little pictographs hiding in my app? :wink: < rhetorical - I know you customized them.


@Gunner rhetorical or not, they are not customized. simply select emoji’s from your Smartphone keyboard.

1 Like

OK wow… Now that is a great tip!!.. :+1: Thanks, I never would have tried that.

All true… and if I was an app developer I could just make my own video viewer :smiley:

I was just commenting on how a nice simple, works-with-many-common-input-type-video-widget would likely become a much used item (for us non-coder types) instead of the current rare use one.

Yep, but it seems to become a task of custom video player’s implementation for blynk and it needs to much time.

For all in this thread:

I’ve tried to use VLC library for Android and created a test build: Dropbox - File Deleted - Simplify your life - 85Mb (+70 mb for regular blynk app)

It currently is not showing error message (if some error will happen), but plays all test rtsp and http live streaming urls i’ve tried. On project open it should show a small toast “VLC Video Supported” in case it is working. This build also supports logs - you need to open app’s about screen (info button on the projects list screen) and click on 'Send logs to developer" button.

1 Like

Thanks @BlynkAndroidDev I’ll give it a try. VLC plays most things so we could be on to a winner with this.

Yep, but +70mb is a huge cost.

Thanks @BlynkAndroidDev for making a move on this issue. I’ve given it a go but it just crashes on a Samsung s7 Edge. I’ve Uninstalled and reinstalled but still crashes.