Given below is the code to stream data using vlc. I want to save the stream. Doing that using GUI is straightforward. How to do it using the C program.
#include <stdio.h>
#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
int ch=system("start C:\\Users\\Administrator\\Desktop\\VideoLAN\\VLC\\vlc http://169.254.159.110/mjpg/1/video.mjpg --sout=\"#duplicate{dst=std{access=file,mux=ts,dst=stream.mp4},dst=display}");
}
I am able to record the stream now the only problem that remains is how to apply a codec to the saved video. Currently, 10 second video is taking about 1MB of space. I want to reduce that substantially. What do I do?