Code: Select all
Vlc = new VideoLanClient(".", Options);
VlcPlayer = Vlc.NewMediaPlayer(VideoPanel.Handle);
string fileName = "C:\\www\\sound.mp3";
VlcMedia desc1 = Vlc.NewMedia(fileName);
desc1.AddOption(@":no-video");
desc1.AddOption(@":sout=#transcode{acodec=mp3,ab=128}");
desc1.AddOption(@":std{access=http,mux=dummy,dst=:4567/stream.mp3}");
VlcPlayer.Load(desc1);
VlcPlayer.Play();
Code: Select all
string[] Options =
new string[]{
@"--no-video",
@"--sout-transcode-acodec=mp3",
@"--sout-transcode-ab=128",
@"--sout-standard-access=http",
@"--sout-standard-mux=dummy",
@"--sout-standard-dst=:4567/stream.mp3"};
Code: Select all
AddOption("sout=#duplicate{dst=display,dst=std{access=file,mux=ts,dst=\"recording.ts\"}}")
Code: Select all
Options = new string[]{
//audio mp3
@"--no-sout-video",
@"--sout=#transcode{acodec=mp3,ab=128}:standard{access=http,mux=dummy,dst=:" + Port + "}"};
Code: Select all
string playerOutputConfig = @":sout=#transcode{vcodec=h264,acodec=mp3,vb=2000,scale=0.5,ab=48}:standard{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=c:\temp\stream.m3u8,index-url=stream-########.ts},mux=ts,dst=c:\temp\stream-########.ts}";
VlcMediaLibraryFactory factory = CreateVlcMediaLibraryFactory();
VlcSinglePlayer playerStream = (VlcSinglePlayer)factory.CreatePlayer(new PlayerOutput(playerOutputConfig));
try
{
playerStream.SetMediaInput(new MediaInput(MediaInputType.File, file));
playerStream.Play();
...
Return to “Development around libVLC”
Users browsing this forum: No registered users and 18 guests