Alternative Live Video using MJPEG

Hey,

I just flashed AstroPi on my SD card and so far I’m liking it. However, coming from OctoPi, I’ve noticed the absence of a live camera feed in the monitor when on a mobile device (Safari on iPhone 6S, iOS 9.3.3, and Chrome on Kindle Fire HD, Android 5.1.1). Sure, there’s the still photo feature, but it’s not really the same as watching the print head hypnotically move back and forth.

I know that you guys implemented WebRTC for streaming, which I presume is awesome on the desktop (haven’t really used AstroPrint there yet), but coming from OctoPi and its MJPEG camera stream that worked flawlessly on both of my mobile devices, it seems like something of a step backwards feature wise. Until such a time that you can polyfill the missing browser functionality for streaming on mobile, would it be possible to have a MJPEG fallback for the unsupported browsers?

MJPEG is quite inefficient. It’s not really video, it’s a quick succession of JPEGs and it won’t work across networks. I don’t think we’d be supporting it officially alongside WebRTC. However I’ll give you an option to replace it on your Pi if you’d like. You will loose WebRTC support and the ability to see live video across networks though.

https://astroprint.zendesk.com/hc/en-us/articles/216985186-Alternative-Camera-System-for-Raspberry-Pi

1 Like

Thank you for pointing me to that! Since I typically don’t print when I’m away from my printer, losing WebRTC for the time being is an acceptable tradeoff for me.

1 Like

Excuse me guys, this thread seems to be MJPEG related right? I also have a related question. Recently, I got a video of MJPEG from someone else and it was from a cam i think. I could not open it with our common players like Windows Media Player and VLC. Then, I found a converter in the article “http://www.videoconverterfactory.com/tips/mjpeg-converter.html”. But here are the questions. I want to convert it to MP4 video format. however, I do not know how I can set the parameters. There are bit rate, resolution and frame rate. I want to know whether the higher bit rate and resolution are, the better output it will be? What is the difference between bit rate and resolution? I cannot figure it out just by googling. Another question is should I choose MPEG4 or H264 as the output video encoders, which one is better to choose?