0

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?

praxmon
  • 5,009
  • 22
  • 74
  • 121
  • I think that you try to record stream from vlc. See first some related questions, like http://stackoverflow.com/questions/16633707/how-to-save-video-stream-using-vlc-in-commandline and http://stackoverflow.com/questions/18013503/capture-video-from-vlc-command-line-with-a-stop-time – Mihai8 Jan 27 '14 at 11:46
  • @user1929959 I want to record the stream only. And I read that, based on the answer, trying to keep my command simple I tried to make the and its not working. – praxmon Jan 27 '14 at 11:50
  • This is not really a C++ question, and it definitely isn't a C question. – JBentley Jan 27 '14 at 12:19

0 Answers0