Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

[mp3 @ 0xe6b3c0] Header missing

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?