Forum Moderators: open

Message Too Old, No Replies

How to put a Flash video on website?

Created with Flash Studio 8

         

Woodymon

12:37 pm on Oct 14, 2005 (gmt 0)

10+ Year Member



Flash newbie alert. Trying to get flash vid render on website without success. Here is what I did.

I shot a simple short mpg video with dig cam.
9.7 seconds, 160x112, 216KB mpeg

I imported video into Flash Studio 8 with following steps:
1. Create New... Flash Document.
2. Import > Import Video.
3. Chose race.mpg file on hard drive.
4. Selected "progressive download from a web server".
5. For video encode I chose - Flash 7, High Quality 700kbps and SorensonSpark. For audio - MP3 128kbps stereo.

[once I get this figured out I will try again with Flash 8, Medium Quality 400kbps and On2 VP6. For audio - MP3 96kbps stereo. (default)]

6. Chose a .swf skin (external). Min width 155px.
-- note the URL field is greyed out here.
7. Clicked Finish.
8. Within the Save as... dialog I saved doc as race.fla
9. Encoding completed. Saved as race.flv.
10. Object appeared in Flash Studio on "stage".

At this point not quite sure what to do.

11. Choosing Control > Test Movie - played the video in swf viewer. Displayed and sounded fine. (Testing the movie created two swf's in the directory, one for the control object and another race.swf.).

So which files to upload to my web server and how to call the flash video via HTML?

Do I call the flv or fla file?

Or the swf (and how would I normally create the swf... if I hadn't done the Test movie above the two swf's would have never appeared, I think?

I uploaded all (fla, flv and two swf's) to my /images directory on web server.

And within index page I tried calling the video with the following HTML:

<img src="images/race.swf" title="race" title"race">

But only the word "race" appeared, not the clip or any sign that a media object or any link was in that location. However when I right clicked on the word "race" and selected view image, the video played correctly, albeit on another webpage (blank page except the small vid clip).

So I know I am close herebut no cigar yet.

Related question: When I create the new Flash document do I have to set the properties for the doc to something specific (default is 550px x 400px) if the imported video is 160x112 as stated above. Do I have to do this BEFORE importing/encoding video?

I went thru most of the Studio Flash help file (Flash Basics and flash Video portions) and walked thru the tutorials but did not find answers to the above. I'm usually not this dense at this kind of stuff. Guess I need to buy a book?

Thanks for any assist.

Woody

bateman_ap

1:00 pm on Oct 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<img src="images/race.swf" title="race" title"race">

replace with

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="160" height="112" title="race">
<param name="movie" value="images/race.swf" />
<param name="quality" value="high" />
<embed src="images/race.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="160" height="112"></embed>
</object>

Also make your movie size in flash the size of your video.

To create the SWF file in flash go to the file menu, export, export movie.

It is best to keep the swf and the flv in the same folder unless you know how to change the reference to it in the flash movie. The fla file you don't need upload, it is just needed to update the movie

Woodymon

1:38 pm on Oct 14, 2005 (gmt 0)

10+ Year Member



Thanks. And that was quick.

Before I saw your response I did more research.

And I did the Export Movie step (hard to believe I missed that step.) I couldn't save in FlashPlayer 7 format since I'm utilizing a stock FLVPlayback control. So had to save in Flash 8 format.

And then I changed the HTML img tag to embed. And uploaded both swf files. When I reloaded webpage a filled white box displayed where the video clip should have rendered but which did not. However the audio played. Right clicking on the whote box brought up the stock Flash Player controls.

So I then changed my HTML to your suggested code and observed the same results.

Note that if it matters the HTML is inside a table cell, in between <td> </td>.

Any additional recommends? And thanks again.

Woody
and jut replaced the

Woodymon

3:09 pm on Oct 14, 2005 (gmt 0)

10+ Year Member



Additional follow-up...

I reimported mpeg into Flash Studio 8 and chose "embedded" instead of progressive". (not my preferred choice but hoping something positive might result).

For symbol type I chose "embedded video". Not sure if this or "movie clip" was best (I tried both and results appeared the same). I saved in Flash 7 SorensonSpark format. Then exported movie as Flash Player 7 version. Uploaded resulting swf file.

And the video played (with audio) using the HTML code recommended above. This is good.

However video displays as a very small thumbnail. Right clicking and choosing "Zoom In" twice brings it up to appx expected size (160x112). But then the vid is offset in the box and I have to use hand grabber to center it in the square.

Each time I reload the webpage the video clip comes up a small thumbnail.

Wondering if this scaling down has something to do with my HTML table code or somethng to do with importing and/or exporting from Studio?

When I right click on the clip in the web page the context menu says "About Flash Player 8..."

Is this small sizing an issue with playing an embedded Flash 7 clip with the Flash Player 8 installed?

Note I've tested in Firefox 1.5 beta 2 and IE 6 with same results.

Also, with the "embedded Flash 7 type" I don't get the graphical controls I desire (external play/seek/mute bar as I would get with Flash 8 format).

Also it's not progressive type as I need (eventually I want to be creating some longer flash videos thus embedded type will not be appropriate).

Wondering if it would be easier to convert the mpeg to Flash using the separate bundled Flash 8 Video encoder? And then play the FLV directly on website?

Or is ther no getting around the need to import into Studio and then export as SWF?

Any recommends on the above? Thanks.

Woody

bateman_ap

3:23 pm on Oct 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What size is the original flash movie you placed the video into. Flash will scale down the movie to fit in the size you told it to.

Woodymon

4:21 pm on Oct 14, 2005 (gmt 0)

10+ Year Member



Now I see... in Flash Studio Properties the 550x440 default setting. Forgot to reset down to video clip size in my latest redo's. That fixed the down scaling issue. Thanks.

Ok now that I have the "embedded" Flash video import/export working, what do I need to do to enable the "progressive" Flash video format to work and enable the playback controls to appear? I understand to do either I need to export and import in Flash 8 and ON2 VP6.

Note previously when I was importing/exporting for the progressive format, if I right clicked on the point which the progressive video should have appeared in the webpage and then selected "view image" the video frame containing the playing video appeared along with the playback controls. So I suspect the HTML code that I tried and that you previously recommended was not intended for the progressive format?

I still unable to located anythng about these kinds of issues in the Flash 8 help file.

Thanks again for your quality feedback.

Woody

Richard_N

5:18 pm on Oct 14, 2005 (gmt 0)



this may help

[macromedia.com...]

Richard_N

10:57 pm on Oct 14, 2005 (gmt 0)



I posted this on another thread, works in flash 7
--------------------------------------------------
you need to link to the flv file from the swf and call it in as you do with external jpg's.

Create a new large enough flash file>

from the Libry menu choose New Video>

place an instance on the stage and resize it to fit the video file, give it an instance name of VideoHolder>

to load and play the video with a button attach this code to your first frame.(make the button obviously first)

video_btn.onRelease = function() {
myVideo_nc = new NetConnection();
myVideo_nc.connect(null);
newStream_ns = new NetStream(myVideo_nc);
VideoHolder.attachVideo(newStream_ns);
newStream_ns.play("whatever.flv");
}

Just upload whatever.flv and the swf to the same folder on your site and embed the swf as usual

Woodymon

1:45 am on Oct 15, 2005 (gmt 0)

10+ Year Member



Thanks for the URL above. FYI I see at the bottom the document is the "easy URL":
[macromedia.com...]

The doc is not updated for Studio Pro Flash 8/ or On2VP6 encoder so I'm having difficulty assimilating ideas (although I'm sure the theory is still applicable).

As per the other steps you provided: I don't really understand what the end goals are.

Will the info you provide allow me to create a "progressive" video with playback controls encoded in Studio 8 with ON2 VP6. That is my goal. Or am i confused newbie? Note I'm a step-by-step kind of guy when learning this stuff.

So here are my comments...

1. link to the flv file from the swf

How?

2. call it in as you do with external jpg's.

How?

3. Create a new large enough flash file?

I have a mpeg and avi... what are the steps to "create" flash file? How large?

4. from the Libry menu choose New Video>

What Library menu? In Studio 8 I see File > New Video

I see a Library "panel" where FLV videos are auto listed when encoded/imported. And a video player graphic is auto placed on the "stage".

5. place an instance on the stage and resize it to fit the video file,>

An "instance"? I do see a box representing a video palyer on stage. Maybe that is an "instance"?

6. give it an instance name of VideoHolder>

OK I see I can name in the properties panel.

7. to load and play the video with a button attach this code to your first frame.>

This I don't know how. When I import the video into Studio 8, the program gives a choice to assign a playback control or 'skin", called 'FLVPlayback'?. I see in parmaters it's "contentPath" is race.flv. So is that the "link"?

When I I do Export > Movie, two swf files are saved, to folder, one race.swf and the other ExternalPlaySeekMute.swf (the latter is the playback control code).

8.(make the button obviously first)

video_btn.onRelease = function() {
myVideo_nc = new NetConnection();
myVideo_nc.connect(null);
newStream_ns = new NetStream(myVideo_nc);
VideoHolder.attachVideo(newStream_ns);
newStream_ns.play("whatever.flv");
}

Again this is greek to me where to place this code and why. Thought the skins/playback control does this automagically and puts the code in the swf?

9. Just upload whatever.flv and the swf to the same folder on your site

This I know how to do ;-) Upload both the flv and both swf's.

10. and embed the swf as usual

As "usual"? Sorry, don't understand... still a newbie here ;-)

I would think a step-by-step tutorial for creating a Flash Video and assigning playback controls and adding to a web page would be available at Macromedia site or in help file or some other guide that explains all of this. There are so many options and and one wrong setting... If then else if then else ...

Thanks for any ideas on above.

Woody

Woodymon

5:40 am on Oct 15, 2005 (gmt 0)

10+ Year Member



OK i got the progressive Flash 8 video to run. I used the HTML code outputted by Flash Pro when exporting the movie.

However playback controls are still not showing up.

Within Flash Pro, when I select Control > Test Movie
I observe the video without the controls. However If I stretch the bottom edges of the test window I do see the control.

And if I choose Control > Debug Movie and Control > Test Scene I observe no errors and the playback controls display.

I'm missing an imprtant step here but don't know where to look.

Something special I need to set with Publish Settings to make the playback controls render on the web page?

Woody

Richard_N

7:14 am on Oct 15, 2005 (gmt 0)



Problem with encoding for flash player 8 alone is that it may not be widley used as yet. Flash player 7 has a much wider installed base, and you should making sure your movie is accessible to them with teh minimum of fuss, not everyone will wish to upgrade just to view your masterpiece.

IMO the time to ditch player 7 compatability is not here yet.

OK as to the code and instructions I gave you are for MX2004 but as studio 8 arrived this week I have not had time to investigate it. I presume its flash 8 professional you have?

Fact is, what you are asking really requires some knowledge of flash and forum answers have to assume some degree of prior experience, rightly or wrongly, when replying.

I would suggest you go and buy a book on flash 8 and/or actionscript. You really need to understand some basic flash concepts, "instances" and code construction syntax for example before tackling a job like this, at least it will give you a better understanding of the answers given here.

Woodymon

7:36 am on Oct 15, 2005 (gmt 0)

10+ Year Member



Although I want to test the differences in embedding and progresive formats, and observe diffs between FP7 and FP 8 formats, I've been unable to get the playback controls to display on my webpage, even when encoding video for Flash 7.

I just found tech doc at
[macromedia.com...]

"FLVPlayback skin SWF must be in same directory as HTML file"

This may be related to my issue. When I put the skin's swf in the root directory, where index.html is located (that is the page the video is playing on). I still cannot observe the playback controls (otherwise the video runs fine).

Sounds if you may be not up on these topics or Flash Studio 8. And yes in my orginal post I stated I was a newbie. So tossing new technical terms into the mix without directing me to resources where I could find definitions or clarification was pointless. And I did ask for recommends for a book.

With further research I found much helpful info at
[macromedia.com...]
and
[macromedia.com...]

And I just found Macromedia user support forums at
[webforums.macromedia.com...]

Woody

Richard_N

11:25 pm on Oct 15, 2005 (gmt 0)



<quote>Sounds if you may be not up on these topics or Flash Studio 8</quote>

Thanks, nice to know my help was appreciated. Sorry but that is a completely uncalled for remark. "instance" is hardly a technical term after all.

Actually I was trying to help and I am well "up" on both embedding video (having done it on numerous occasions) and the basics of Flash 8 thank you.

Frankly with your attitude sort it out yourself, if thats what you get for offering constuctive help I don't know why I bother.

Woodymon

10:16 am on Oct 16, 2005 (gmt 0)

10+ Year Member



Richard-

You stated "as studio 8 arrived this week I have not had time to investigate it. I presume its flash 8 professional you have?"

So I replied "Sounds if you may be not up on these topics or Flash Studio 8."

Why do you take this as an offensive remark?

Also when I described the issue was with rendering playback control created in Flash Pro 8, you did not respond to that issue. So that is I meant when I stated "you may be not up on these topics". I did not say that you did not know what you were talking about. You just were not responding to my issue at hand.

And also I stated a number of times I was a newbie. Yet you did post not step-by-step on how to get get the playback controls, but a quickie sumamary of how you as an advanced user would do things, which i did not understand. Nothing ablout FLVplayback or the playback controls one can choose when importing a clip into a movie.

I stated several times I appreciated your feedback was appreciated and I thanked you. Yet you berate me. Now that was offensive.

If you are not able to come down to the level of the audience posting the orginal question, then yes why do you bother responding?

Again I was not intending anything offensive. Sorry you took it that way.

Woody

Richard_N

11:19 am on Oct 16, 2005 (gmt 0)



well I have no intention of getting into a slanging match, but having now looked at flash 8 there are some fundamental differences in its video capabilities based mainly round its abilities to handle alpha channel editing and its video encoding using revised codecs rather than the sorenson squeeze codecs it relied upon before.(I new about this before upgrading, we do not upgrade blindly, only for fundamental improvement, and have been using flash in our business since flash 3).

It was this facility and the improved font rendering that persuaded us to upgrade, otherwise the interface and scripting language remains largely unchanged.

That said to publish solely for flash 8 (at this time) is IMO not good practice which was what I was trying to point out. Most still have player 7 (or below, see the cross browser thread here).

I provided a relatively simple step by step instruction on how to load and "stream" (not true streaming) an flv from within a basic .swf file, have not checked the actual mechanics of the possible menu changes in flash 8 but would have thought even if menus have changed it would be relatively simple to work round to where a particular command may have been moved.

People here who give up their time to try and help have no idea of the skill levels of the poster, newbie can mean anything, new to flash, new to actionscript, what? compared to the likes of colin mook I am an newbie, its a relative term. We just try to provide solutions (which whether you like it or not is what I did), but I do not believe we should be berated or expected to effectively do it for you when you dont understand the answers, at least unless you ask us nicely, when I among others are only to happy to try and solve the problem, (ask phorm when I actually went onto his website and sorted the problem for him because I could and he could not).

As to the code I provided, it does not rely on the skinned media component which is causing you so much trouble (flash 8 specific anyway hence my earlier comments), it creates via actionscript a link between an external flv and an actionscript controlled video component which will work in player 7 or 8 and does not rely upon a pre made skinned media component which if past macromedia components are anything to go by tend to add needless file size to the finished swf.

Having just checked flash 8 the menus have not changed, in a new document as described click on the icon on the right of the libray palette and click new video object, drag that to the stage and in the properties panel give it an instance name (where it says <instance name> so not rocket science).

Then just follow the instruction I gave earlier, frankly I have no idea why I am helping you, other than to justify myself, but PLEASE do not tell me I do not know flash.

Woodymon

11:58 am on Oct 16, 2005 (gmt 0)

10+ Year Member



Again I appreciate your followup and again I did not in any way tell you you did not know Flash. Why would I do such a thing? After all I was asking you questions and if I thought you did not know Flash I certainly would not be asking and following up. And I never look a gift horse in the mouth. I do appreciate you sharing your time, knowledge and experience. And finally please note when I orginally posted I stated I was a "Flash newbie". I am new to Flash, but learning as much and as fast as I can. I don't know how to be more clear than that.

And no slinging match intended and I did not berate you.

Also I believe you when you suggested to author in Flash 7. But the canned playback controls available in Flash Pro 8 are not supported in Flash 7 embedded video. Thus my desire to get working with Flash 8 movie.

Anyway, I discovered I can get an "over" playback control to render on embedded video in webpage (e.g. MojaveOverPlaySeekMute.swf)

(I also discovered that the two swf files, the flv, and the calling html must be in the same directory for the control to render... go figure).

But if I choose "external" playback control (e.g. MojaveExternalPlaySeekMute.swf) the control will not render on webpage, (but the Flash Movie auto starts and plays jsut fine).

(My tests were in Firefox 1.5b2 and IE6).

I do plan on learning the basics of ActionState but right now I wish to focus on learning/utilizing the automated controls and wizards built into Flash Pro 8, without having to learn ActionScript.

If I discover how to make the "external" playback control render I will post the solution

Woody

Woodymon

4:01 am on Oct 17, 2005 (gmt 0)

10+ Year Member




Issue solved:

- the FLVplayback component SWF (skin or playback control GUI) must be uploaded to the same directory as the calling HTML file.

- the pixel height of the control needs to ADDED to the height of the video clip in the HTML (not in the Flash Pro 8 FLA file properties palette).

Woody