How to transfer your images / files using VLC?

So, I know that there are many libVLC.dll wrappers. But I just don’t know what I’m ready to do, what I need ...

I just need to ...

  • in my C # program, I create a bitmap (once or twice per second) ...
  • Now I want to translate real-time bitmaps as video (in some VLC format can offer me) to some http: localhost: port / using VLC ...

How to do it?

+3
source share
2 answers

You need to use the following code to stream the image.

cd "C:\program files\videolan\vlc" 
vlc -I dummy fake:// --fake-file c:\1.jpg -vvv --sout #transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=std{access=udp,mux=ts,dst=localhost:1234}}
+5
source

You can use the NativeLibVlc.cs file, available on the VLC website.

   vlc.AddTarget("fake://", new string[] {":no-overlay", ":input-repeat=-1", 
                        ":vout-filter=adjust", ":fake-file=" + fileName.Trim(), ":fake-fps=1",
                        ":brightness="+50, ":fake-caching=100"} , ref playListId);

 vlc.Play(playListId);

- UPD 1234

cd "C:\program files\videolan\vlc"
vlc.exe -vvv --dshow-vdev="Logitech QuickCam Express / Go" dshow:// --sout #transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=std{access=udp,mux=ts,dst=localhost:1234}}

1234

cd "C:\program files\videolan\vlc" 
vlc.exe -vvv C:\filename.wmv --repeat --sout=#transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=std{access=udp,mux=ts,dst=localhost:1234}}

1234

cd "C:\program files\videolan\vlc" 
vlc -I dummy fake:// --fake-file c:\1.jpg -vvv --sout #transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=std{access=udp,mux=ts,dst=localhost:1234}}
+3

Source: https://habr.com/ru/post/1743369/


All Articles