MaryJane is a simple MJPEG server written in Python.

Overview

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 [email protected]

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:

">

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

You might also like...
Simple Python / ImageMagick script to package images into WAD3s for use as GoldSrc textures.
Simple Python / ImageMagick script to package images into WAD3s for use as GoldSrc textures.

WADs Out For [The] Ladies Simple Python / ImageMagick script to package images into WAD3s for use as GoldSrc textures. Development mostly focused on L

Simple to use image handler for python sqlite3.

SQLite Image Handler Simple to use image handler for python sqlite3. Functions Function Name Parameters Returns init databasePath : str tableName : st

Wand is a ctypes-based simple ImageMagick binding for Python
Wand is a ctypes-based simple ImageMagick binding for Python

Wand Wand is a ctypes-based simple ImageMagick binding for Python, supporting 2.7, 3.3+, and PyPy. All functionalities of MagickWand API are implement

A simple python script to reveal the contents of a proof of vaccination QR code.

vaxidecoder A simple python script to reveal the contents of a proof of vaccination QR code. It takes a QR code image as input, and returns JSon data.

GTK and Python based, simple multiple image editor tool
GTK and Python based, simple multiple image editor tool

System Monitoring Center GTK3 and Python3 based, simple multiple image editor tool. Note: Development of this application is not completed yet. The ap

Simple Python package to convert an image into a quantized image using a customizable palette
Simple Python package to convert an image into a quantized image using a customizable palette

Simple Python package to convert an image into a quantized image using a customizable palette. Resulting image can be displayed by ePaper displays such as Waveshare displays.

Gaphor is the simple modeling tool
Gaphor is the simple modeling tool

Gaphor Gaphor is a UML and SysML modeling application written in Python. It is designed to be easy to use, while still being powerful. Gaphor implemen

MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets.

MyPaint A fast and dead-simple painting app for artists Features Infinite canvas Extremely configurable brushes Distraction-free fullscreen mode Exten

A simple programming language for manipulating images.

f-stop A simple programming language for manipulating images. Examples OPEN "image.png" AS image RESIZE image (300, 300) SAVE image "out.jpg" CLOSE im

Comments
  • Mixing sync and async apis?

    Mixing sync and async apis?

    Cool project! Thanks for sharing.

    I haven't done much async Python but it looks like you are using syncronous apis within async code which blocks the event loop. AFAIK the core file apis in Python are sync. At least on node.js in this would be a bad practice.

    https://github.com/bootrino/maryjane/blob/a1d7a3376a7a03e195e31221f473beeea33b895f/mjpegserverpython.py#L27-L28

    I think you should use some async version of open()/read() 🤔

    opened by esamattis 1
  • response.stream no more works in Sanic v22.9.0

    response.stream no more works in Sanic v22.9.0

    Error message: return response.stream(stream_mjpeg, content_type='multipart/x-mixed-replace; boundary=frame') AttributeError: module 'sanic.response' has no attribute 'stream'

    opened by goldbingo 6
Owner
bootrino
netboot for cloud servers
bootrino
Simple Python image processing & automatization project for a simple web based game

What is this? Simple Python image processing & automatization project for a simple web based game Made using only Github Copilot (except the color and

SGeri 2 Aug 15, 2022
Dynamic image server for web and print

Quru Image Server - dynamic imaging for web and print QIS is a high performance web server for creating and delivering dynamic images. It is ideal for

Quru 84 Jan 3, 2023
display: a browser-based graphics server

display: a browser-based graphics server Installation Quick Start Usage Development A very lightweight display server for Torch. Best used as a remote

Szymon Jakubczak 205 Oct 17, 2022
Gallery written in Python to manage your photos

GalleryMan Gallery written in Python to manage your photos Installation

Asian Cat 24 Dec 18, 2022
a lite weight photo editor written in python for day to day photo editing!

GNU-PhotoShop A lite weight Photo editing Program (currently CLI only) written in python3 for day to day photo editing. Disclaimer : Currently we don'

Kunal Sharma 5 May 30, 2022
Samila is a generative art generator written in Python

Samila is a generative art generator written in Python, Samila let's you create arts based on many thousand points. The position of every single point is calculated by a formula, which has random parameters. Because of the random numbers, every image looks different.

Sepand Haghighi 947 Dec 30, 2022
Py3D - A 3d rendering engine written entirely in python

Py3D is a 3d rendering engine written entirely in python. It is a simple and eas

1up Community 2 Nov 14, 2022
Raven is a tool written in Python3 allowing you to generate an unique image with some text.

?? Raven is a tool written in Python3 allowing you to generate an unique image with some text. It does it by searching the text on Google, do

Billy 39 Dec 20, 2022
The ctypes-based simple ImageMagick binding for Python

Wand Wand is a ctypes-based simple ImageMagick binding for Python, supporting 2.7, 3.3+, and PyPy. All functionalities of MagickWand API are implement

Eric McConville 1.2k Dec 30, 2022