Developing App to pull stream from cloud
AnsweredTrying to develop an app that request stream from relay.vmsproxy
Digest authentication passes fine
testing the m3u8 downloaded file works fine, when implementing the link to development environment, I get an a weird error:
"error": "The AVPlayerItem instance has failed with the error code -12971 and domain \"CoreMediaErrorDomain\".",
Cannot really find explanation for that, this error occurs on ios, searching the internet showed it might be an error regarding the format, and its compatibility to ios devices.
developing with react-native using expo-av library as a player
(other mp4/hls urls work fine)
-
Hello Kamal Agbaria,
Could you please share your code?
-
I indeed can,
the outcome of var: cameraURL is a fine url that I can view on VNC player, its a url with a calculated hash for digest auth with my user/password
other urls from demo m3u8 files work just fine.
import { Video } from "expo-av";<Videoref={video}style={styles.video}source={{uri:cameraURL,}}type="m3u8"useNativeControlsresizeMode="contain"shouldPlayonPlaybackStatusUpdate={(status) =>setStatus(() =>status)} //log status & errors/> -
I am developing a high scale app which according to plans will be spread world wildly
I would like to be contacted ASAP in order to implement a solution I am seeking.
with my previous knowledge with NX systems, I believe it will be best practice to implement it using NX solution.
I would like to discuss that further.
-
I performed the update as suggested.
I still have the same error as explained previously
"error": "The AVPlayerItem instance has failed with the error code -12971 and domain \"CoreMediaErrorDomain\".",
I have to mention that trying to load url locally (which is less relevant) loads the video for few seconds (similar to VLC's activity)
Sample hls url that works smoothly:
-
Tried to pull /media/ *.mp4 file for the live stream
I get a new Error
for iOS:
"error": "The server is not correctly configured. - The AVPlayerItem instance has failed with the error code -11850 and domain \"AVFoundationErrorDomain\".",
for Android:
"error": "h.f.c.d.q0.f0: None of the available extractors (e, g, i, e, g, e, d0, c, d, w, b, b) could read the stream.",
digging around points to a server error handling http byte range, as shown here:
https://stackoverflow.com/questions/33823411/avplayer-fails-to-play-video-sometimes
Eventhrough I think hls will fit more with more stable and smooth stream, I felt like sharing the progress with you.
-
Could anybody help here?We are discussing a high spread potential app
As much as this forum is appreciated, I would like to have answers ASAP, this thread was opened a month ago.
my experience with NX witness is making me stick with it as my solution, I was a technical support agent for your product in the past for one of your resellers aboard.
Is there any channel where I contact you directly ?
-
@...,
My colleague Andrey Terentyev is your man to talk to.
-
Kamal,
First.
Have you tried our example on github? Does it work with your cameras?
Second.
Could you provide with a simple web page on your test environment, please? Not just several lines of code.
-
Andrey,
As mentioned, I am developing a mobile app using react-native, and official Expo's Player that is tested with other hls urls that work just fine.
That means the html embedding solution is less relevant,
however, generating the auth key was taken from the above example ofcourse, and I can assure you it works fine since I test the URL in VLC.
2. I sure can attach github url but it will include credentials and secret keys, how safe is it to paste it here ?
-
I am still trying to figure out the issue here.
After tons of tests and researching, I am pretty sure the HLS url is not 100% supporting the platform I am trying to play the video on.
VLC is playing the generated URL fine now.
I think I've read somewhere that lack of data over the HLS stream can cause the errors I mentioned before.
For example, this HLS demo URL has live stream by akamai, and it works smoothly
I've tried several services online where I generate a new HLS url from the HLS url by yourrelay.vmsproxy.com URL, and they seem to work just fine.I think there should be a patch to fix the streams missing data, just in case.The problem is that I cannot provide a webpage for you since I am developing for iOS/Android native devices (using react native over Expo's enviroment)I've found myself looking for expensive services for online transcoding the stream for converting broken HLS streams to working HLS streams for ios devices and android, which is absolutely not an option to be implemented, it was for debugging only.I would appreciate if you contact me to schedule a remote session and try to fix this problem.We are developing a very wide spread app, where we expect 10,000 cameras to be attached within 1 year. -
Andrey seems to be away, last response was 6 days ago,
That frequency is not appropriate for a wide scale potential project as mine.
-
Update:
found stream analayzer by akamai
https://players.akamai.com/stream-validator
the generated url's data (by nx) lacks resolution information compared to the working m3u8 url I posted here previously.
the generated URL from nx
and the analyzed report says the following:
-
Hello,
Gentlemen,
As for now, as I can judge, taking this into account,
VLC is playing the generated URL fine now.
The issue is caused by your environment specifics (frameworks, codec packs, player etc). Unless we are not looking at the same code, the troubleshooting becomes extremely complicated.
Could you, please, create the simplest code example causing the issue and share the code?
We would try to reproduce the issue in our lab and investigated it.
-
Hey Andrey,
As I said before, the code contains sensetive data [password/etc], since its in development only,
share with me your email and I will share the private repo with you.
the framework I am working on is expo enviroment, the code is bein ran directly on iphone, embedded the generated URL, no backend envolved here except the ubuntu running the nx witness.
the usual m3u8 files contains multiple bitrates, as I have read in several forms, its Apple's condition for its compitiblity on iOS devices.
same happened when I tried to play the url on iphone's browser, compared to akamai's hls file which worked just fine.
Could we schedule a remote session/direct chat ?
-
-
Hi,
I passed the issue to our dev team.
Could you please check with the latest version 5.0 beta 5.0.0.34744 R7?
https://meta.nxvms.com/downloads/betas
Does the issue persist? -
Hello Kamal,
I've tried several services online where I generate a new HLS url from the HLS url by your
relay.vmsproxy.com URL, and they seem to work just fine.Could you please share a link to one of those services the url from which was working?
Have you tried to open the URL on your iOS device in Safari? Does it play?
-
Hey Andrey Terentyev,
Regarding your questions:
1. I installed the beta 5.0.0.34744 R7 you suggested, same format of m3u8 file, same file structure, no multi bitrate variants, and of course same error, (I understrood that apple is very strict regarding the information that should be in the hls file in order to play it on their devices).
2. I tried mux.com and https://api.video (commercial services that offer trial), of course it will not be implemented, it was for testing propuse.
3. I even tried <other_vms>, <other_vms> is a server software with high scaleability, connects onvif cameras and have the ability to stream HLS, their format works fine
4. on safari/chrome on iOS it doesn't work, stuck on loading.
-
Kamal,
2. I tried mux.com and https://api.video (commercial services that offer trial), of course it will not be implemented, it was for testing propuse.
I've tried several services online where I generate a new HLS url from the HLS url by your
relay.vmsproxy.com URL, and they seem to work just fine.Could you please elaborate what exactly have you done to generate an HLS url?
-
Could you check this url? Can you play video?
-
Could you please elaborate what exactly have you done to generate an HLS url?
They offer an api service for live streams, where you send a request with input URL (generated faulty HLS file we are discussing), and got out various of output urls.
I have to mention their services are very expensive and not designed to solve my issue here.
Could you check this url? Can you play video?
YES I can, through iOS browser (chrome & safari).
Please sign in to leave a comment.
Comments
36 comments