On Saturday, November 29, 2025 at 4:02:49 PM UTC-8 Russell Harris wrote:

Thanks, I shall experiment with ffmpeg. But I also need a guide: 


https://www.google.com/search?q=ffmpeg+take+still+from+usb+camera and look 
at the AI-generated results at the top.   It might be as simple as 
essentially the first answer there of the following.

ffmpeg -f video4linux2 -i /dev/video0 -vframes 1 output.jpg

John's reply earlier in this thread suggesting "
/dev/v4l/by-id/usb-0c45_USB_camera-video-index0" is almost certainly 
incorrect for your unique setup, but there should be a similar device name 
on your system for the camera.  You can probably find the camera under 
/dev/<something>/by-id if you don't get a generic /dev/video0 device 
created by the os.  It might be under /dev/serial/by-id possibly.


= how to prevent conflicts between ffmpeg and weewx 


The two cannot conflict, so you don't have to do anything to prevent that.


= how to upload the sky images (can weewx handle this?) 


Simplest way is to write your image(s) to somewhere under a weewx-generated 
directory you already upload.  I do this with a cron job that runs 
periodically  with a slightly different ffmpeg command since I'm using a 
network camera.

timeout 60 ffmpeg <your_ffmpeg_options_here> /var/www/html/weewx/webcam.jpg 
2>/dev/null

Just to explain, the method above sets a 60-seconds timeout for the ffmpeg 
command to complete (to guard against the command hanging for some reason) 
and throws away error messages as well.   On my system, I write to 
/var/www/html/weewx as an example only.  Your setup might be different.

ffmpeg has a 'lot' of options.  Take the defaults when you can rather than 
getting too slick.

 

= how to cause alysonwonderland.org to display the sky images (right 
now, visiting alysonwonderland.org automatically causes display of the 
weather data) 


You add an <img> link to the desired .tmpl template file in whatever weewx 
skin you are using.  Which file you need to add a line to depends on which 
skin you're using and where you want the image to appear on that page.  You 
might need to set it to be located in a particular place on the page, or 
have a particular size, etc.

See 
https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Structuring_content/HTML_images
 for 
details.
 

I am computer-literate, but also a bit old and slow. 


Google and the Google Groups search capability here can help a lot there :-)


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/f9bd9c6e-1adb-4614-a616-8f5ea3970f0bn%40googlegroups.com.

Reply via email to