@mountbaldy (Joseph Gill) posted a new topic, subject "OH3 Webcam Stream with Motion". It read:

   I dug through the wiki on here and found multiple posts about IP cameras and a few on webcams. I have spent hours scouring the web and now I hope someone may be able to help here. I currently have my webcam streaming over a URL just fine (http://317.600.2665:8081/).
    
    I am using a RPI 3B running OH ver 3 with a USB logitech webcam. I can view the stream from the URL just fine from a web browser (not through openhab). I have no idea what format is being used here. I have tried multiple attempts to use the IP Camera binding with my URL but I seem to be failing. The “Thing” will show up connected but with no feed (everything is NULL).
    
    Has anyone here implemetned a webcam in Openhab using Motion?
    
    All I'm after is to post a snapshot from my webcam. I am not interested in only posting during motion. A live feed would be great. One single picture would also work.
    
    Any advice is appreciated!
    
    Cheers,
    
    Joe

To which @kristofejro (Kris) replied

    I don't know if it will help you but you can use mjpeg stream on the sitemap.
    [code] 
        Video url="http://317.600.2665:8081" encoding="mjpeg"
        
    [/code]
    
    It does not require any binding.

@matt1 (Skinah) replied

    As @kristofejro wrote you can display the video stream directly if it is in mjpeg format which it most likely is. This should be preferred as the stream will not pass through the openhab server and go from camera to the viewing device.
    
    To get it working in the binding, give your URL as the ffmpeg input, then
    [code] 
        ffmpegInputOptions="-f mjpeg"
        
    [/code]
    
    That will tell ffmpeg the stream is in mjpeg format. You can then create gif, record to mp4 and some of the other features.

After which, @mountbaldy (Joseph Gill) added

    @kristofejro @matt1 Thanks!  
    Any idea on how to accomplish this using OH3? I'm willing to try anything.
    
    I did take a peek at this post and MAY have a work around. I won't know for a bit though.
    
    OH3 Widget: Building a camera widget UIs
    
    > Sorry to drop into your thread (and it is a cross post), but I'd appreciate some advice on how to simply add a URL (http://192.168.xxx.xxx/api/camera/snapshot?width=1280&height=960) to a Image Item I've created in the OH3 UI. [OH-ImageType] I've had a play with “Add Metadata” --> “Image Card” as follows and the image does appear when I put in the URL but goes back to the Grey Box after I hit save. [OH-ImageType2]

After which, @kristofejro (Kris) added

    I think by OH3 you mean with MainUI. (you can achieve this with traditional sitemaps of course - Sitemaps | openHAB)
    
    I have never tried do it with MainUI but I would go this way:
    
    Go to Administration → Pages  
    
    
    on the bottom right clik plus sign and choose “Create layout”  
    
    
    Give it a label and choose a layout style.  
    
    
    3774×433 26.9 KB
    
    Then add masonry
    
    Then click plus sign to choose template  
    
    
    41158×462 11.9 KB
    
    5487×571 4.92 KB
    
    7652×650 10.9 KB
    
      * Done
      * Save
    
    
    
    Try to play with it maybe it will help you.

To which @matt1 (Skinah) replied

    Search this forum for OH3 camera widget.


{'source': 'discourse', 'url': 'https://community.openhab.org/t/oh3-webcam-stream-with-motion/119993', 'title': 'OH3 Webcam Stream with Motion', 'views': 1290, 'has_accepted_answer': False, 'word_count': 481, 'like_count': 0, 'reply_count': 1, 'participant_count': 3, 'posts': 6, 'tags': '', 'author': '@mountbaldy (Joseph Gill)', 'participants': '@mountbaldy (Joseph Gill), @kristofejro (Kris), @matt1 (Skinah)', 'image_url': [None], 'created_at': '2021-04-01T03:55:42.625Z', 'last_posted_at': '2021-04-06T20:13:24.997Z'}