Page 1 of 1

Need help in streaming using libVLC on VC++ on windows 7 64

Posted: 17 Jan 2015 20:52
by arifali
Hello,
My ultimate goal is to stream a video and consume the stream on HTML5 viewer.
I tried streaming using VLC media player and streamed to a OGG file, I used same OGG file in a HTML5-Video tag and it worked.

Now I want to do the streaming part using libVLC instead of VLC media player.
I want to stream the video file to File or memory stream.

I have found this sample https://wiki.videolan.org/Stream_to_mem ... _tutorial/

BUt unsure of how to get started ?
1) Where do i get the libVLC.dll, libVLC.lib, libVLC.h , Is there any sample visual studio that has everything setup and I can straight begin to write the code using libVLC etc.

2) Since libVLC is said to depdend on 200+ other libraries/modules/plugins, what will I have include and distribute with my application ?
http://www.enjoythearchitecture.com/vlc ... cture.html
https://wiki.videolan.org/Contrib_Status/

3) streaming format : above example seems to stream into PCM format, cant I get it stream in some format that has better codec and regonized by HTML5 ?
For example when i tried using VLC media player , my options were as following
:sout=#transcode{vcodec=theo,vb=800,acodec=vorb,ab=128,channels=2,samplerate=44100}:file{dst=C:\\Users\\testUser\\stream-output.ogg,no-overwrite} :sout-keep

Re: Need help in streaming using libVLC on VC++ on windows

Posted: 18 Jan 2015 08:03
by Jean-Baptiste Kempf
1) VLC normal 7z has all the files.

2) libvlc.dll, libvlccore.dll and the plugins/ folder

3) you can use the same string in libvlc

Re: Need help in streaming using libVLC on VC++ on windows

Posted: 18 Jan 2015 17:57
by arifali
Thanks a lot Jean.
Yeah with 7z I was able to get through the compilation, link and launch of sample programs.
Was able to get the instance of VLC.

Re: Need help in streaming using libVLC on VC++ on windows

Posted: 20 Jan 2015 03:37
by Jean-Baptiste Kempf
Cool.

Re: Need help in streaming using libVLC on VC++ on windows

Posted: 20 Jan 2015 10:46
by arifali
I am trying to stream a Mp4 file to a webm file.
After that I am reading this file chunk by chunk and feeding it to HTML5 viewer (video tag of html 5 viewer)

in order to stream from MP4 file webm file I have had three options

1) Stream out using VLC media player application 2) Stream using libVLC through C code How to stream video using C/C++ 3) stream using ffmpeg commandline

ffmpeg -i test.mp4 -c:v libvpx -c:a libvorbis -pix_fmt yuv420p -quality good output.webm

While consuming this webm generated by all three options. 1st and 2nd is not working. While 3rd one is working. 1st and 2nd works only after streaming to file is completed and when last chunk of output file is fed to html5 video player.

It seems vlcplayer and libVLC is not generating the required meta info ( fragments with keyframes that are generated by ffmpeg.)
Is there anyway we can instruct libVLC or VLCplayer also to generate fragments with keydrame info ?

Need help in streaming using libVLC on VC++ on windows 7 64

Posted: 30 Jan 2015 07:59
by arifali
wondering if anyone could gives some references where I go an learn more on this.

Re: Need help in streaming using libVLC on VC++ on windows 7 64

Posted: 17 Feb 2015 11:30
by arifali
Hi there,
I have tried "Stream all elementary stream" option also from VLC GUI. I am streaming to a file right now and when I tried to feed this file to HTML5 player in chunks , it wont play.
For unit test here is the HTML 5 player code http://jsfiddle.net/aucvy9zL/104/

Click on the Choose File button, soon after you select a streamed file , video should start playing thats the expected behavior.