Comments (4)
Tried to get this working with a non-pro Kiyo I had sitting around and couldn't get MJPG -> NV12 -> H264 to work (seems like the RPI can't decode 1080p MJPG?), but the hardware H264 encoder on the camera was flawless.
Flipped the Kiyo Pro over to hardware H264 and I still see corruption, but now it's clearly dropped frames post-encoder rather than corrupted frames getting fed into the encoder (instead of a tear line, I see smeared motion and such). My guess is that the USB3 controller on the RPi is having trouble and dropping frames between the camera and the RPi?
I modified the read loop to look like this:
try:
if not camera.sleeping:
camera.request_key_frame()
cameraSleeper.add_client()
mp4_writer = MP4Writer(self.wfile, config.width(), config.height(), config.timescale(), h264parser.sps, h264parser.pps)
desired_frame_time = 1.0 / 30.0
frame_start = time()
while True:
nalus, frame_secs, frame_usecs = h264parser.read_frame()
read_done = time()
mp4_writer.add_frame(nalus, frame_secs, frame_usecs)
frame_end = time()
frame_time = frame_end - frame_start
if frame_time > 2 * desired_frame_time:
print("long frame: ", frame_time / desired_frame_time, " read: ", (read_done - frame_start) / desired_frame_time, " write: ", (frame_end - read_done) / desired_frame_time)
frame_start = frame_end
except Exception as e:
cameraSleeper.remove_client()
self.log_message(f'Removed streaming client {self.client_address} {e}')
... and I see a steady stream of long frames that are 2-4 times the desired frame time, with nearly all the time spent waiting on the frame from the camera.
from fmp4streamer.
The Kiyo Pro firmware has issues. Sometimes it doesn't set the USB EOF bit and it causes delays on Linux. I opened tickets at Razer, but they only care about Windows. I tried with a Pi on USB2, it worked with YUYV in lower resolution/lower framerate. I don't have a Pi with free USB3 port yet.
from fmp4streamer.
Hilariously, there's actually an available firmware update for my camera (1.00 -> 1.05) which claims to have Fixed an issue where the image lags or freezes intermittently
. Unfortunately, the updater utility tells me "To proceed with the update, please contact Razer Support" and from searching around, it sounds like Razer shipped an early hardware revision that can't take the firmware update and has to be replaced.
I'm torn between making Razer send me a replacement and just never buying any of their products again, but either way, this doesn't seem to be anything solvable in fmp4streamer.
Thanks!
from fmp4streamer.
Just wanted to confirm here in case anyone else uses one of these cameras - on the most recent firmware (1.05), this issue no longer occurs and my Kiyo Pro works fine with fmp4streamer.
If you have this problem, follow the instructions at https://mysupport.razer.com/app/answers/detail/a_id/4582
If the firmware updater refuses to update your camera, post in Razer's forums or message a member of their support team and they'll open an RMA to replace your camera.
from fmp4streamer.
Related Issues (15)
- Add audio from USB microphone HOT 3
- Clarify with examples of some popular webcams
- ERROR:root:/dev/video0 H264 format not available with RPi 4 and RPi Camera V2 HOT 1
- Trouble when starting fmp4streamer HOT 3
- Port 80 unusable?
- Piping h264 video stream to stdout HOT 3
- Latency HOT 2
- Allow camera to be turned on/off HOT 1
- getting error whenever trying to stream through raspberry pi HOT 11
- Error HOT 13
- IP Camera Adapter HOT 1
- Logitech C920 no H264 on Pi Zero W HOT 5
- ISO 14496 HOT 2
- ERROR:root:/dev/video0 H264 format not available HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmp4streamer.