Skip to content

Instantly share code, notes, and snippets.

@kmmndr
Last active December 28, 2015 14:19
Show Gist options
  • Save kmmndr/7513632 to your computer and use it in GitHub Desktop.
Save kmmndr/7513632 to your computer and use it in GitHub Desktop.
Icecast

Video streaming

Icecast

Generate video stream

ffmepg2theora + oggfwd

ffmpeg2theora /dev/video0 -V 600 --no-skeleton -K 8 --noaudio -f video4linux2 --inputfps 25 -x 960 -y 720 -o - | oggfwd 127.0.0.1 8000 PASSWORD /stream.ogv

vlc

cvlc v4l2:// :v4l2-fps=25 :v4l2-dev=/dev/video0 :v4l2-width=960 :v4l2-height=720 --sout "#transcode{vcodec=theo,fps=25,vb=800,width=960,height=720,acodec=none}:std{access=shout,mux=ogg,dst=source:PASSWORD@127.0.0.1:8000/stream.ogv}"

Stream clients

mplayer

mplayer -fs -nocorrect-pts -cache-min 50 -cache 5000 http://127.0.0.1:8000/stream.ogv

vlc

cvlc --fullscreen http://127.0.0.1:8000/stream.ogv

ffmpeg2theora + nc + mplayer

server$ ffmpeg2theora /dev/video0 --noaudio -f video4linux2 --inputfps 25 -x 960 -y 720 -o - | nc -l -p 4444
client$ nc 127.0.0.1 4444 | mplayer -nocache -vo xv -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment