Home

SWF Scout

SWF Scout screenshot (click to enlarge)



SWF Scout ActiveX/NET library

Tutorial: how to convert AVI video file into YouTube like video player using SWF Scout and free FFMPEG Scout libraries

Download source code of this example (including source AVI, FLA and produced SWF files):
swfscout_youtube_like_video_player_interface.zip
(134KB)

See also - our free player engine for FLV and SWF files

Produced SWF flash movie video player:

To prepare video:

1) Convert AVI to FLV (see /Making FLV from AVI/) - requires freeware FFMPEG Scout library ( http://bytescout.com/ffmpegscout.html )

Destination FLV video size is 200 x 150

2) Convert produced FLV into Video.swf (requires SWF Scout - http://bytescout.com/swfscout.html ):

Run ConvertFLVtoSWF.vbs: this will take Video.flv and will convert into Video.swf

3) Open VideoPlayer.swf. This flash movie will load Video.swf and will play it.

Source code of VideoPlayer.swf is in VideoPlayer.fla (based on this sample)

Source code of ConvertingAVItoFLV.vbs (requires freeware FFMPEG Scout, converts AVI into FLV):

' ////////////////////////////////////////////////
' converting AVI video into FLV using FFMPEG Scout
' ////////////////////////////////////////////////


W = 200
H = 150
Set VideoConverter = CreateObject("FFMpegScout.Application")
VideoConverter.InputFileName = "VideoSample.avi"
VideoConverter.OutputFileName = "Video.flv"
VideoConverter.Width = W
VideoConverter.Height = H

VideoConverter.Execute
Set VideoConverter = Nothing

Source code of ConvertFLVtoSWF.vbs (converts FLV into SWF video flash movie using SWF Scout):

W = 200
H = 150
Set Movie = CreateObject("SWFScout.FlashMovie")
Movie.InitLibrary "demo", "demo"

' Movie creating and setting parameters

Movie.BeginMovie 0,0,W,H,1,12,6
Movie.Compressed = true

'//////////////////////////
' VIDEO
'/////////////////////////

Video= Movie.AddVideoFromFileName("video.flv")
Movie.FramesPerSecond= Movie.VIDEO_FramesPerSecond
Movie.PlaceVideo Video,Movie.CurrentMaxDepth
Movie.PLACE_SetTranslate 0,0
Movie.ShowFrame Movie.VIDEO_FrameCount

Movie.EndMovie

Movie.SaveToFile "video.swf"

Finally run VideoPlayer.swf - it will use "video.swf" movie as source video movie to play video:

Download source code of this example (including source AVI, FLA and produced SWF files):
swfscout_youtube_like_video_player_interface.zip
(134KB)

See also - our free player engine for FLV and SWF files

Download Free Trial Buy Now More Information

Products  |  Download  |  Purchase  |  Support  |  Contacts  |  Testimonials  |  News |  

ByteScout, 2003-2008. All other company and product names may be trademarks of their respective companies. Privacy Statement