libVLC, DELPHI and streaming

This forum is about all development around libVLC.
zodiak
New Cone
New Cone
Posts: 9
Joined: 10 Jul 2010 10:15

libVLC, DELPHI and streaming

Postby zodiak » 18 Jul 2010 16:36

Hi!

I'm trying to use delphi 7 to stream a file over http and I had no success so far. I'm using an older VLC (version 0.8.6) that I know works with the DELPHI wrapper I got for delphi 7. I managed to get my simple program to play an mp3 file on the local machine, which is more proof that the wrapper is good for the version of VLC I'm using.

I seem to have problems on the command I'm using to pass to libvlc - maybe not written properly which is due to my ignorance of how VLC works rather than a DLPHI programming problem.

Here's the code I use:

Code: Select all

//CODE INSIDE THE START BUTTON CLICK EVENT //******START******** //This first part plays a file on the local machine, this works. //NOTE: variable s contains the name of the mp3 file vlc:=call('VLC_Create',VLC_Create); args[0]:=pchar(VLD_LibPath); // Lie or libvlc.dll wont work :( args[1]:=nil; call('VLC_Init',VLC_Init(vlc,1,@args[0])); call('VLC_AddTarget',VLC_AddTarget(vlc,PChar(s),nil,0,PLAYLIST_APPEND,PLAYLIST_END)); call('VLC_Play',VLC_Play(vlc)); //Then I want to start another VLC instance and stream the file 1.mp3 through http, this doesn't work! vlc2:=call('VLC_Create',VLC_Create); commands[0]:=pchar(VLD_LibPath); // Lie or libvlc.dll wont work :( commands[1]:='1.mp3'; commands[2]:= ':sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:http{mux=ffmpeg{mux=flv},dst=:8080/} :no-sout-rtp-sap :no-sout-standard-sap :sout-keep'; call('VLC_Init',VLC_Init(vlc2,3,@commands)); call('VLC_Play',VLC_Play(vlc2)); //The program runs happily but I can't open the stream on the local machine using VLC as client //*******END************
The message window on VLC client where I try to play the stream says:

Code: Select all

main debug: `http://localhost:8080' successfully opened main debug: Buffering 0% main debug: EOF reached ... main debug: nothing to play
So I think there's really no stream being sent by my program through libVLC.

Anyone with a little time to spare can give me some ideas on what I might try next?

Many thanks,
Rui

AEtH
Blank Cone
Blank Cone
Posts: 37
Joined: 23 Jun 2010 01:17

Re: libVLC, DELPHI and streaming

Postby AEtH » 18 Jul 2010 20:12

Upgrade to 1.1.0, there is a working delphi wrapper in this forum.

zodiak
New Cone
New Cone
Posts: 9
Joined: 10 Jul 2010 10:15

Re: libVLC, DELPHI and streaming

Postby zodiak » 19 Jul 2010 04:12

yeah, I tried the new delphi wrapper for VLC1.1 and it works like a charm.

Thanks.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests