I have VLC 2.0.6 installed and am using a Vivotek MD8562/8562D camera.
I have an implemention using VlcDotNet to record a RTSP stream from an IP Camera, but cannot get some desired features to work. When I connect to the camera with a pre-configured sdp file, everything works correctly:
_media = new LocationMedia("rtsp://192.168.2.105/live.sdp");
However if attempt to provide stream configuration details, as below (which defined the desired resolution, frame rate and video quality), I run into problems.
_media = new LocationMedia("rtsp://192.168.2.105/liveany.sdp?codectype=h264&resolution=1280x720&h264_ratecontrolmode=vbr&h264_quant=99&h264_qvalue=38&h264_maxframe=5");
After 10 seconds of the video buffering completing, I get the following messages in the log:
0c07dba8] live555 demux warning: no data received in 10s, eof ?
[0c080ea8] main input debug: EOF reached
[0c063148] main decoder debug: removing module "packetizer_h264"
[0c063148] main decoder debug: killing decoder fourcc `h264', 0 PES in FIFO
[0c06c6d0] main stream output debug: removing a sout input (sout_input:0c0cf5b0)
[0712da10] mux_mp4 mux debug: removing input
[0712da10] main mux warning: no more input streams for this mux
[0c07dba8] main demux debug: removing module "live555"
Opening connection to 192.168.2.105, port 554...
[0c080ea8] main input debug: Program doesn't contain anymore ES
It seems similar to a post I found on the
VideoLan Forum Post
So I tried to use the same solution, and altered the StartupOption to include --rtsp-tcp, but still with no success.
VlcContext.LibVlcDllsPath = CommonStrings.LIBVLC_DLLS_PATH_DEFAULT_VALUE_AMD64;
VlcContext.LibVlcPluginsPath = CommonStrings.PLUGINS_PATH_DEFAULT_VALUE_AMD64;
//Set the startup options
VlcContext.StartupOptions.IgnoreConfig = true;
VlcContext.StartupOptions.LogOptions.LogInFile = true;
VlcContext.StartupOptions.LogOptions.ShowLoggerConsole = true;
VlcContext.StartupOptions.LogOptions.Verbosity = VlcLogVerbosities.Debug;
// Disable showing the movie file name as an overlay
VlcContext.StartupOptions.AddOption("--no-video-title-show");
VlcContext.StartupOptions.AddOption("--no-audio");
VlcContext.StartupOptions.AddOption("--rtsp-tcp");
VlcContext.Initialize();
In order to save the the video stream to file I also include this option in the LocationMedia object:
_media.AddOption(":sout=#transcode{}:std{access=file,mux=mp4,dst=" + filepath + "}");
The RTSP stream is provided in H.264 format, which is what I want it saved in so no transcoding is necessary. Anyone got any ideas as to why this would work correctly for the live.sdp stream but not the liveany.sdp stream?
I can provide the full log details if that would help.
Thanks,
Brian