Using version 2.0.6 to capture an RTSP camera stream and display it in a C# WPF app.
Goal is to play the video on the app while recording it to file and to put a custom marquee on the video.
This is the order of instructions used (minus the marshalling of C# strings to byte arrays).
Code: Select all
string plugin_arg = "--plugin-path=" + pluginPath;
string[] arguments = { "-I", "dummy", "--ignore-config", "--no-video-title", "--sub-filter=marq", plugin_arg };
libvlc_instance_ = libvlc_new(arguments);
libvlc_media_player_ = libvlc_media_player_new(libvlc_instance_);
libvlc_media_player_set_hwnd(libvlc_media_player_, wndHandle);
libvlc_media = libvlc_media_new_path(libvlc_instance_, ""rtsp://@192.168.2.168");
// comment out call to libvlc_media_add_option and marquee works
// option = "sout=#duplicate{dst=display,select=video,dst='transcode{vcodec=xvid,vb=1800,ab=352,acodec=vorb,samplerate=44100,fps=25}:std{access=file,mux=avi,dst=\"c:\\temp\\test.avi\"}'}";
// libvlc_media_add_option(libvlc_media, option)
libvlc_media_parse(libvlc_media);
duration_ = libvlc_media_get_duration(libvlc_media) / 1000.0;
libvlc_media_player_set_media(libvlc_media_player_, libvlc_media);
libvlc_media_release(libvlc_media);
libvlc_media_player_play(libvlc_media_player_);
If I uncomment the code for libvlc_media_add_option, then I get the video stream recorded to the file but I see no marquee.
Without the add_option I have no file (of course) but the marquee works as expected on the rendered stream.
So both functionalities work - just not together. I can see video rendered with the marquee OR I see video rendered and it's saved to file - but no marquee.
Is this order of calls incorrect?
Note: the library version I'm using is x64.
I've tried the 32bit versions of both 2.2.0 and 2.0.6.
With 32bit 2.0.6 the results were the same as described above.
With 2.2.0 (both 64 and 32 bit) there is no video rendered and an output file size 0 bytes is produced.