[mp3 @ 0xe6b3c0] Header missing

asked 2017-07-16 16:31:14 -0500

henrique lobato gravatar image

Im trying to get some pictures with facedetection with my raspberry with the code below

import cv2
import time

count = 0
faceCascade = cv2.CascadeClassifier('/home/pi/haarcascade_frontalface_alt.xml')
cv2.VideoCapture('http://***/videostream.cgiuser=**&pwd=**&resolution=32&rate=0')

while True:
 ret, frame = video_capture.read()

 gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

 faces = faceCascade.detectMultiScale(
    gray,
    scaleFactor=1.1,
    minNeighbors=5,
    minSize=(30, 30),
    flags=cv2.CASCADE_SCALE_IMAGE
)

 for (x, y, w, h) in faces:
    cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 2)
    file_name = '/home/pi/faces_detected/frame%s_%s.png' %(count, str(time.time())[11:])
    cv2.imwrite(file_name, frame)
    count += 1

 if cv2.waitKey(1) & 0xFF == ord('q'):
    break

when I run with python, i got the error several times

[mp3 @ 0xe6b3c0] Header missing
[mp3 @ 0xe6b3c0] Header missing
[mp3 @ 0xe6b3c0] Header missing
[mp3 @ 0xe6b3c0] Header missing
[mp3 @ 0xe6b3c0] Header missing

I do not use any audio on the code, why I got this error?

edit retag flag offensive close merge delete