Coder Social home page Coder Social logo

Comments (8)

jiekechoo avatar jiekechoo commented on June 5, 2024 1

I think your http mjpeg stream not respect web standards

It's my fault. The boundary is wrong. I have fixed it.

from go2rtc.

AlexxIT avatar AlexxIT commented on June 5, 2024

There is no any errors in your logs. mp4 and webrtc doesn't support JPEG codec

from go2rtc.

jiekechoo avatar jiekechoo commented on June 5, 2024

I have a MJPEG stream with url: http://192.168.1.1/hello , I can play in web browser. How to use go2rtc transfer to stream for clients?

from go2rtc.

jiekechoo avatar jiekechoo commented on June 5, 2024

media_server | 11:46:16.351 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="multipart: wrong boundary: ����[�\x7f�\x1fg_\/�����k��,���\x0f��\x00ڕم���yG�_��X�=���q[���\x00��W��_���/�\v���W���~-��^��\x03W���..-�������?�_�\x7f�W��\x00� ���\x17~\r�l�m\x1f��/��\[��\x00\n" url=http://192.168.1.1/hello

from go2rtc.

jiekechoo avatar jiekechoo commented on June 5, 2024

I upgrade go2rtc to v1.9.0, the MJPEG source could read, but got WRN:

media_server  | 12:20:45.889 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="multipart: wrong boundary: /���\x00�o....."

and, the MJPEG server got lots of connections:

2024/05/05 12:20:39 Stream: 192.168.1.11:46258 connected
2024/05/05 12:20:39 Stream: 192.168.1.11:46262 connected
2024/05/05 12:20:39 Stream: 192.168.1.11:51328 connected
2024/05/05 12:20:39 Stream: 192.168.1.11:51330 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51340 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51352 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51356 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51366 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51382 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51396 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51404 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51406 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51416 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51422 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51436 connected
2024/05/05 12:20:40 Stream: 192.168.1.11:51440 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51448 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51462 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51476 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51482 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51492 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51504 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51520 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51522 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51532 connected
2024/05/05 12:20:41 Stream: 192.168.1.11:51546 connected

from go2rtc.

AlexxIT avatar AlexxIT commented on June 5, 2024

I think your http mjpeg stream not respect web standards

from go2rtc.

jiekechoo avatar jiekechoo commented on June 5, 2024

thanks for your help

from go2rtc.

AlexxIT avatar AlexxIT commented on June 5, 2024

You shouldn't set content-type: image/jpeg for mjpeg stream

case ct == "image/jpeg":
return mjpeg.NewClient(res), nil

You can remove it, so magic source will try to guess type

case bytes.HasPrefix(b, []byte{0xFF, 0xD8}):
return mjpeg.Open(rd)

from go2rtc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.