 |
|
 |
Nice work. Very helpful.
I am building a 64 bit MFC application. When i build the demo you provided in x64, it fails to link since the dll / lib files are win32.
Is there a x64 version of libvlc?
Thank you.
Geri
|
|
|
|
 |
|
|
 |
|
 |
not to familiar with c++
b.ware
|
|
|
|
 |
|
 |
You no longer have to copy the .dll.a files to the .lib files. They are now included
sdk/lib directory.
|
|
|
|
 |
|
 |
Anyone uses new VLC 2.0.0 version ?
TIA
|
|
|
|
 |
|
 |
Hi,
Just to point out that libVLC is almost LGPL see this commit.
|
|
|
|
 |
|
 |
Thank you for the hint, I will update the article as soon as I have some time!
|
|
|
|
 |
|
 |
Does the new licensing allow someone to add the libs to a closed source application for resale without any costs?
|
|
|
|
 |
|
 |
Hi,
I tried streaming via HTTP using the released binary for VLC, and this worked very well for my purposes. Has anyone had any experience/exposure to using the VLC source code and libs to perform streaming in there own application?. I was very pleased to be able to download this example you have posted here, and rebuild and run it myself with NO hitches whatsoever. i thank ALL of you who contributed to this!
I DID look at the online wiki - developers corner, and the streaming page is only a placeholder. perhaps i will try to contribute to that after i conquer my own learning curve on this subject. I have little or no experience with multimedia playback application development, hence keen interest in VLC. i won't have to re-invent any wheels!
I also looked at the "vlc_stream.h" header file, and see the methods outlined, but this still doesn't provide a clear operating concept. I only want to duplicate the streaming functionality that i was able to do with the released binary from vlc.org
Any help, comments, pointers, anyone has will be much appreciated.
Thanks,
Dave Doyle
|
|
|
|
 |
|
 |
Ok, so ... never mind. I figured out 'how to fish' on my own. It turns out its 'pretty' easy to stream from libVLC, but the wiki and documentation are a little cryptic if you aren't already familiar with streaming concepts and methods, etc. the required code changes are here, i just edited the VLCWrapperImpl::OpenMedia method as follows: void VLCWrapperImpl::OpenMedia(const char* pszMediaPathName) { const char *media_name = "mybroadcast"; libvlc_instance_t *vlc; char sout[1024] = "#transcode{vcodec=h264,vb=0,scale=0}:http{dst=:8080/go.mpg}"; vlc = libvlc_new(0, NULL); libvlc_vlm_add_broadcast(vlc, media_name, pszMediaPathName, sout, 0, NULL, true, false); libvlc_vlm_play_media(vlc, media_name); Sleep(1000 * 45); libvlc_vlm_stop_media(vlc, media_name); libvlc_vlm_release(vlc); MessageBox(NULL, "Video Streaming Complete", "Done", MB_OK); } A couple of notes on what i did above. 1. my aim was to stream a chosen file vs play it locally. (I will work on making it play locally while streaming next, but this isn't essential for my effort) 2. To keep things 'simple', i created a new VLC instance each time, and trashed it when i was done. This may prove problematic down stream, (all the creating and releasing) so i'll likely revisit this concept as well, i.e. try to resuse the main instance created w/ the vlc wrapper class 3. i was just looking to HTTP broadcast a video segment (no sound) to several remote PCs in the same subnet, not over the internet (i have no idea how much more complicated that is?) 4. in this way, i can view the stream locally via: "vlc http://127.0.0.1:8080/go.mpg" or remotely using "vlc http://xxx.xxx.xxx.xxx:8080/go.mpg", where the xxx's are the real ip address of the host machine 5. i am fairly sure adding the audio portions just involves some monkeying w/ the transcoding part "#transcode{vcodec=h264,vb=0,scale=0)" ... see the documentation for this. 6. another next step is to move some of this code to spread these functions out, so that the open button just loads the video, and the "play' begins the streaming (and possibly the displays it here also?). the stop will stop the stream. 7. clearly what i have above is 'crude' and just a 'proof of concept' test, but many times thats all thats needed to make your way to what you want/need. again, i thank you for your work here, this gave me the 'shoulders to stand on' so i could see what i needed to see. I am on my way to incorporating the streaming function into my application. Dave Doyle
|
|
|
|
 |
|
 |
I want to hide file name on start ( ":no-video-title-show" using command line ), do you have a solution or do you know a function that can be called to disable ?
Thank you
Davide Zaccanti
|
|
|
|
 |
|
 |
Change this code in VLCWrapperImpl.cpp (add argument):
const char * const vlc_args[] = {
"-I", "dumy",
"--ignore-config",
"--no-video-title-show",
"--plugin-path=./plugins" };
|
|
|
|
 |
|
 |
To use gdiplus library I have built fowllow code in stdafx.h of your source code.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include
#include
#pragma comment(lib, "gdiplus.lib")
using namespace Gdiplus;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I found the fowlloing runtime error in release mode. In debug mode it isn't happened.
The procedure entry point GDIplusStartup can't find in DLL libvlc.dll.
PLZ solve this release bug.
|
|
|
|
 |
|
 |
Hi All!
I would like to crop in command-line arguments. Is it possible?
(that is I'm searching a command like "--crop=10x10+100+100" in the player, but its not working in this apps.)
Please help me.
thanks!
|
|
|
|
 |
|
|
 |
|
 |
Nice article and thank you. Words of suggestion, use boost::scoped_ptr and not deprecated std::auto and use std::string/std::wstring and not const char*,
|
|
|
|
 |
|
 |
Hi Alex,
I have just tried your wrapper, it works good to play the file in local.
But it seems when we input wrong path, it will be crashed, and how we can catch these bugs?
More important question that i want you help is how we can use your VLC wrapper to open a video/music from internet?
Please help me.
Thank in advance!
|
|
|
|
 |
|
 |
it works - try this please:
void CVlcDialogDlg::OnBnClickedButtonLoad()
{
CFileDialog dlgFile(TRUE);
if(dlgFile.DoModal()==IDOK)
{
CString file=dlgFile.GetPathName();
m_VLCPlayer.OpenMedia((LPCTSTR)file);
m_VLCPlayer.Play();
// Show filename as groupbox title
if(file.GetLength()>80)
file=CString("...")+file.Right(80);
m_MediaControlGroup.SetWindowText(file);
}
else
{
m_VLCPlayer.OpenMedia("http://radio01-cn03.akadostream.ru:8000/moscowecho128.mp3");
m_VLCPlayer.Play();
}
}
|
|
|
|
 |
|
 |
I've downloaded VLCWrapper and compiled it with Visual Studio 2008, running Win7-64. When I run it, it crashes in the VLCWrapperImpl constructor because libvlc_new returns NULL. I've verified that libvlc.dll is getting loaded.
Any ideas on what is causing this problem?
|
|
|
|
 |
|
 |
I got the same problem too. Using VS2008 & WinXP. Any idea on why?
|
|
|
|
 |
|
 |
I think I might know why.
I was getting the same error and then I stumbled onto some information on the VideoLAN.org wiki:
http://wiki.videolan.org/LibVLC_Visual_C[^]
It suggested copying the libvlc.dll and libvlccore.dll files along with the plugins folder into the Debug folder of my project.
Once I did that, the calls to libvlc_new(p1,p2) started working. I used both libvlc_new( 0, NULL ) and libvlc_new( cnt, ptr_to_ptrs ) and both worked.
Hope this helps.
- john
Mongo Programmer
|
|
|
|
 |
|
 |
I fixed this on my system in a way you might try -- see my response at the end of the thread.
Essentially it is to put the plugins folder (with all the DLL files contained in it) in your VS Project's Debug folder along with the two VLC DLL files.
Mongo Programmer
|
|
|
|
 |
|
 |
1. You need to copy the folder
\ Program Files \ VideoLAN \ VLC \ lua \ into your project. Playing some files may require a folder "lua"
2. This program is written for a previous version of libvlc. libvlc_exception_t now not in VLC.
3. This program is written for ANSI encoding. This is an outdated model of programming.
4. libvlc uses UTF-8 instead of ANSI and not UTF-16.
VLCWrapper:: OpenMedia should be rewritten like
void VLCWrapper:: OpenMedia (const TCHAR * pszMediaPathName)
(
# If defined (UNICODE)
/ / Kind of like a symbol of UTF-16 convertible is usually not more than 3 char in UTF-8
char pszMediaPathNameUTF8 [MAX_PATH * 3];
WideCharToMultiByte (CP_UTF8, 0, pszMediaPathName, -1, pszMediaPathNameUTF8, _countof (pszMediaPathNameUTF8), NULL, NULL);
m_apImpl-> OpenMedia (pszMediaPathNameUTF8);
# Else
/ / Something for conversion ANSI to UTF-8
# Endif
)
5. Mostly static void * g_spCVlcDialogDlg not required. a function HandleVLCEvents can pass a pointer to the dialogue through the parameter pUserData.
6. The function void CVlcDialogDlg:: UpdatePosition ()
int iHours = static_cast (m_llLength/3600000);
int iMinutes = static_cast ((m_llLength-iHours * 3600000) / 60000);
int iSeconds = static_cast ((m_llLength-iHours * 3600000-iMinutes * 60000) / 1000);
int64_t llNewPosition = m_VLCPlayer.GetTime ();
int iActHours = static_cast (llNewPosition/3600000);
int iActMinutes = static_cast ((llNewPosition-iActHours * 3600000) / 60000);
int iActSeconds = static_cast ((llNewPosition-iActHours * 3600000-iActMinutes * 60000) / 1000);
Heavy computation for CPU. The algorithm is inefficient.
7. The function void CVlcDialogDlg:: UpdatePosition ()
iNewSliderPos = (int) ((double) llNewPosition / (double) m_llLength * 100);
Conversion to type double is not required - Heavy computation for CPU.
m_llLength can take the value 0. You should put the check for 0.
|
|
|
|
 |
|
 |
Is it possible to play youtube videos using this?
Thanks in advance.
|
|
|
|
 |
|
 |
XP: I use the demo to play a video, it is OK.
Window 2003:no any thing show the window, why? the demo is OK on XP
|
|
|
|
 |