howto: .flv video streaming with .swf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

at first i converted a mpg file to flv with:
ffmpeg -i bremenschnitt.mpg -ar 44100 -b 324k -t 00:00:20 -s cif  test.flv

then i used 
php videostream.php
oh the file at bottom

But i dont like the output very much yet:
http://www.magic-fire.de/content/view/13/27/

- there should not be a large border around the video
- my browser crashes sometimes
- the video should not scale while scaling the browserwindow

Do you have any idea, what i did wrong?

Thanks a lot,


--------8<---------------------------------------

<?
/********************************************************************************
* @ File: videostream.php
* @ Original date: August 2004 @ www16.brinkster.com/gazb/ming/
* @ Version: 1.2
* @ Summary:video stream loading a .flv with actionscript
* @ Updated:  small improvements and summary text
* @ Copyright (c) 2003-2007, www.gazbming.com - all rights reserved.
* @ Author: gazb.ming [[@]] gmail.com - www.gazbming.com 
* @ Released under GNU Lesser General Public License - 
http://www.gnu.org/licenses/lgpl.html
********************************************************************************/

// train.flv is a snippet from this:  
http://creative.bfi.org.uk/titles/409874.html

// some typical movie variables
 Ming_setScale(20.0000000);
ming_useswfversion(7);
$movie=new SWFMovie();
$movie->setDimension(352,288);
$movie->setBackground(0,0,0);
$movie->setRate(25);

$strAction = "
stop(); 
nc=new NetConnection(); 
nc.connect(null); 
NewStream=new NetStream(nc); 
video1.attachVideo(NewStream); 	
NewStream.setBufferTime(10); 
NewStream.play('test.flv');
";

$stream = new SWFVideoStream();
$item=$movie->add($stream);
$item->setname( "video1");

$movie->add(new SWFAction($strAction));
$movie->nextFrame();

// save swf with same name as filename
$movie->save("magic-fire.swf",9);
?>

--------8<---------------------------------------



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ming-users mailing list
Ming-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ming-users

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux