Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
adding http server example
  • Loading branch information
raulpy271 committed Oct 30, 2020
commit 15ffcc0c7275443e2c4f13e3e4a9ebd6dd5503dc
26 changes: 26 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,32 @@ process2.wait()
)
```

## Stream from a local video to HTTP server

```python
video_format = "flv"
server_url = "http://localhost:8080"

process = (
ffmpeg
.input("input.mp4")
.output(
server_url,
codec = "copy", # use same codecs of the original video
listen=1, # enables HTTP server
f=video_format)
.global_args("-re") # argument to act as a live stream
.run()
)

```

to receive the video you can use ffplay in the terminal:

```
$ ffplay -f flv http://localhost:8080
```

## Stream from RTSP server to TCP socket

```python
Expand Down