AlexxIT/go2rtc · error

ivideon: can't get live_stream

Error message

ivideon: can't get live_stream: %s

What it means

ivideon.Producer.GetLiveStream received a JSON response from the Ivideon API where the Success flag was false, meaning the API rejected the live-stream request; the API's Message string is embedded in the error. The URL is only returned on a successful response.

Solutions

  1. Read v.Message embedded in the error — it carries the API's specific reason (auth failed, camera not found, etc.).
  2. Verify the camera ID and that the camera is online in the Ivideon dashboard.
  3. Check/refresh the Ivideon API credentials (email/API key) used to build the Producer.
  4. Confirm the account subscription permits live streaming for that camera.
  5. Retry later if the message indicates a temporary camera-side issue.

Example fix

// before
producer := &ivideon.Producer{CameraID: "cam-123", Email: email, Password: pwd}
// after: validate camera ID and creds, and surface Message
url, err := producer.GetLiveStream(media)
if err != nil {
    log.Printf("ivideon live stream failed (check camera id/creds): %v", err)
    return err
}
Defensive patterns

Strategy: try-catch

Validate before calling

// before calling: ensure config has camera id and credentials
if camID == "" || apiKey == "" { return errors.New("ivideon camera id and api key required") }

Try / catch

url, err := producer.GetLiveStream(media)
if err != nil {
    if strings.Contains(err.Error(), "can't get live_stream") {
        log.Printf("ivideon API said: %s", err) // Message is embedded
        return fallbackStream
    }
    return err
}

Prevention

When it happens

Trigger: Calling GetLiveStream (directly or via Dial) against the Ivideon API when the camera/producer is offline, the camera ID is wrong, credentials are invalid, or the account has no streaming rights.

Common situations: Expired or invalid Ivideon API credentials; camera ID typo; camera unpowered/disconnected; subscription lacking live-stream access.

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07). Data as JSON: /api/errors/e0dd27e7d93b0e4c. Report an issue: GitHub.

Appendix: source

Thrown at pkg/ivideon/ivideon.go:81

			"/live_stream?op=GET&access_token=public&q=2&video_codecs=h264&format=ws-fmp4",
	)
	if err != nil {
		return "", err
	}

	var v struct {
		Message string `json:"message"`
		Result  struct {
			URL string `json:"url"`
		} `json:"result"`
		Success bool `json:"success"`
	}
	if err = json.NewDecoder(resp.Body).Decode(&v); err != nil {
		return "", err
	}

	if !v.Success {
		return "", fmt.Errorf("ivideon: can't get live_stream: " + v.Message)
	}

	return v.Result.URL, nil
}

func (p *Producer) Start() error {
	receivers := make(map[uint32]*core.Receiver)
	for _, receiver := range p.Receivers {
		trackID := p.dem.GetTrackID(receiver.Codec)
		receivers[trackID] = receiver
	}

	ch := make(chan []byte, 10)
	defer close(ch)

	ch <- p.buf

	go func() {

View on GitHub (pinned to c245815e75)