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

2 Likes

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