There is also a very simple :demux=dump :demuxdump-file=save_file.ts Simple, right? We are receiving an input from and UDP stream and saving it into the save_video.ts file So, why we are not using FFmpeg? Here is the reason. We are using VLC to receive, but I am going to describe both FFmpeg and VLC.įfmpeg -i udp://192.168.2.10:1234 -c copy save_video.ts At the end we are streaming over UDP (like IPTV, although IPTV is over Multicast, we have Unicast) to the destination IP 192.168.2.10 and destination UDP Port of 1234. We are using a container format of MPEG TS because are network is lossy. We have a crf of 23 to target a certain quality and strict experimental because the codec is very new and under heavy development. So, here we have an input file, we encode it using the libx265 codec, with the ultrafast preset(the fastest possible, because we are encoding live). There is also an option to encode the video and stream it at the same time(live encoding), but you need a powerful computer in order to do it. This way we are just streaming the video, not encoding it which in our case is very useful because our computer is not powerful enough. The speed of the stream is defined with -re which tells FFmpeg to stream at the speed as the video would be playing(FFmpeg default setting is to stream as fast as possible). Here, we are copying the video(-c copy) and streaming over UDP to the destination 192.168.2.10:1234. So, we already encoded the video files and now we want to stream them.
Stream video with vlc how to#
Recently we described how to encode using FFmpeg. Here, we are going to describe how to stream and receive with FFmpeg and VLC.