I am implementing a video streaming server with picamera (it is a requeriment), but i can't test it... I am executing this example for the server:
import socket import time import picamera with picamera.PiCamera() as camera: camera.resolution = (640, 480) camera.framerate = 24 server_socket = socket.socket() server_socket.bind(('0.0.0.0', 8000)) server_socket.listen(0) # Accept a single connection and make a file-like object out of it connection = server_socket.accept().makefile('wb') try: camera.start_recording(connection, format='h264') camera.wait_recording(60) camera.stop_recording() finally: connection.close() server_socket.close()
from the picamera web
On the client side, I am testing the server with VLC as it is explained on the web. The command is
In order to avoid network problems, I executed VLC on the Raspberry Pi but it doesn't work. I'm getting this error:
[0x18c78f0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. [0x1ab0ba0] main input error: Invalid PCR value in ES_OUT_SET_(GROUP_)PCR ! [0x1b68548] xcb_xv vout display error: no available XVideo adaptor [swscaler @ 0x1b76060] No accelerated colorspace conversion found from yuv420p to rgb565le. [0x1abf618] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?) [0x1abf618] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?) [0x1abf618] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
I tried to change the format (to mjpeg) but it seems to be an incorrect format.