Flash Video Player embeded

About encoding, codec settings, muxers and filter usage
djrobbie
Blank Cone
Blank Cone
Posts: 14
Joined: 09 Mar 2010 21:40

Flash Video Player embeded

Postby djrobbie » 07 Oct 2010 19:13

I have setup VLC to stream a Live video (from my Dreambox DM800) to the internet. And I can watch it on my homepage using an embeded windows media player. It works fine! But I want to embed this videostream with a flashplayer on my homepage. Is there anyone who can help me figuring out how to show this live stream on my homepage ? What FLASH video player can retrieve streams from VLC and what should the settings look like in VLC ?

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Flash Video Player embeded

Postby Greg » 07 Oct 2010 19:41


djrobbie
Blank Cone
Blank Cone
Posts: 14
Joined: 09 Mar 2010 21:40

Re: Flash Video Player embeded

Postby djrobbie » 07 Oct 2010 20:03

Thanks!

I have read that guide before, but its not easy understanding it.

Let me try explaining:

I consentrate on Method 2 H264 and Flash .flv heading:

What is TWO STAGE ( It can be successfully effected in a single stage transcode, but a two stage transcode may improve the quality depending on the quality of the hardware available.)

Whats the meaing of Box 1&2 Set up?

and.....

This:

:sout=#transcode{vcodec=h264,vb=200,deinterlace,ab=32,fps=25,width=256,height=192,acodec=mp3,samplerate=44100}:duplicate{dst=std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=0.0.0.0:8081/mediaplayer/stream.flv},dst=display}

How shoud I edit it to my local IP ?

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Flash Video Player embeded

Postby Greg » 07 Oct 2010 23:40

OK..

There is a considerable amount of information in the wiki, so it does need to be read very carefully, perhaps several times, to understand it all.

I shall have to assume that you are using Windows, please say and or re read wiki if you are not.

Re "Two Stage" this idea implys that you will be using two computers, one to capture and another as the final web server connected across a network. See Transcode Strategies in the wiki. It is not necessary but can be usefull. To follow on from this idea, Box 1 is the capture computer and Box 2 is the final server computer.

So, if you want to do it all on just 1 Box (computer), then use just the settings for Box 2

And... This... See "Troubleshooting" section.

:sout=#transcode... etc

Leave dst= at <dst=0.0.0.0> for Windows. This in effect will broadcast, so no need for you to enter your IP here.

You will, however need to enter your IP in the Flash player's HTML, See the links for Flowplayer and JWPlayer docu and examples which describe the HTML code needed to make the player work.

The wiki html line noted and missing in the Flowplayer example will be like this, but with your IP:port

<a href="http://192.168.0.42:8081/stream.flv" style="display: block; width: 384px; height: 288px;" id="player">

Does it make a bit more sense now?

djrobbie
Blank Cone
Blank Cone
Posts: 14
Joined: 09 Mar 2010 21:40

Re: Flash Video Player embeded

Postby djrobbie » 08 Oct 2010 07:42

Thanks! Explains a little bit more better!


Im using windows and using JWplayer. See that JW player has a guide on their homepage to enter the different inputs. Can this be used?

Also, why direct to a flv file when theres physically no flv file involved, or does VLC make a file?

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Flash Video Player embeded

Postby Greg » 08 Oct 2010 19:13

Take a look at the example HTML that comes with the JW download package as well as the docu.
You can modify the example to suit your own... /path/to/IP:port/xxxx.flv Eg stream.flv
Don't forget that the java files need to be pathed too.

You may find it simpler to start with, to place the java files in your root web dir and embedd on your home page, so that no other paths are required.

Take a look at Flowplayer, The docu and implimentation may be easier to understand. Both Players work well in Windows.

VLC does not create a file as such in this case, although you can tell it to if you want to save the stream at the same time. Best to consider it as method to define the stream for the player to understand.

Take a look at KDH's posts in this forum

Take a look here for KDH's use of VLC and Flowplayer in action on his website.
http://www.everydayjunglist.org/edjtv.old.html

djrobbie
Blank Cone
Blank Cone
Posts: 14
Joined: 09 Mar 2010 21:40

Re: Flash Video Player embeded

Postby djrobbie » 10 Oct 2010 14:41

Hello again!

I've tried to use the jwplayer, but with no result.

The guides provided are all difficult to understand. Could you please write a INDEX.HTML file for me here, that i can use?

lets say my server'stream is: 123.123.123.123:1234

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Flash Video Player embeded

Postby Greg » 11 Oct 2010 00:21

There is a worked example called <readme.html> in the JWplayer download folder.
Open it with your HTML editor
You can adapt this to your needs
Clue..
The lines you have to modify are like value="file=http://IP:port/path/stream.flv"

