The VLC Kaiyuan project is quite powerful, and we can use it as a playback core for two development and as a high-performance streaming media server. This blog is mainly about using VLC to build a streaming media server.
VLC building the streaming server step is very easy: Select input data, select output format, select Encoder, select Liquidity. The input data source is very many, can be the local file, can be the network stream, can be the audio. Even pictures. The main choice of encoder selection is audio encoder, video encoder to determine the sound output quality and image quality. The output format is more, can be a local file, can be a network stream, can be multicast, liquidity is now reserved. There is not much use in practice.
Below I use the camera's RTSP stream as input, RTSP as the output example:
Select input data:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvemh1ntmwntq4odux/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">
Select the output format, select the Encoder, select the liquidity:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvemh1ntmwntq4odux/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvemh1ntmwntq4odux/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">
Click Stream to open vlc in the native or PC with a local area network, enter rtsp://(streaming IP): 8554 is able to play immediately, such as the following:
The command line for the above operation is:: sout= #transcode {vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:8554/}: Sout-all:sout-keep
Linux can use VLC-VVV command stream, details can input vlc-h query Help
Note two points: when streaming into a UDP stream. Increase the 192.168.66.11 you want to play, then. You should choose the output address is: 192.168.66.11, when playing on the 192.168.66.11 only need to enter the udp//@ (you choose the port number) to be able to play; If you have access to the same LAN, otherwise, either through NAT, Either through VPN access, but the principle is in the same LAN interview.
Using VLC to build streaming media server