Rails, .swf, .flv

I have the following HAML code

ul{ ‘id’ => tutorials_ul }
%li
%a{‘href’ => ‘/videos/create-command-001.swf’}
‘Edition swf’
%li
%a{‘href’ => ‘/videos/create-command-001.flv’}
‘Edition flv’

When the user clicks on ‘Edition swf’ the video plays nicely in
both FireFox and IE8. The video replaces the contents of the webpage.
Clicking the back button restores the webpage. This is exactly the
behavior I want.

When the user clicks on ‘Edition flv’ all that happens is that the video
downloads (without asking!) without playing.

How can I get the flv to behave like the swf?


I have found
GitHub - nazar/jw-playr-hlpr: JW FLV Player FLV Ruby on Rails Plugin
and downloaded and installed the plugin.

This gets me close … but it embeds the video rather than doing what
swf does.

I guess I could create new webpages … but I prefer the way
%a{‘href’ => ‘/videos/create-command-001.swf’}
‘Edition swf’
does it.

On 2 January 2011 05:07, Ralph S. [email protected] wrote:

When the user clicks on ‘Edition swf’ the video plays nicely in
both FireFox and IE8. The video replaces the contents of the webpage.
Clicking the back button restores the webpage. This is exactly the
behavior I want.

When the user clicks on ‘Edition flv’ all that happens is that the video
downloads (without asking!) without playing.

I believe this is a matter of how the browser is setup rather than your
webpage.

Colin

On Jan 2, 5:07am, Ralph S. [email protected] wrote:

When the user clicks on ‘Edition swf’ the video plays nicely in

does it.


Posted viahttp://www.ruby-forum.com/.

Colin is right, it is the way the browser handles flv’s.

If you want the flv to behave like the swf, you need to embed the flv
in a swf.

If you want to provide a link to the page, I can have a look, and
maybe drop the flv into a swf for you :wink:

Paul

paul h wrote in post #971856:

If you want the flv to behave like the swf, you need to embed the flv
in a swf.

If you want to provide a link to the page, I can have a look, and
maybe drop the flv into a swf for you :wink:

Paul

Thanks, Paul.

I know how to drop the .flv into the .swf. That’s not the issue.

First, there is a 16000 frame limit in .swf’s. That’s not horrible at
18 fps.

But the big thing is that FLVs allow for progressive downloads and
bigger files.

I am regurgitating what I learned from here:
http://www.webvideozone.com/public/171.cfm

On Jan 2, 4:53pm, Ralph S. [email protected] wrote:

But the big thing is that FLVs allow for progressive downloads and
bigger files.

I am regurgitating what I learned from here:
http://www.webvideozone.com/public/171.cfm

What that page seems to say to me is that you still have a swf file,
that swf then loads the flv and plays it - the user doesn’t request
the flv directly.

Fred

Walter D. wrote in post #971878:

Maybe you want to transcode and skip Flash altogether.

Please explain.

Flash seems to be the best compromise between compression and clarity.
I am open to other formats.

You’ll get a wider playback audience (including iDevices) and the
visitors will get dramatically better battery life/processor
performance in the bargain.

Why would that be?

Thanks, Walter!

On Jan 2, 2011, at 1:33 PM, Frederick C. wrote:

First, there is a 16000 frame limit in .swf’s. That’s not horrible
that swf then loads the flv and plays it - the user doesn’t request
the flv directly.

Fred

Right. Neither browsers nor the Flash plugin can play FLV files
“bare”, they must be wrapped in a SWF player skin, which provides at a
minimum the interface between the video data and the plugin, or more
commonly, an interface with player controls etc.

Modern browsers can play a element directly which contains
MPEG-4 or other formats, and IIRC, FLV is a lightly-wrapped H264 video
“flavor”. Maybe you want to transcode and skip Flash altogether.
You’ll get a wider playback audience (including iDevices) and the
visitors will get dramatically better battery life/processor
performance in the bargain. If you really have to support legacy
browsers, you can add a fallback JavaScript layer to substitute your
FLV in a SWF player interface.

Walter

On Jan 2, 2011, at 3:51 PM, Ralph S. wrote:

Walter D. wrote in post #971878:

Maybe you want to transcode and skip Flash altogether.

Please explain.

Convert your FLV (or, for much better quality, the original file
format that was compressed into FLV) into H264 MPEG 4 and OGG.V
formats, and serve them within a container element in an HTML5
page. There are hundreds of examples how to code that on line, and I
think I saw one earlier today in this list on another topic.

Flash seems to be the best compromise between compression and clarity.
I am open to other formats.

You’ll get a wider playback audience (including iDevices) and the
visitors will get dramatically better battery life/processor
performance in the bargain.

Why would that be?

iDevices don’t show Flash at all, and probably won’t ever. So no
amount of FLV will give you those tens of millions of eyeballs for
your movies. Sites as general purpose as YouTube have realized this
and serve up H264 for them, Flash for those who don’t understand the
standards.

Flash in general causes a dramatic spike in processor usage (to decode
the format), which translates into battery drain on portable devices.
It’s a really serious amount of difference, adding up to 1 or more
HOURS more play time on a laptop when viewing HTML5 vs. Flash.
On phones, the difference can be even more striking, like cutting your
battery life nearly in half, due to the complete lack of hardware
acceleration for FLV decoding there.

Walter