Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chanshik/jsmpeg-stream-go
MPEG1 streaming demo with jsmpeg implemented by Go
https://github.com/chanshik/jsmpeg-stream-go
ffmpeg go golang jsmpeg mpeg streaming
Last synced: 12 days ago
JSON representation
MPEG1 streaming demo with jsmpeg implemented by Go
- Host: GitHub
- URL: https://github.com/chanshik/jsmpeg-stream-go
- Owner: chanshik
- Created: 2017-02-12T16:36:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-17T22:41:59.000Z (over 5 years ago)
- Last Synced: 2024-08-02T02:15:04.497Z (3 months ago)
- Topics: ffmpeg, go, golang, jsmpeg, mpeg, streaming
- Language: Go
- Homepage:
- Size: 45.9 KB
- Stars: 18
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
MPEG Streaming Demo with jsmpeg.js
==================================MPEG streaming demo with [jsmpeg.js](https://github.com/phoboslab/jsmpeg) implemented by Go
Setup build environment
-----------------------```
$ go get github.com/gorilla/websocket
$ go get github.com/gorilla/mux
$ go build
```Run
---Start streaming WebSocket and homepage server
```
$ go run stream-server.go
StreamServer parameters
SECRET: secret
IncomingPort: 8082
WebSocketPort: 8084
IncomingStreamHandler starting
Demo web page listening at port 8080
WebSocketHandler starting
```Start ffmpeg for incoming stream from iSight
```
$ ffmpeg -s 1024x576 -f avfoundation -i "0:1" \
-f mpegts -codec:v mpeg1video -b:v 800k -r 24 -framerate 24 \
-codec:a mp2 -b:a 128k -muxdelay 0.001 http://localhost:8082/secret
```On Linux using Video4Linux2 (v4l2)
```
$ ffmpeg -s 1024x720 -f v4l2 -i /dev/video0 \
-f mpegts -codec:v mpeg1video -b:v 800k -r 24 \
-framerate 24 -codec:a mp2 -b:a 128k -muxdelay 0.001 \
http://localhost:8082/secret
```Open the page http://localhost:8080