Transcode live multicast to flash and emebed in web page

About encoding, codec settings, muxers and filter usage
jac1d
Blank Cone
Blank Cone
Posts: 15
Joined: 17 Feb 2008 23:18

Transcode live multicast to flash and emebed in web page

Postby jac1d » 26 Feb 2008 05:07

Hello all,

I'm curious whether or not what I want to do is possible, and what the transcode --sout statement should look like.

On my video LAN I currently have a 180x120 256K/s multicast of each video channel (a video thumbnail). When I access the web page for a given channel, I want to be able to see various controls and other web content and have embedded on the page a flash player that streams the live feed from the multicast. Is this feasible to transcode to flash in real time and stream to an embedded player on a web page so the end user gets the various bits of web content and the video stream live?

Any links to examples would be greatly appreciated.

Thanks,

-Jeff

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Transcode live multicast to flash and emebed in web page

Postby Jean-Baptiste Kempf » 26 Feb 2008 09:34

Yes, with development versions.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

dynamitemedia
Blank Cone
Blank Cone
Posts: 60
Joined: 15 Jul 2007 23:30

Re: Transcode live multicast to flash and emebed in web page

Postby dynamitemedia » 28 Feb 2008 05:22

can you tell us which ones we can use and possible set up?

Squirrelywrath
New Cone
New Cone
Posts: 9
Joined: 09 Apr 2007 22:50

Re: Transcode live multicast to flash and emebed in web page

Postby Squirrelywrath » 28 Feb 2008 22:34

I haven't tried a newer version but I know this one should be working for what you are looking for: vlc-snapshot-20071213.tar. I don't handle the flash player embedding in the pages someone else does. We are taking MPEG2 input and converting it to Flash output. The output is then displayed in an embedded player on a google map popup when clicking a marker on the map.

I'm running vlc using daemontools by Dan Bernstein and a vlm conf for the different streams but the below should work. I don't have any audio on my multicast so you may need to play with the below but it should get you started.

vlc -vvv "udp://@<multicast_address>" --sout "#transcode{vcodec=FLV1,scale=.4,vb=400}:std{access=http,mux=ffmpeg{mux=flv},dst=<some_ip>:<some_port>/stream.flv}"

dynamitemedia
Blank Cone
Blank Cone
Posts: 60
Joined: 15 Jul 2007 23:30

Re: Transcode live multicast to flash and emebed in web page

Postby dynamitemedia » 29 Feb 2008 04:06

great info thanks.

now what exactly are you doing with daemon tools?

also can the guy doing your embedding get you the code that we would use to be 100% its working together correctly?

i am gonna tryu and play with this over the weekend or next week and see how to get the audio going well.

will post once i try it out and if anyone else does please post as well

thanks so much!

Squirrelywrath
New Cone
New Cone
Posts: 9
Joined: 09 Apr 2007 22:50

Re: Transcode live multicast to flash and emebed in web page

Postby Squirrelywrath » 29 Feb 2008 23:21

Daemontools is just a service manager for Unix. It watches vlc and if it exits for any reason it will start it back up. We use it to run VLC in telnet mode. Below is what I gathered from the page that embeds the flash. I'll try to check with individual that built it and verify that it is accurate. I don't think the swf file is doing anything fancy but again I'll have to check.

<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shoc ... n=6,0,29,0' width='240' height='180'><param name='movie' value='/images/trafficVideoPlayer.swf?cam=<stream_ip>:<stream_port>/stream.flv'><param name='quality' value='high'><embed src='/images/trafficVideoPlayer.swf?cam=<stream_ip>:<stream_port>/stream.flv' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='240' height='180'></embed></object>

mnemonic
New Cone
New Cone
Posts: 8
Joined: 11 Oct 2005 16:18

Re: Transcode live multicast to flash and emebed in web page

Postby mnemonic » 03 Mar 2008 01:29

Hello Squirrelywrath,

I would really like to know how you built that version of vlc.
I am desperately trying to set up flv-streaming via access=http with many different revisions from svn. Basically it works (my commad line is quite the same that you postet, with the difference of mp3 for acodec - ffmpeg has been rebuilt with risky under ubuntu feisty for that purpose) - with one client. As soon as a second client connects, CPU usage goes up to 100% and the second client doesn't get any data.
I am really stuck at the moment.

I am looking forward to your reply.

Kind regards
Jens
Be kind. Everyone you meet is fighting a hard battle. --Plato

Squirrelywrath
New Cone
New Cone
Posts: 9
Joined: 09 Apr 2007 22:50

Re: Transcode live multicast to flash and emebed in web page

Postby Squirrelywrath » 03 Mar 2008 15:43

Jens,

You'll have to forgive me it's been a little while since I built it. I added rpm.livna.org to my yum repos so I could pull packages that are not in the default Fedora channels. From there I installed all the buildrequires rpms out of the spec file, I forget if it was the spec file for the latest stable release or if it was the vlc.fedora.spec file in the build.

Here is my config line. Some of it maybe useless or default but I believe this is what worked for me. I enabled the X11 items because I tunnel vlc back to my desktop over SSH for testing.

--enable-x11 --enable-xvideo --disable-gtk --enable-sdl --enable-ffmpeg --with-ffmpeg-mp3lame --enable-mad --enable-libdvbpsi --enable-a52 --disable-dca --enable-libmpeg2 --enable-dvdnav --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-mkv --enable-freetype --enable-fribidi --enable-speex --enable-flac --enable-live555 --enable-caca --enable-skins --enable-skins2 --enable-alsa --enable-kde --disable-qt --enable-wxwindows --enable-ncurses --enable-release

If the above doesn't work for you let me know what errors or problems you are having and I'll see if I can help you out.

bogogil
New Cone
New Cone
Posts: 7
Joined: 20 Mar 2007 12:55

Re: Transcode live multicast to flash and emebed in web page

Postby bogogil » 11 Mar 2008 10:57

Hi all,

I am trying the same: live-streaming of a webcam to an html-embedded flash player. Basicly it works: the flash player starts up and plays the stream. But after a few seconds it just stops. Very strange.. I used vlc version 0.9.0-git Grishenko with this commandline:

Code: Select all

vlc -I dummy v4l:///dev/video0:size=320x240 --no-audio --sout '#transcode{vcodec=FLV1,scale=1,vb=400}:std{access=http,mux=ffmpeg{mux=flv},dst=:8080/stream.flv}'
Any ideas?

Regards
Bogo

Squirrelywrath
New Cone
New Cone
Posts: 9
Joined: 09 Apr 2007 22:50

Re: Transcode live multicast to flash and emebed in web page

Postby Squirrelywrath » 17 Mar 2008 20:36

Try running from a command prompt with -v for debugging and see if that sheds any light on what maybe causing the issue. You may need to go to -vvv but that is a lot of information to go through.

mnemonic
New Cone
New Cone
Posts: 8
Joined: 11 Oct 2005 16:18

Re: Transcode live multicast to flash and emebed in web page

Postby mnemonic » 26 Mar 2008 01:56

Hello Squirrelywrath,

thank you for your help.

As it turned out, the problem I was facing (and am still facing) is not related to a certain revision from SVN nor to the fact that I want FLV output.
It seems to be solely related to the HTTP output access module. The problem I described above happens with all sorts of input files, with transcoding or not doesn't matter.
For one client it works perfectly, inside a LAN with many client it works as well, but if you stream to more than one client from a dedicated server over the internet things start to go wrong.
Things like

Code: Select all

if( host->i_url <= 0 ) { /* 0.2s (FIXME: use a condition variable) */ msleep( 200000 ); continue; }
lead to the impression that the http output module needs a complete rewrite.
If my day had 48 hours I would try to do it better, but unfortunately that is not the case and I don't want to bash the work someone has spent many hours on here.

For now I'm sticking to ffmpeg and ffserver to get that job (hopefully) done. It seems as if there is currently no really reliable solution for FLV streaming out there.

Kind regards
Jens
Be kind. Everyone you meet is fighting a hard battle. --Plato

hihi
Blank Cone
Blank Cone
Posts: 49
Joined: 09 Jan 2007 08:48

Re: Transcode live multicast to flash and emebed in web page

Postby hihi » 27 Mar 2008 13:58

is it possible to trancode into a file that's playable with a flashplayer?

like:

Code: Select all

output #transcode{vcodec=FLV1,vb=512,height=320}:duplicate{dst=std{access=file,mux=ffmpeg{flv},dst="Test.swf"}}
I've only a FlashPlayer or a RealPlayer on the remote device ...


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 9 guests