Try a little harder, I'm sure you will get a good result

djrobbie
Blank Cone
Blank Cone
Posts: 14
Joined: 09 Mar 2010 21:40

Re: Flash Video Player embeded

Postby djrobbie » 11 Oct 2010 17:41

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> - TV</title> </head> <body> <h1><!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE --> <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="720" height="406"> <param name="movie" value="player.swf" /> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="flashvars" value="file=test.flv&image=preview.jpg" /> <embed type="application/x-shockwave-flash" id="player2" name="player2" src="player.swf" width="720" height="406" allowscriptaccess="always" allowfullscreen="true" flashvars="file=test.flv&image=preview.jpg" /> </object> <!-- END OF THE PLAYER EMBEDDING --></h1> </body> </html>
This one works. But when i press PLAY it starts, but only showin the circle ICON and nothing happens.



When i press anywhere on the player it stops. When i then press play the movie starts and shows perfectly. But why do i have to do this process ?

I have also tried to set the autostart to TRUE. The same thing happens, i have to press stop and play again for the video to start showing.

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> - TV</title> </head> <body> <h1><!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE --> <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="720" height="406"> <param name="movie" value="player.swf" /> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="flashvars" value="file=test.flv&autostart=true&image=preview.jpg" /> <embed type="application/x-shockwave-flash" id="player2" name="player2" src="player.swf" width="720" height="406" allowscriptaccess="always" allowfullscreen="true" flashvars="file=test.flv&autostart=true&image=preview.jpg" /> </object> <!-- END OF THE PLAYER EMBEDDING --></h1> </body> </html>
You say:
The lines you have to modify are like value="file=http://IP:port/path/stream.flv"
Where, cant see that sentence in the example...... ?

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Flash Video Player embeded

Postby Greg » 12 Oct 2010 12:56

Depending on which JWplayer version example you are using, you will have a couple of lines that look like this

<param name="flashvars" value="file=video.mp4&image=preview.jpg" />
flashvars="file=video.mp4&image=preview.jpg"

The "file=............" bit needs to contain the the file name and path location etc of your stream.
Hence, I said...
The lines you have to modify are like value="file=http://IP:port/path/stream.flv"

Eg. like this
<param name="flashvars" value="file=http://192.168.0.21:8081/mediaplayer/stream.flv">
flashvars" value="file=http://192.168.0.21:8081/mediaplayer/stream.flv"

This, you may notice looks like the output from VLC ( see wiki example)

Re your other points. If you wish to change the way the player responds, then you will have to learn how to use the controls. Please see JW docu or request help from the JW forums for JW specific help.

Good luck

djrobbie
Blank Cone
Blank Cone
Posts: 14
Joined: 09 Mar 2010 21:40

Re: Flash Video Player embeded

Postby djrobbie » 16 Oct 2010 20:30

Depending on which JWplayer version example you are using, you will have a couple of lines that look like this
I use: JW-Player-5.2-Pro
Eg. like this
<param name="flashvars" value="file=http://192.168.0.21:8081/mediaplayer/stream.flv">
flashvars" value="file=http://192.168.0.21:8081/mediaplayer/stream.flv"
Why do you include /mediaplayer/stream.flv?

Why cant i only use http://192.168.0.1.21:8081 ? Why the /mediaplayer/stream.flv ?

I have problem understanding why there has to be a *.flv file in the url.

Really, if you could provide me with an exactly index.html example, everyrhing would be easier......just add a fantasy IP-address that i can replace....

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Flash Video Player embeded

Postby Greg » 17 Oct 2010 02:41

OK, my last attempt to simplify

I repeat

"file=http://IP:port/path/stream.flv"

file={location or path}/{file name.ext}

The player in your case JW, needs to know what the file is called and where it can be found. The Player is expecting to stream a file from a specified location. The player also needs the (its) java files to be be pathed and located in the same (or specified) folder.
So if you put all the JW files in your web root folder they will not need a path. If you direct your stream from VLC like

http://IP:port/stream.flv

Then there is no folder in the path..... So there would not be a /path/... or /mediaplayer/ or /someplace/ or whatever .

The specified output in VLC for Flash is .flv format, as you may/should expect. Perhaps see

http://wiki.videolan.org/Flash_Video

VLC outputs in this way to allow a player (Eg JW) to see the VLC output a file. Perhaps you should accept this as a method that works by design rather than require a definitive explanation.

I do not wish to be rude, but you really do need to try a bit harder to understand some of the basic ideas. Just take it gently step by step and the logic and sense of it all and it will start to take shape, then you can do more and more as you grasp each new gem.

If you want someone to write specific HTML taylored to just for you to suit your unique individual needs, I suggest you use a local specialist.

Again, good luck and read the docu carefully


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 4 guests