Streaming of Video and Audio from VLC

This forum is about all development around libVLC.
suvendu4urs
New Cone
New Cone
Posts: 5
Joined: 15 Sep 2011 11:03

Streaming of Video and Audio from VLC

Postby suvendu4urs » 15 Sep 2011 11:21

Hello All,
I am a new person to VLC appliaction development.

I have written some PHP scripts to execute my video in the streaming server.

For video i have different port and for audio i have another port.

When i am doing onclick from PHP scripts to execute the video,it works fine.
The audio and video works nicely in different ports.

After the completion of video,the video again restarts automatically in my firefox browser.
But the sound is not working at this time.

I think the video is getting played from cache.

Let me know how to reslove this issue.

I am attaching the code over here which i am using for VLC streaming:

Code in index.php

Code: Select all

<div id="video"> <embed type="application/x-vlc-plugin" name="video1" autoplay="yes" loop="yes" hidden="no" target="rtp://@239.255.1.1:<?= $port ?>" width="1024" height="660" style="position: absolute; top: 0; left: 0;" />
//code to play the video file:

Code: Select all

function vlc_playFile($file, $enqueue = false, $target) { $port = getPort($target); $FileHandle = fopen("play_title", 'w'); if($enqueue == false) { $command = "clear\n"; fwrite($FileHandle, $command); $command = "add ". VIDEO_DIR ."/". $file ."\n"; } else { $command = "enqueue ". VIDEO_DIR ."/". $file ."\n"; } fwrite($FileHandle, $command); $command= "logout\n"; fwrite($FileHandle, $command); $test = shell_exec("netcat 127.0.2.6 $port < play_title"); shell_exec("netcat 127.0.2.6 20004 < play_title"); fclose($FileHandle); unlink("play_title"); }

suvendu4urs
New Cone
New Cone
Posts: 5
Joined: 15 Sep 2011 11:03

Re: Streaming of Video and Audio from VLC

Postby suvendu4urs » 14 Oct 2011 15:53

Hello all,

The problem is solved....

I am able to receive the audio.
The loop was not enabled in the setting of audio due to which it was happening


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 2 guests