| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -214,6 +214,32 @@ process2.wait() | |||
| 214 | 214 | ) | |
| 215 | 215 | ``` | |
| 216 | 216 | ||
| 217 | + ## Stream from a local video to HTTP server | ||
| 218 | + | ||
| 219 | + ```python | ||
| 220 | + video_format = "flv" | ||
| 221 | + server_url = "http://127.0.0.1:8080" | ||
| 222 | + | ||
| 223 | + process = ( | ||
| 224 | + ffmpeg | ||
| 225 | + .input("input.mp4") | ||
| 226 | + .output( | ||
| 227 | + server_url, | ||
| 228 | + codec = "copy", # use same codecs of the original video | ||
| 229 | + listen=1, # enables HTTP server | ||
| 230 | + f=video_format) | ||
| 231 | + .global_args("-re") # argument to act as a live stream | ||
| 232 | + .run() | ||
| 233 | + ) | ||
| 234 | + | ||
| 235 | + ``` | ||
| 236 | + | ||
| 237 | + to receive the video you can use ffplay in the terminal: | ||
| 238 | + | ||
| 239 | + ``` | ||
| 240 | + $ ffplay -f flv http://localhost:8080 | ||
| 241 | + ``` | ||
| 242 | + | ||
| 217 | 243 | ## Stream from RTSP server to TCP socket | |
| 218 | 244 | ||
| 219 | 245 | ```python | |
| Back | FazBrowse Home | New Git URL |
0 commit comments