45clouds / homebridge-ip-camera

IP camera plugin for homebridge
50 stars 7 forks source link

Add setting parameter to change the vcodec #23

Open mabrodeur opened 6 years ago

mabrodeur commented 6 years ago

It would be nice to be able to set the vcodec in the config.json directly. On the raspberry pi we can use the h264_omx codec and we get way better fps. I managed to make it work by changing it directly in the ffmpeg.js file but it would better to have it in the config.json file.

I could make the change but I do not know how I could make a pull request on your code @45clouds.

elkorleone commented 6 years ago

can you explain how did you change the config json?

mabrodeur commented 6 years ago

As of now, you cannot change it in the config.json as the setting is not available. For now how I did it was to go into the node_modules folder where the homebridge-ip-camera is installed and edit ffmpeg.js file, line 236, change libx264 for h264_omx

ThomPatterson commented 5 years ago

Being able to change the codec, or maybe even just exposing more of the ffmpeg CLI options (https://ffmpeg.org/ffmpeg.html#Stream-specifiers-1) would be very beneficial!