Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSTREAM ERROR when running microscope stream #21

Open
cheapjack opened this issue May 15, 2019 · 9 comments
Open

GSTREAM ERROR when running microscope stream #21

cheapjack opened this issue May 15, 2019 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@cheapjack
Copy link

Sorry to bug @ajlennon but keep getting this error after about a second after initialising Pi Cam on my microscope streamer. Worked fine a few weeks back. Ive made new restream keys etc but cants seem to resolve error... hope u well :)

heres a still to prove pi cam works and some images of the scope prototype ;) (the red ring is because I used red PLA as a material for the microscope which the strong light source penetrates and you can see )

Defaulting to PiCam
No audio capture available
Pipeline stream:
rpicamsrc keyframe-interval=2 hflip=true vflip=true ! omxh264enc  !  video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! flvmux streamable=true name=mux ! queue ! rtmpsink location='rtmp://10.0.31.212/live/ live=1 flashver=FME/3.0%20(compatible;%20FMSc%201.0)'
GST ERROR (gerror=GLib.Error('Could not open resource for writing.', 'gst-resource-error-quark', 6), debug='gstrtmpsink.c(245): gst_rtmp_sink_render (): /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0:\nCould not connect to RTMP stream "\'rtmp://10.0.31.212/live/ live=1 flashver=FME/3.0%20(compatible;%20FMSc%201.0)\'" for writing'

test_image2
cab1

@cheapjack cheapjack added the bug Something isn't working label May 15, 2019
@ajlennon
Copy link
Member

Never a chore when it's you @cheapjack ! That error you post indicates to me that it isn't able to connect to wherever it's trying to send the RTMP stream (10.0.31.212) could that be the problem?

@ajlennon ajlennon self-assigned this May 16, 2019
@ajlennon
Copy link
Member

btw. That looks great! Can't wait to see it in person

@cheapjack
Copy link
Author

Well Ive configured the $AV_STREAM_URL value to my restream RTMP target url , but for some reason it keeps going to the default stream which has an actual IP address. Ive confirmed by echo $AV_STREAM_URL

Been trying to swap the the 'autodetect' address and the UK/EU address option also just like you show in the README.md still nothing ;(

All else I can think of it's 'cos im on a uni eduroam so maybe rtmp is blocked? I'm setup on that like this and internet works fine. Will have to ask IT bods maybe but id rather not have to. Ill try setup on a different network and test like my mobile hotspot

cheers!

@ajlennon
Copy link
Member

ajlennon commented May 16, 2019

Humm. How are you running this? Using Balena or locally on your own install?

Can you try changing this line to default to what you want as a short term fix?

https://github.com/DynamicDevices/makespacelive/blob/master/stream.py#L19

[Edit: If the IP displayed is wrong I doubt it's related to EduRoam]

@cheapjack
Copy link
Author

Hmm running on my own install on the pi... ill try that when im back in next week. Forgot to leave it on last night so I could ssh in!! Do you mean change to

STREAM_URL= os.getenv('AV_STREAM_URL','rtmp://live.restream.io/live')

Yeah seems no reason for it to be eduroam when i regularly connect to streams and restream itself loads up and streams fine on the pi on it....Need to make it work on eduroam though as want it to be a portable streamer that can work anywhere in the biology labs so it becomes a kit for the department not just my research (which is in a convoluted way, actually also the research)....

@ajlennon
Copy link
Member

That's interesting - that's not the line I gave you in the repo master branch. Are you using a different branch?

@ajlennon
Copy link
Member

The code snippet you gave has this target

rtmp://10.0.31.212/live/

That's what the line I gave you defaults to if for some reason the environment variable isn't set.

So it implies that somehow the environment variable isn't getting through to the Python script.

As a short cut just change the default to what you want it to be...

@cheapjack
Copy link
Author

cheapjack commented May 16, 2019

Ah got it, yes that's what I thought that would be the default if no env variable comes through i am on master branch, the line i quoted was what I thought you meant I should try change it to; Ill try changing the default to what im after.

Maybe Im not exporting paths properly? Ive got them in a ~/.bashrcbut also did it by export manually (am i doing that right?)

Maybe I should do a fresh image otherwise, just got a few configs didnt want to lose maybe I should have gone the resin route instead of the Standalone install...

Its all part of making this me/fool-proof :)

@cheapjack
Copy link
Author

Hey @ajlennon still same error. So I've changed the default in the stream.py code from this

STREAM_URL= os.getenv('AV_STREAM_URL','rtmp://10.0.31.212/live') to this STREAM_URL= os.getenv('AV_STREAM_URL','rtmp://live.restream.io/live') to see if that helps.

Also pulled from git so all up to date. Maybe we could think about it over lunch on thursday 30th Im free 1-2 if any good then any time after 5

I still feel it might be to do with eduroam but even switching to my mobile hotspot fails. Maybe Ill try a new restream identity or enquire with the IT people...

could it be to do with flash version. maybe need to apt-get update & upgrade
Still same error

Defaulting to PiCam
No audio capture available
Pipeline stream:
rpicamsrc keyframe-interval=2 hflip=true vflip=true ! omxh264enc  !  video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! flvmux streamable=true name=mux ! queue ! rtmpsink location='rtmp://eu-london.restream.io/live/ live=1 flashver=FME/3.0%20(compatible;%20FMSc%201.0)'
GST ERROR (gerror=GLib.Error('Could not open resource for writing.', 'gst-resource-error-quark', 6), debug='gstrtmpsink.c(245): gst_rtmp_sink_render (): /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0:\nCould not connect to RTMP stream "\'rtmp://eu-london.restream.io/live/ live=1 flashver=FME/3.0%20(compatible;%20FMSc%201.0)\'" for writing')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants