Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Video Streaming
#1
Video 
Hi guys, i´m new here, first post. not native speaker.

I came here to ask for opinions.
I have the following project to develop: Play a stream(mjpeg) in the browser and be able to perform the following operations: pause the video, move backwards and forwards.

What i have:
- I have the software that streams the video in mjpeg. It was developed by someone else and cannot be changed. This software provides endpoints(urls)


requirements:
- The player must be in the browser.

Any advices or sugestions?
Reply
#2
Quote:requirements:
- The player must be in the browser.

You could use JavaScript: https://videojs.com/guides/embeds/
There are many other existing projects, which do the same.
It's not possible with Python because the Video-Player lives in the DOM, where Python has no access to.
Python could deliver the HTML code with Flask.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#3
Video Js does not support mjpeg =(

For the functions play/pause/forward/backward i need a buffer, so front end? or server side?

I cant find any player who supports mjpeg
Reply
#4
Video Js does not support mjpeg smash karts
Reply
#5
Then you've to transcode the whole material or find something, which can play mjpeg.

On-The-Fly Transcoding on the server is also possible, but it eats up your CPU/GPU on the server.

Here is a tutorial how to create a stream-server with Flask which uses mjpeg: https://blog.miguelgrinberg.com/post/vid...with-flask
But, this does not include any control. No pause, forward/rewind etc.

I'm not confident how the control of regular Videos in Browser is made, but there must be a mechanism to address a frame-number or a timestamp.
I would not say that this is impossible with mjpeg. I think it's the Range keyword in the Header, which gives the web server the info where to start.

Do you have an online resource of a mjpeg-Video you want to show?
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create an audio streaming platform like YouTube Robk 1 2,296 Aug-21-2023, 11:49 PM
Last Post: Skaperen
  Live cameras streaming itskv 1 1,857 Jul-08-2019, 06:27 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020