[FFmpeg-user] FFmpeg: how to output over HTTP
Moritz Barsnick
barsnick at gmx.net
Fri Mar 15 13:27:05 EET 2019
On Thu, Mar 14, 2019 at 17:22:54 -0400, Glenn W wrote:
> So far, while testing on my local network I am using these commands, which
> works, but uses TCP rather than HTTP. I need to use HTTP only.
That's a bit of an ambiguous statement. TCP is layer 3, HTTP is layer
7, and uses TCP underneath.
> `ffmpeg -re -i hq-video.mp4 -c:v libx264 -an -bsf h264_mp4toannexb -f
> mpegts -chunked_post 1 http://0.0.0.0:5558/mpegts`
Please always show us your complete, uncut console output together with
the command line.
I didn't know you could connect to 0.0.0.0- :-)
> Using Wireshark, I see that the output is being sent still over TCP, rather
> than HTTP.
I tried this:
$ ffmpeg -listen 1 -i http://localhost:8888/video -f null -
$ ffmpeg -f lavfi -i testsrc -t 1.55 -f mpegts http://0.0.0.0:8888/video
and my Wireshark tell me it's using HTTP:
> POST /video HTTP/1.1
> Transfer-Encoding: chunked
> User-Agent: Lavf/58.26.101
> Accept: */*
> Connection: close
> Host: 0.0.0.0:8888
> Icy-MetaData: 1
>
< HTTP/1.1 200 OK
< Content-Type: application/octet-stream
< Transfer-Encoding: chunked
<
> [... bin data follows]
Works perfectly for me.
Moritz
More information about the ffmpeg-user
mailing list