moritzmhmk / homebridge-camera-rpi

raspberry pi camera plugin for homebridge
MIT License
159 stars 29 forks source link

Poor image quality #44

Open mentaluproar opened 5 years ago

mentaluproar commented 5 years ago

I compiled the latest ffmpeg on the zero w with hardware encode support. I got everything set up and the latency is incredibly low. It’s very impressive but the image quality is horrid. It looks like what would happen if you kept saving a JPEG of a JPEG. The compression is far too high.

Is there an option somewhere where I could tune this? I know I can stream much higher quality images equally fast with RPI cam web interface so I’m assuming there is just a really conservative default somewhere I can change.

moritzmhmk commented 5 years ago

Is this issue specific to the latest version of ffmpeg? Or do you experience bad image quality with the prebuilt image as well?

mentaluproar commented 5 years ago

This is a link to a screen cap of my build. Prebuilt has the same problem.

https://youtu.be/p0EslUyGKpw

moritzmhmk commented 5 years ago

Ok that is the same quality I get. If you want a higher quality you will need to increase the bitrate. You could hardcode a higher value in this line.

mentaluproar commented 5 years ago

MUCH better! I dropped in a value of 5000000 and it's crystal clear. There's no latency or frame rate loss. I can't get the Apple Watch to use it now though, even though I see it's automatically using a the right settings for the watch.

magnip commented 5 years ago

.

jonerikandersen commented 5 years ago

How did the codepiece look like @mentaluproar ?