Results 1 to 1 of 1
  1. #1
    xsdys's Avatar
    Join Date
    Apr 2017
    Gender
    female
    Posts
    33
    Reputation
    10
    Thanks
    3
    My Mood
    Angelic

    Question LibVLCSharp record while streaming

    Hi guys search high and low for an answer but still can't solve my issue. I even asked my teacher for help and he asked me to research harder?! Okay so I am trying to implement a record button into my LibVLC rtsp stream. The recording works but when i try to record it it only records the RTSP stream for 3 seconds and when it does the recording the stream stops completely. How do I make it stream continuously while recording the RTSP stream? The code is below. I'm still learning C# so please give me a chance! Really need you guys help as it is for a assignment! It is also in WPF Visual Studios format

    void RecordButton_Click(object sender, RoutedEventArgs e)
    {




    //string[] AddOptions = { ":sout=#duplicate{dst=display,dst=std{access=file, mux=asf,dst="D:\\My-Output-Video-Filename.asf"}}" };
    //VideoView2.MediaPlayer.Stop();
    //VideoView2.MediaPlayer.Dispose();
    //VideoView2.MediaPlayer = new LibVLCSharp.Shared.MediaPlayer(_libVLC);
    //var rtsp1 = new Media(_libVLC, VIDEO_URL, FromType.FromLocation);
    // var currentDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly(). Location);
    // var destination = Path.Combine(currentDirectory, "record.mp4");
    //rtsp1.AddOption(":sout=#file{dst=" + destination + "}");
    // rtsp1.AddOption(":sout-keep");
    // VideoView2.MediaPlayer.Play(rtsp1);

    //var currentDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly(). Location);
    //var destination = Path.Combine(currentDirectory, "record.mp4");

    rtsp1.AddOption(":screen-fps=24");
    rtsp1.AddOption(":sout=#transcode{vcodec=h264,vb=0 ,scale=0,acodec=mp4a,ab=128,channels=2,samplerate= 44100}:file{dst=record1.mp4}");
    //rtsp1.AddOption(":sout=#file{dst=" + Destination + "}");
    rtsp1.AddOption(":sout-keep");

    VideoView2.MediaPlayer.Play(rtsp1); // start recording

    //await Task.Delay(5000); // record for 5 seconds
    System.Threading.Thread.Sleep(5000);
    VideoView2.MediaPlayer.Stop(); // stop recording and saves the file



    }
    Last edited by xsdys; 06-07-2020 at 04:39 AM.

Similar Threads

  1. [WTT] Action! - Gameplay Recording and Streaming
    By BENQsenseye in forum Trade Accounts/Keys/Items
    Replies: 0
    Last Post: 05-26-2014, 08:55 AM
  2. Clean recording while using hacks ?
    By Mrdangula in forum Battlefield 3 (BF3) Hacks & Cheats
    Replies: 18
    Last Post: 08-17-2013, 05:09 PM
  3. [Request] Recording while using hacks(please help me please!)
    By TrollPlayer12 in forum General Game Hacking
    Replies: 3
    Last Post: 08-09-2013, 11:00 AM
  4. [Discussion] Recording While using the Navigator?
    By gnasher65 in forum DayZ Mod & Standalone Hacks & Cheats
    Replies: 9
    Last Post: 10-05-2012, 04:36 PM
  5. rankings: levels gained not being recorded while botting.
    By groovystar in forum Vindictus Help
    Replies: 2
    Last Post: 02-02-2012, 09:03 AM

Tags for this Thread