Re:Show HN: MaryJane – Mjpeg server in 30 lines of async Python
by andrewstuart on Thursday October 07, 2021 @11:04PM
(#28795282)
A fun thing to do might be have write on on demand video thumbnail player.
To do this you'd have a bunch of video files at the back end, specify which one you want in the URL, then get Python to run ffmpeg, extracting jpeg frames from the specified video and writing the frames to the ramdrive /dev/shm. As the user rolls the mouse over, some JavaScript changes the img tag to point to the mjpeg server and the video plays.
It should be possible to do this in only four or five extra lines I think.
See the github readme for the correct ffmpeg command line to do this.
I do wonder if there's a way to stream audio in sync.
Re:Show HN: MaryJane – Mjpeg server in 30 lines of async Python
by nemosaltat on Friday October 08, 2021 @10:46AM
(#28799902)
Also seems like a hacky way to get video to play on my Tesla browser. I could probably couple this with a Raspberry Pi and pipe the audio to Bluetooth for the speakers, then stream the video content from the Pi to a web server that I access through the Tesla browser.
I wrote this in Tornado a bunch of years ago. Where do you go next? What else could you do?