-
Notifications
You must be signed in to change notification settings - Fork 126
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
Failed to start streaming: invalid argument #475
Comments
Hey @johnscode, |
yes. using raspi-config, legacy camera support was enabled for this. |
I have the same issue trying to run the |
I've also just started getting this error. I suspect underlying Pi camera driver must have automatically updated because my Go service was working with the camera stream until my Pi was rebooted a couple days ago. The camera stream works fine on my laptop so I think this issue is probably at a lower level than Pion. I will report any further findings here. |
(UPDATE - Please see RPi Forum post here: https://forums.raspberrypi.com/viewtopic.php?t=369927) FWIW, I recently updated libcamera (and rpicam-app), and now I get: whenever I've changed the cropping width/height away from the default. For example, Has anyone had a similar experience? |
Your environment.
What did you do?
Trying to run the jpeg snapshot example from the main Readme:
import (
"image/jpeg"
"os"
)
func main() {
stream, _ := mediadevices.GetUserMedia(mediadevices.MediaStreamConstraints{
Video: func(constraint *mediadevices.MediaTrackConstraints) {
// Query for ideal resolutions
constraint.Width = prop.Int(640)
constraint.Height = prop.Int(480)
},
})
}
example runs fine on OSX. runs to completion on pi when substituting the test drivers in the imports, ie
//_ "github.com/pion/mediadevices/pkg/driver/camera"
_ "github.com/pion/mediadevices/pkg/driver/videotest"
attempt to run using
go run main.go
What did you expect?
successful run producing a jpeg file
What happened?
panic failure at line 28
error is occurring due to the line:
stream, _ := mediadevices.GetUserMedia( ....
If i change it to check the error:
stream, err := mediadevices.GetUserMedia( ....
if err != nil {
fmt.Printf("%+v\n",err)
return
}
error reported is: 'Failed to start streaming: invalid argument'
If I run (with the real driver imported) using: export PION_LOG_DEBUG=all && go run main.go
i get output showing several configurations that match the constraints, with final one shown being 'best fit':
================ Best Fit ================
DeviceID: b1a30cff-6365-4313-9c8f-e96fd5cadee0
Video:
Width: 640
Height: 480
FrameRate: 0
FrameFormat: UYVY
Audio:
ChannelCount: 0
Latency: 0s
SampleRate: 0
SampleSize: 0
IsBigEndian: false
IsFloat: false
IsInterleaved: false
then the error
Should point out that this is using an onboard pi camera and not a usb camera.
fwiw:
the onboard camera is accessible using the standard libcamera apis (in cpp).
the blackjack webcam lib works for usb cams on a pi, but not the onboard cam
The text was updated successfully, but these errors were encountered: