Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Moviestar: H264 MP4 playback

46 replies [Last post]

I'm totally excited about the new "Moviestar" Flashplayer beta announced for later today ([url=http://www.readwriteweb.com/archives/adobe_flash_player_moviestar_h264.php]blog[/url] [url=http://www.kaourantin.net/2007/08/what-just-happened-to-video-on-web_20.html]blog[/url] [url=http://slashdot.org/article.pl?sid=07/08/21/1235201]/.[/url]), that will support H.264, HE-AAC and TT in FLV, and partly support MPEG-4 and 3GP containers (no details yet on what "partly" means). Sadly, Flash seems to be the only widespread, cross-platform, scriptable and working solution for in-browser video, so opening it up to standards is a big step forward.

My guess is that mediaplayer will support any new video/audio codecs inside FLV because it doesn't deal with codecs, is that right?

And what about mp4 files? Does mediaplayer support them as soon as Flash supports them, or will it support them?

I just read [url=http://www.kaourantin.net/2007/08/what-just-happened-to-video-on-web_20.html]TFA[/url] I linked to:

All your existing video playback front ends will work as they are. As long as they do not look at the file extension that is, though renaming the files to use the .flv file extension might help your component. The Flash Player itself does not care about file extensions, you can feed it .txt files for all it matters. The Flash Player always looks inside the file to determine what type of file it is.

so mediaplayer should be fine with it

@orange,

So, where's the Beta? :)

I know of at least the following extensions, that ought to be playable now: 3gp, 3g2, mp4, m4a, m4v, aac. first and second generation 3gp, mp4, just aac audio, and avc video, raw aac audio. not fully sure about all those. tinic uro has quite technical info, but no list....

hello Jeroen,

i put up a sample mp4 video here: http://www.du-nichts.net/pix/dunic-walking.mp4 - if you go there, quicktime player will start playback almost immediately, like when embedded: http://www.du-nichts.net/walking-mp4.html - on this page its in your mediaplayer,
http://www.du-nichts.net/walking2.html - this is not a public page and wont be for some time - the latest flash plugin is not widespread...

thank you for your attention

peter

hello Jeroen,

now that adobe did a beta that supports playback of mp4, will you update mediaplayer? you say in the readme, that it scans the filename, so you have to change the file, dont you?

http://labs.adobe.com/downloads/flashplayer9.html
http://www.kaourantin.net/2007/08/what-just-happened-to-video-on-web_20.html

peter

I believe you refer to the news on Flash going to support H264? As soon as the plugin is available, I'll make sure the mediaplayer supports H264 video as well. It's indeed a big step forward for video inoperability!

:)I already test it. I compress some trailer into mp4(h264/aac) using Mencoder. JW Player work greate with rename video extension to .flv. You can get Flash Player 9 Beta at http://labs.adobe.com

This stuff is great, I cant wait till JW player supports it fully.

Ive been looking at CPU use with h264 files and the new flash beta. With Adobe's sample, I find that CPU use is less in fullscreen mode than in normal mode! Even when looking at a higher resolution h264, eg 960x540 25fps 2000kbits, CPU use is lower than with current youtube or blip.tv players in fullscreen mode.

For now using JW player with .mp4 renamed to .flv, I get much better fullscreen CPU use if I remove code that sets smoothing and deblocking. But I dont really know what I am doing, and I havent noticed if Ive ruined quality, or what other changes can be made to get the most out of their fullscreen mode.

Here is the (not very good) video playing using adobes sample code:

http://www.unquack.com/fullScreenSourceRectDemo.html

Here is JW Player playing the same file:

http://www.unquack.com/jw.html

Here is modified JW player with some smoothing/deblocking stuff removed from the actionscript:

http://www.unquack.com/jwmod.html

Try them out in fullscreen and note the variation in CPU use. On a 900Mhz Celeron UMPC only the version that uses the adobe sample code, plays back respectably.

Cheers for making an absolutely amazing player by the way, with this addition of h264 support in flash I'll probably become a licensed user of your player at some point, once Ive learnt a bit more flash.

OK someone pointed me in the right direction, heres the info required to get nice fullscreen performance:

http://labs.adobe.com/wiki/index.php/Flash_Player:9:Update:Full-Screen_Mode_HW

Yes, fullscreen hardware support allows for much smoother and CPU friendly video. Nice job of the folks at Adobe! And I've improved the routines for deblocking in the 3.11 player, which shouldn't cause any problems anymore.

I've added the mimetypes for mp4, m4v and 3gp to the 3.11 version of the player. Playback now works just fine (if you have the latest Flash Player beta). Have a look [url=http://www.jeroenwijering.com/extras/streaming.html]at this page[/url].

dear Jeroen,

please add .3g2 to the file-endings, as only in this version of the 3gppp spec h264 video is supported, see http://tools.ietf.org/html/rfc4393 - so that pedantic users can correctly name their files ;) the document that describes .3gp was produced before h264 took off: http://tools.ietf.org/html/rfc3839

thank you, the new player works fine!

aside: would that bloat the player, to check the flash version, when an mp4 was requested, so that on an older plugin it displays a warning instead of downloading the file? eg: "A newer version of the flash runtime is required to display the chosen media." Because the outcome is, mildly said, catastrophic. for javascript gurus the state variable might hold a new value then...

regards.

peter

how about flvplayer?

@smoothdvd: working just as well with h.264

Thanks for the new version of the player :)

I just hacked up a version that makes use of the hardware fullscreen, wow it really does make a huge difference. Its a shame I cant do this hack properly, as Im too dumb to recode all the stuff that changes position etc of diplaybars in fullscreen mode, likewise Ive only got round video scaling issues by setting overstretch to none. And I changed deblocking to 0 as I read somewhere that sets it to auto. I also had to change the background color of the swf to black, and then I was wondering whether the swf framerate being set to 20 actually means anything - does it throttle framerate to 20fps, or i it overridden somewhere?

So, as you can tell, I dont eally know what Im doing, but here is my attempt at hardware-accelerated fullscreen jw media player, it has many flaws due to my inability to code, but it does show off the vastly reduced cpu use:

http://www.unquack.com/mediaplayere.html

@steve

I am on a linux system, where playback of mp4 in flash is "beta" in my view. Your version does much better with fullscreen, indeed.

peter

@Steve Elbows: what did you change to get the hardware rendering to perform better? Just the smoothing=false? Do you have suggestions for changes I could make to the scripts?

Yeah sorry for not being more specific about what I changed, I assumed you'd already seen that adobe document, and just hadnt had time to implement the changes yet.

My version was just a fudge, had deblocking at 0, smoothing off, overstretch set to none in config, and stuck a fullScreenSourceRect thing in the code somewhere. Because I havent done it properly, it only works if the video is the same size as the player. Im also not sure how much fullscreensourcerect will break compatibility with previous versions of flash, if at all, I guess thats something to bear in mind?

Yes, it breaks compatibility with the previous versions quite drastically. So I won't be adding support for this right now, but when this new plugin version has been officially released.

I also tried out the new beta, but found some hefty problems with the newer versions of your player: massive Chromatic Aberrations! The chrominance channel seems to be at least 20 pixels off the Luminance picture. It only happens in your players version 2.5 and up, earlier versions, as well as the modified verion 2.4 from Blip.tv work fine.

New version 3.11 showing me bad results on vp6 videos, many blocks...

I changed between 3.11 and 3.8(my favourite!) many times, 3.11 is definitly bad in quality :|

On 3.11 my "high quality" vp6 movies looking like these old crispy youtube videos.

What is the reason?

Ive installed Flash 9.0 r60 (beta) today, and i can“t use my mouse in fullscreenmode anymore \o/ :d

There's indeed a little bug in VP6 deblocking. I've changed it in the source and it'll be fixed in the 3.12 player. FYI: in line 60 of the FLVModel, change "videoClip.display.deblocking = 2;" to "videoClip.display.deblocking = 4;"

I'm not sure what's the problem with fullscreen-mousing on some systems. Will keep this in mind. Also not sure what can cause the chromatic problem. This might be one of the quality of filter settings not supported...

here's a pic of the problem, looks really awful: [url=http://i9.tinypic.com/4znwjyt.jpg]CA image[/url]

(top half: working version, lower half: CA Problems)

Never seen such results on my VP6 Videos...all fine here.

it's just the H.264 using the newer versions of the JW player. all other flv formats are fine.

It is indeed too early to depend on H264 for your website; it'd require nearly al users to upgrade their plugins.

Sorenson video is already in Flash from version 6 though. It is widespread and free (through FFMPEG) to encode.

The Flash8 video format is called VP6, from a company called on2.com, it is better than Flash6 and just about as good as H264. Encoding tools for this format are expensive though, since it's a proprietary format.

@Mike S.: In what way is my playe net optimized for H264 playback? Can you give examples of things I should change to fix it? As far as I know there's not really much to change, it's just that users need the right plugin version for this.

@jongsbee: Indeed, hardware scaling isn't there (yet). Once the 9.0.100 plugin has enough support, I'll drop the 'old' (6 months?) fullscreen API in favor of the hardware-scaling one, which is a lot nicer.

Jeroen -It seems like every h264 encoded file I pass to the player plays jerky (more or less) in full screen mode. I have tried different software to encode with, so I don't think there's anything wrong with my files. Mabye the're to high quality. I need about 0,8 - 1.5 Mbit/s to get the results I want. Can that be a problem? As I said, for fullscreen - flv just is'nt good enough. It plays well (not jerky) but it does'nt matter how high bandwith I encode flv with - there's always lots of artefacts when you watch full screen. The image quality gets almost perfect with H264 in full screen, but as I said - it's jerky. I have tested on a Macbook pro 2x2,2 Ghz in OsX and windows vista (native) and the problem is consistent. Seems like the most "jerkyness" is when the file is being loaded - but it is still somewhat jerky when it has finished loading. I'm a webprogrammer (xhtml/css/php) and also a filmmaker, but not a flash expert, so I can't say what's the problem. But I have seen lots of examples of good fullscreen performance with H264 on other sites, so I know it is possible. I have heard that Adobe have some guidelines for good fullscreen performance with H264. Love your player - I use it all the time....!

Six months? Oh, I can not wait until the deadline.
Soft playing really dream in fullscreen mode!!!

Http://nickrobillard.ca/hd_demo/video/jw-mod_f9ms.html Thanks, Nick R!!
This website includes works by scaling hw JW Player.

I know HW Scaling Source slightly!!. This is simple!

In playercontroller.as

if (Stage.displayState == "normal" && config.usefullscreen == "true")
{
Stage["fullScreenSourceRect"] = new flash.geom.Rectangle(config["clip"].display.video.display.x, config["clip"].display.video.display.y, config["clip"].display.video.display.width, config["clip"].display.video.display.height);

Stage["displayState"] = "fullScreen";
}

I have suggested from the wrong source points out, can you?
Oh! Please~~

private function setVolume(prm) {
trace ("vid width: " + config["clip"].display.video.display.width);
}
This source is also required. Only then will not disappear controlbar.

Is there a way of detecting if a person has >9.0.60 installed (much like the bandwidth script) and running either video:

- movie_flv.flv
- movie_mp4.flv

At the moment? That would allow people to see the best if they have support for it, while also running the old stuff while we wait for everyone to upgrade.

Google "swfobject detect flash version"

@noobie
That works sure, but what about when people embed your flash player externally. You can hardly expect them to setup swfobject to do that for them. The detection really needs to be done within the player itself

is JW player not mine pleas adress your complains to hims

You can do this from within Flash as well, by requesting the System.capabilities.version variable. If that's 9.0.60+, then you can show the MP4.

It's a good idea to build this into a new update of the player!

@Mike s: did you see the [url=http://www.jeroenwijering.com/extras/streaming.html]Lighttpd streaming example[/url]? It looks awesome and plays back great - with FP 9.0.100. FP9.0.60 is quite buggy, perhaps that's the problem.

We can get this quality at comparatively low bitrates with Bits on the Run - just by using FFMPEG....

@Jeroen: My project is about motorsport, so I really need high bitrate files, even with H264. It seems like that is the problem. Have tried with lower bitrate files, and the results seem much less jerky. Is'nt it possible to enable the hardware scaling today? why wait 6 months? btw I have flash version 9,0,115,0, so that isn't the problem.

Well Mike although earlier in the year when I tried a hardware fullscreen enabled (badly by myself) version and raved about the perfromance, I am not convinced it would solve your problem. But maybe it would, harrd to say for sure.....

I have tried much higher bitrate versions of h264 vid at 1280x720 25fps, and it goes jerky even on a dualcore 2.2ghz machine. But when I say high bitrate, I mean more than 3000kbits/sec.

There is no direct way round this. The solution is the same as always for net video, knowing where to compromise. You probably have to cater for viewers who dont have dual 2.2ghz cpu's ,a d its quite possible that some or all of the jerkiness is caused by download bandwidth limitations. Once the file has downloaded, play it again, how much jerkiness is left? Can you pull up a cpu activity monitor on a second screen and see if its maxing out?

Anyway I think its about getting a nice compromise between the cpu use, bandwidth, resolution & bitrate. Hardware fullscreen mode will help a bit, but you should probably still aim to offer video that plays ok without it, and when it does happen it will be a nice bonus & added cushion.

So lets talk details. What resolution are you going for? Based on res and framerate, I'll give my opinion on what sort of bitrates ought to give acceptable results, and will test how these files perform on a variety of computers.

What h264 encoder are you using?

@Mike S: hardware scaling will be there a lot sooner! It's a way better fullscreen-functionality than the 'older' fullscreen one, since the entire stage doesn't have to be re-written.

I do agree with Steve Elbows. Online video always is a tradeoff. I think 1500kbit should be just about the max stream size you should offer, and 640 or 720 the max screen width. Even 640px wide stuff with H264 looks WAY better than cable TV...

I really hope that hardware scaling in the player will be very soon!

Please ;)

/Rune

@Steve Elbows: The settings I've been trying for H264 are actually 640x360 pixels 25 frames/s (standard for europe), and around 1000-1500kbits/sec. Looks pretty good played back locally fullscreen - even with my motorsport files (lots and lots of movement in the image). Flv looks like crap at the same settings (fullscreen) with these images. The cpu activity monitor is almost at bottom when playing/downloading.

Still it looks jerky, played back on a 24Mbit connection with dualcore 2,2Ghz. Yes, it gets better when the whole file has downloaded and I start it from the beginning again - but I cant ask my viewers to wait until the file has downloaded fully!? It cannot be caused by download bandwidth limitations - a 10 minute video loads fully in less than a minute when I test it.

I use the Quicktime Pro encoder (VBR) for H264, On2 Flix Pro for flv. I'm getting more and more convinced that HW scaling is the best (if not only) solution to my problem.

@Mike,

1) Why are you encoding at 25fps when the JW Player only plays at 20fps no matter what you feed into it?

2) The HD Apple commercials from here:http://www.apple.com/getamac/ads/ at 848x496 look good full screen on a P3 733MHz with on-board graphics, so I think h264 can deliver the goods.

3) Are you assuming that your users will mostly have hardware scaling? Most commodity PCs with on-board graphics chips don't have much graphics RAM or much hardware scaling.

@FlashGod, @jeroen

1. Is this true? Where does that information come from? Haven't seen it in any readme file. 25 fps is standard format here in europe. Reencoding to 20fps would give a really bad result.

I'm VideoGod, ya know.

@Mike S: though the mediaplayer SWF indeed runs at 20fps, it is totally irrelevant for the FLV framerate. FLV movies run independent from the Flash timeline, so you can use any framerate for them. Only SWF files are run in the same framerate as the mediaplayer.swf (20).

What version of flash player is required to use JW FLV Media Player 4.3?

The reason i ask is to establish if any reason to use VP6 On2 encoded .flv files for Flash Player 8 compatability or are we as well encoding everything to H.264 mp4 if Flash Player 9 is reqd?

I plan to serve low res On2 .flv files, guessing that browsers with Flash Player 8 and newer can view. I intend implementing the HD plugin to offer alertative HD .mp4 versions of each video. I understand Flash player version 9 update 3 is required for this.

If JW FLV Media Player 4.3 works with Flash Player 8, what will happen if the full screen button or HD buttons are clicked?

According to previous post, I want to double check - the point about 20fps. I havent started to use the player yet, is the .flv or .MP4 seperate to the .swf player/skin and therefore 25 fps PAL or 30 fps NTSC flv or mp4 file will be fully utilised by the player?

Hi there!

There was a variable 'is264' in main class of previous versions of the player. What's about a last one? Is there something like that? How can I find that a video is H264 coded?