Closed rpnoll1977 closed 3 years ago
Using a Reolink PT camera and ffmpeg on the command line as the client, i got an error message about missing boundary
Expected boundary '--' not found, instead found a line of n bytes
I wasnt's able to cure this using command line switches, so I changed this part to deliver content-length information to make it work.
def frame_generator(): while True: camera_stream_manager.update_last_accessed_timestamp(name) frame = queue.get() output = io.BytesIO() frame.save(output, 'JPEG') len = output.tell() output.seek(0) yield (b'--frame\r\n' b'Content-Type: image/jpeg\r\nContent-Length: ' + str(len).encode() + b'\r\n\r$ return Response(frame_generator(), mimetype='multipart/x-mixed-replace; boundary=frame')
Hi, i added the Content-Length header to the stream response. Can you tell me if the problem is fixed on the current develop branch?
problem fixed, thank you
Thanks for the help.
Using a Reolink PT camera and ffmpeg on the command line as the client, i got an error message about missing boundary
I wasnt's able to cure this using command line switches, so I changed this part to deliver content-length information to make it work.
def frame_generator(): while True: camera_stream_manager.update_last_accessed_timestamp(name) frame = queue.get() output = io.BytesIO() frame.save(output, 'JPEG') len = output.tell() output.seek(0) yield (b'--frame\r\n' b'Content-Type: image/jpeg\r\nContent-Length: ' + str(len).encode() + b'\r\n\r$ return Response(frame_generator(), mimetype='multipart/x-mixed-replace; boundary=frame')