summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStephan Holljes <klaxa1337@googlemail.com>2015-04-11 22:26:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-11 23:10:44 +0200
commitb51027fd18f63d91ea6413a5b73becdaeae7493a (patch)
treeb72a8ee2243ecc6cd332446de42d6ff9a17a7969 /doc
parentf944aeb07affc5d160b0d3dcbb6f7b54a0b1482e (diff)
downloadffmpeg-b51027fd18f63d91ea6413a5b73becdaeae7493a.tar.gz
libavformat/http.c: Make http-listen work as an input stream.
With this patch http can be used to listen for POST data to be used as an input stream. Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc')
-rw-r--r--doc/protocols.texi24
1 files changed, 23 insertions, 1 deletions
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 5b7b6cf255..f822d81223 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -279,7 +279,29 @@ Set initial byte offset.
Try to limit the request to bytes preceding this offset.
@item listen
-If set to 1 enables experimental HTTP server.
+If set to 1 enables experimental HTTP server. This can be used to send data when
+used as an output option, or read data from a client with HTTP POST when used as
+an input option.
+@example
+# Server side (sending):
+ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://@var{server}:@var{port}
+
+# Client side (receiving):
+ffmpeg -i http://@var{server}:@var{port} -c copy somefile.ogg
+
+# Client can also be done with wget:
+wget http://@var{server}:@var{port} -O somefile.ogg
+
+# Server side (receiving):
+ffmpeg -listen 1 -i http://@var{server}:@var{port} -c copy somefile.ogg
+
+# Client side (sending):
+ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://@var{server}:@var{port}
+
+# Client can also be done with wget:
+wget --post-file=somefile.ogg http://@var{server}:@var{port}
+@end example
+
@end table
@subsection HTTP Cookies