2013-05-02 160 views
3

我正在使用VLC插件来运行rtsp流。这条河流很好。但我想将这些视频存储到文件目标。我使用这段代码但不起作用。使用axvlcplugin将rtsp视频流传输到文件

axVLCPlugin21.playlist.add("rtsp://192.168.10.222:554/h264", null, ":sout=#transcode{vcodec=theo,vb=800,acodec=flac,ab=128,channels=2,samplerate=44100}:file{dst=C:\\123.ogg,no-overwrite} :sout-keep"); 
    axVLCPlugin21.playlist.play(); 

此代码仅播放rtsp流但不存储。但是,可以使用相同的选项直接在VLC播放器上进行流式传输。

回答

0

VLC不通过插件支持流的记录。检查此Link

我得到了一个工作。我通过直接调用VLC来记录流。但是,玩家是隐藏的。我使用此代码:

Process.Start("C://Program Files//Videolan//VLC//VLC.exe","\"rtsp://xxx.xxx.xxx.xxx:554/h264\" --qt-start-minimized --sout=#transcode{vcodec=theo,vb=800,acodec=flac,ab=128,channels=2,samplerate=44100}:file{dst=C:\\123.ogg,no-overwrite}"); 
0

尝试使用此选项视频的存储和同步显示视频

原commad在VLC

%vlc path% vlc.exe -vvv rtsp://192.168.10.22:554/h264 :sout=#transcode{vcodec=theo,vb=800,acodec=flac,ab=128,channels=2,samplerate=44100}:duplicate{dst=file{dst=C:\\\\123.mp4},dst=display}:sout-keep 

玩,如果这个作品尝试使用

:sout=#transcode{vcodec=theo,vb=800,acodec=flac,ab=128,channels=2,samplerate=44100}:duplicate{dst=file{dst=C:\\\\123.mp4},dst=display}:sout-keep 

“:SOUT =#transcode {vcodec = theo,vb = 800,acodec = flac,ab = 128,channels = 2,samplerate = 44100}:file {dst = C:\ 123.ogg,no-overwrite}:sout-keep 也试图通过使用流媒体选项+ displaylocally + DST =文件

Refrence在VLC GUI工作:HowTo Receive and Save a Stream

+0

此选项也不起作用! – Vinshi 2013-10-31 13:28:46

+0

对我来说工作正常 – 2013-11-01 06:41:46

+0

我已经更新了答案尝试。 – 2013-11-01 11:05:27