Streaming on Your Network
Outcome: one VLC, running as a server, sends a film over the network; a second program fetches it and what arrives probes as the film — and you know which parts of streaming this proves and which it doesn't.
Streaming is conversion with a
different last link. Chapter 8's chain
ended std{access=file,...}; a stream
ends access=http with an address and
a port where the stream can be
collected:
cvlc -I dummy --loop parade.mp4 \
--sout '#std{access=http,mux=ts,dst=127.0.0.1:18091/stream}'
Three choices inside that line each
deserve their word. --loop: a
server that reaches the end of a
12-second film and stops is a poor
server; looping keeps the stream up.
mux=ts: HTTP alone carries any
bytes, but a stream is best wrapped in
a container made for arriving piece by
piece — MPEG transport stream, ts,
the envelope broadcast television uses,
which a player can join in the middle.
The address: 127.0.0.1 is the
machine itself, and port 18091 is
this lab's assigned shelf — on your
network the address is the server's
own (192.168.1.20:8080 is the shape),
and the port is yours to choose above
1024.
The proof, from the client's side
A stream nobody fetched is a rumour.
The lab fetched it two ways (transcript
t05), while the server ran:
$ curl -s http://127.0.0.1:18091/stream --max-time 5 -o stream-capture.ts
-rw-rw---- 1 root root 542568 ... stream-capture.ts
$ ffprobe stream-capture.ts
codec_name=h264 codec_type=video width=640 height=360
codec_name=aac codec_type=audio
$ ffprobe http://127.0.0.1:18091/stream (the live URL, probed directly)
h264,video
aac,audio
Five seconds of asking collected
542,568 bytes; the probe names them
H.264 video at the fixture's 640×360
and AAC audio — the film, arriving as
a stream, joinable mid-flight exactly
as ts promises. (The transcript's
full probe output shows the same pair
twice, plus one small stream ffprobe
cannot name: the loop had already
restarted the film inside the capture,
which is --loop caught in the act.) And when the lab
stopped its server, the port was
checked again and found released —
because a streaming test you cannot
switch off is a service you have
accidentally started, and chapter 13
keeps that habit.
What this proves: VLC serves a real, standard stream over HTTP, and ordinary tools can drink from it. On a home network the client would usually be another VLC: Media → Open Network Stream, the same address. What it does not prove is reach beyond this machine: the lab's sandbox keeps everything on the one loopback address, so serving the whole house — firewalls, the router's opinion, Wi-Fi throughput — is documented behaviour, standard and reliable, but not something this lab's transcripts witness.
Transcoding while streaming
The chain composes, as chapter 2 said it would: put the transcode link back in front —
#transcode{vcodec=h264,vb=1000,acodec=mp3,ab=128}:std{access=http,mux=ts,dst=...}
— and the stream leaves the server in whatever format the receiving device prefers, converted live. That is how a modest machine in a cupboard feeds a television that speaks only one codec: the file stays as it is; the stream is translated. The cost is the processor doing chapter 8's work at playing speed, forever, for as many different streams as you ask for.
The other transports, honestly
VLC also speaks UDP and RTP — the older languages of streaming, including multicast, where one stream feeds many listeners on a wired network at no extra cost per listener. This lab used HTTP alone for a sandbox reason, not a VLC one: the sandbox blocks UDP sends outright, so no UDP stream could leave the lab's machine to be proved. On a home network those transports are ordinary documented VLC, and multicast to a roomful of wired devices is the one streaming trick HTTP cannot copy. What none of these should become without deliberate thought is a stream addressable from the public internet: a player serving your film collection to the world is a publishing decision, and chapter 12 counts it among the limits.