We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
objective write video output using ffmpegcv
steps pip install -U rtsp ffmpegcv
pip install -U rtsp ffmpegcv
code
import rtsp import ffmpegcv url = 'http://clausenrc5.viewnetcam.com:50003/nphMotionJpeg?Resolution=320x240' # aspect ratio = 4:3 client = rtsp.Client(rtsp_server_uri = url, verbose = False) output_file = 'rtsp_ffmpegcv_time.mp4' vidout = ffmpegcv.VideoWriter(output_file, None, pix_fmt = 'bgr24') i = 0 while i <= 9: frame = client.read(raw = True) vidout.write(frame) i += 1 client.close() vidout.release()
result
AttributeError Traceback (most recent call last) [<ipython-input-29-fc5430a80232>](https://localhost:8080/#) in <cell line: 11>() 12 frame = client.read(raw = True) 13 ---> 14 vidout.write(frame) 15 16 i += 1 [/usr/local/lib/python3.10/dist-packages/ffmpegcv/ffmpeg_writer.py](https://localhost:8080/#) in write(self, img) 65 height = int(height_15 / 1.5) 66 else: ---> 67 height, width = img.shape[:2] 68 self.width, self.height = width, height 69 self.in_numpy_shape = img.shape AttributeError: 'NoneType' object has no attribute 'shape'
best regards
The text was updated successfully, but these errors were encountered:
import rtsp client = rtsp.Client(rtsp_server_uri = url, verbose = True) i = 0 while i <= 9: frame = client.read(raw = True) print(frame) i += 1 client.close()
result sometime return numpy array sometime None but the same code on first post is work well when using vidgear to write the output video
Sorry, something went wrong.
No branches or pull requests
objective
write video output using ffmpegcv
steps
pip install -U rtsp ffmpegcv
code
result
best regards
The text was updated successfully, but these errors were encountered: