Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a websocket livestream demo #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicholashaydensmith
Copy link

I created a new demo that uses a really simple python2.7 tornado server that live streams the h265 video via binary websocket. I'm really interested in this project.

Get tornado with 'pip2 install tornado'. Then just start the demo by visiting localhost:8080. This will initialize a websocket connection that will stream the video via websocket for a given chunk size and fps (hard coded in the lib right now). Still needs some work, maybe some api for fps that the client app can control. When I got this up and running I got excited and wanted to share, but it arguably still needs a bit of work. It doesn't properly flush the video and seems to lag when run unbounded (fps > processor can decode). I've just set the fps to 30 for now. Maybe a pull request is premature, but thought it would be nice to get a second set of eyes on this sooner than later. Is this something you guys would be interested in accepting if I polished it up?

@jalowin
Copy link

jalowin commented Apr 13, 2016

Hello, I am trying view my live streaming in your demo page but dont work

I run with change the port to 1955

python livevideoserver.py

and then with ffmpeg
ffmpeg -re -i Vídeos/Big\ Hero\ 6.mkv -f hevc -c:v nvenc_hevc -b:v 200k -r 30 -s 640x480 http://localhost:1955

or

ffmpeg -re -i Vídeos/Big\ Hero\ 6.mkv -f hevc -c:v libx265 -b:v 200k -r 30 -s 640x480 http://localhost:1955
Where is my error?

Thanks for all

Best regards

@cochiachang
Copy link

cochiachang commented Apr 10, 2023

this demo is worked for me
But @jalowin I am not sure why you need push stream by ffmpeg? from this demo, it seems load from a local file "spreedmovie.hevc"
this demo access hevc data from websocket, so you must need open http://localhost:8080/ to access streaming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants