mirror of
https://github.com/rendies/People-Counting-in-Real-Time.git
synced 2025-05-14 18:09:29 +07:00
fix: use ffmpeg rtsp
This commit is contained in:
parent
556f2f3c70
commit
cd7a2cdc57
|
@ -34,13 +34,13 @@ def counter():
|
|||
global people_count
|
||||
return jsonify([ 1000, 980, 700, 500, 670, 567, people_count ])
|
||||
|
||||
@app.route("/video")
|
||||
@cross_origin()
|
||||
def video_feed():
|
||||
# return the response generated along with the specific media
|
||||
# type (mime type)
|
||||
return Response(generate(),
|
||||
mimetype = "multipart/x-mixed-replace; boundary=frame")
|
||||
# @app.route("/video")
|
||||
# @cross_origin()
|
||||
# def video_feed():
|
||||
# # return the response generated along with the specific media
|
||||
# # type (mime type)
|
||||
# return Response(generate(),
|
||||
# mimetype = "multipart/x-mixed-replace; boundary=frame")
|
||||
|
||||
def open_ffmpeg_stream_process(height, width):
|
||||
# args = (
|
||||
|
@ -343,7 +343,7 @@ def PeopleCounter():
|
|||
writer.write(frame)
|
||||
|
||||
# show the output frame
|
||||
with lock:
|
||||
# with lock:
|
||||
ffmpeg_process.stdin.write(frame.astype(np.uint8).tobytes())
|
||||
|
||||
# outputFrame = frame.copy()
|
||||
|
|
Loading…
Reference in New Issue
Block a user