MaryJane MJPEG server in < 30 lines Python

MaryJane is a simple MJPEG server written in Python.

Live demo of MaryJane

Project status:

Created 6 Oct 2021 by Andrew Stuart andrew.stuart@supercoders.com.au

License: MIT

You are welcome to post questions in the github issues but don't expect an answer - I may or may not be interested in reading/fixing issues.

How to use it:

To display an mjpeg stream on a web page, just put the address in an image tag:

<img src="http://18.116.60.15:8080/maryjane/"/>

How it works:

The server loads the same jpeg file from the file system and sends it to the web browser.

It does this continuously.

That's pretty much it. It's less than 30 lines of code - have a look.

It is the responsibility of something else to keep replacing that file with the latest frame in the video stream.

For example, the following command reads frames from a video file and constantly replaces the output filename with the current frame:

ffmpeg -y -re -stream_loop -1 -i monster-family-2-teaser_h480p.mov -f image2 -update 1 /dev/shm/img.jpeg

::...
免责声明:
当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
内容版权归原作者所有;
本人对内容的有效性/合法性不承担任何强制性责任.
若有不妥, 欢迎评注提醒:

或是邮件反馈可也:
askdama[AT]googlegroups.com


订阅 substack 体验古早写作:


点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

关注公众号, 持续获得相关各种嗯哼:
zoomquiet


自怼圈/年度番新

DU22.4
关于 ~ DebugUself with DAMA ;-)
粤ICP备18025058号-1
公安备案号: 44049002000656 ...::