VLC is a cross platform program which allows you to play, record,
or stream audio and video to and from misc formats.
You can stream a DVD to the network as simply as you can record
the same DVD to an avi file. You can even convert a video to
a format your iphone can understand (mp4) in a few quick steps...
Here is an example to convert a file to mp4.
Click [Media]
Click [Streaming]
Select the video file to convert
Click [Stream]
Check [File] and enter a filename ending in .mp4
Select video codec [MPEG-4 Video] bitrate 512
Select audio codec [MPEG-4 Audio] bitrate 128
Click [Stream] and wait until it is finished.
If you would like to stream the video while you are converting
it to .mp4, you can simply check an additional Output in the
[Stream Outputs] section.
---
General Streaming Disadvantages
Bandwidth Usage:
The better the quality, the more the bandwidth.
Lost Streams:
Video stream are easily lost due to connectivity or bandwidth
saturation issues.
Plugins:
Firefox has plugins (including a VLC plugin), windows internet
explorer and mac safari have atleast some type of plugins for
video streaming. If you want to stream to a large audience,
you need to make sure the stream you select can be processed
by the largest amount of computers receiving your stream.
---
VideoLAN Manager is a small media manager designed to control
multiple streams with only one instance of VLC. It allows multiple
streaming and video on demand (VoD). Information on this feature
can be found here:
http://wiki.videolan.org/VLM
---
Newer version of ubuntu use a version of VLC which is crippled.
If you use a newer version of ubuntu and want to stream media,
do the following...
Important!!!
Do not install the restricted-extras package which is in the
main ubuntu repositories.
apt-get install libavcodec-unstripped-51
or if you have the latest version of ubuntu
apt-get install libavcodec-unstripped-52
this will remove
libavcodec-52
and replace it with
libavcodec-unstripped-52
Goto Medibuntu and add the repositories for your ubuntu version
https://help.ubuntu.com/community/Medibuntu
then install the following two packages
non-free-codecs
aacplusenc
note:
non-free-codecs will actually install w32codecs or w64codecs
depending on your hardware
---
Video and audio codec settings
If possible, stream the same format as the video is currently
in. If that is not possible, ogg/vorbis appears to be quick.
Video and audio codec settings for low bandwidth
(following text from http://wiki.maemo.org/Vlc)
Ensure that the "Video" checkbox is checked. Under "Codec"
drop-down menu, select "MPEG-2"; for bitrate, select 500 kb/s;
for scale, pick 0.5.
These settings are explicit to the video you are trying to
stream. Larger format video files (720p/1080p blu-ray movies,
etc) may need some tinkering, as the 0.5 Scale setting may be too
large to stream without dropped frames. For these, try 0.25.
For smaller videos, you may want to try setting scale to 0.75
or even 1.
The bitrate setting is dependent on your network environment.
1000 kb/s = 1 megabit, roughly. Wireless-B technology should
be able to stream 1 megabit throughout the average home,
although you may find that you have to decrease this number to
prevent framerate drop with larger format video files. 500 kb/s
is about average for a clean-looking video stream, and most wifi
networks will support this without issue.
Other Codecs to try are H264 - when you're transcoding from an
existing h/x264(3) source; and MPEG-4 if your file is an mp4
or m4v file to begin with.
Ensure that the "Audio" checkbox is checked. In the Codec
dropdown, choose "MPEG Audio"; for bitrate, choose "128 kb/s";
for channels,
choose "2". This took some tinkering. MP3 is of course the
standard audio format for most encoded video, however, without
a lengthy discussion on why the mp3 format isn't easily
transcoded without additional software on the computer - you
should choose MPEG Audio. This guarantees that the audio of
your file will get transcoded and streamed properly.
If you are trying to stream a video that has audio that needs
to be higher quality, change the bitrate to 320 kb/s, or any
multiple of 16 in the range. The 2 channel setting is self
evident. Two speakers, two audio channels.
---
VLC can be run in the "normal" application window, accessed via
telnet, http or even the iPhone.
VLC can also be run on the command line using CVLC. Syntax
statements can be cut/pasted from the "Generated stream output
string" as long as you use backticks.
i.e. cvlc file.avi ':sout=#transcode{acodec=vorb,ab=128,
channels=2}:duplicate{dst=std{access=http,mux=ogg,dst=192.168.10.
220:8080}}'
This is useful if the server does not have graphics, or if you
want to stream media using cronjobs.
---
Streaming a camera feed requires the name of the video and audio
device. In my case, I use /dev/video0 and /dev/dsp so the
command line syntax would be:
cvlc v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp"
:v4l-norm=3 v4l-frequency=-1 :v4l-caching=300 :v4l-chroma=""
:v4l-fps=-1.000000 v4l-samplerate=44100 :v4l-channel=0 :v4l-tuner=-1
:v4l-audio=-1 :v4l-stereo v4l-width=640 :v4l-height=480 :v4l-
brightness=-1 :v4l-colour=-1 :v4l-hue=-1 v4l-contrast=-1
:no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100 --sout
#transcode{vcodec=mp1v,vb=1024,scale=1,acodec=mpga,ab=192,channels=2}
:duplicate dst=std{access=file,mux=mpeg1,dst=192.168.10.220:8080}}"
---
You can use VLC to receive the stream or embed an html page.
Here is an example which directly calls the vlc plugin in
firefox.
Streaming Video
Play video
Pause video
Stop video
Fullscreen