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

How to setup to play H264 files? thanks!

41 replies [Last post]

My client want to convert their WMV to H264 and use flash player, it seems JW player is right for that.
I convert one WMV to mp4 and put the mp4 file on my server. But I could not let the player to play it . It seems it tries to load, but nothing happens.
I think I don't need playlist, I can just use the link to the mp4 directly, right?

I am not what I have done wrong, any suggestion?

1) Your Adobe Flash player has to be version 9.0.115.0 or better (latest version 9.0.124.0)

2) I used QuckTime 7 Pro to encode videos to H264/AAC (m4v container). I was traying to set up .mp4 and .mov files, but only .m4v files work.

thanks for you reply.
I think I am not clear on a basic things here.
I think people go for flash to make sure most users can play a video without trouble. just like how YouTube works. i thought they convert their videos to flv (flash file). How does H264 work, it seems we don't need convert it to flv? or we can not convert it to flv? If we convert video to flv, we don't need worry about if flash player can play it or not since flash player for sure can play flv?

JW player doesn't mention it can not play .mp4, but read some posts here, it seems it can not play .mp4. On other forums, I was told you can play .mp4 by changing its suffix to .flv. quite confused.

As I understand (I had some tests):

1) Adobe Flash player understands all H264 mp4 files (mp4, .mov, aac, 3gp)
2) JWP does not play H264 as .mp4
3) JWP does not play H264 as .mov
4) JWP plays H264 as m4v (the same QuickTime .mov - the "suffiix changed to .m4v)

I do not like flv - I used Sorenson Spark and Riva encoder (as well as Window Media 9). I prefer H264.
I tested your info above - to change "suffix" mp4 to flv - is does not work.

The current version 3.16 of the JW FLV Media Player plays H.264 video quite well.

I would suggest that you download an H.264 video from Google Video (so that you know that it is formatted and encoded correctly) and try it.

file=http://my.domain.com/path/file.mp4
type=flv

ffmpeg also does a good job of transcoding various other codecs to H.264. Please see this thread: http://www.jeroenwijering.com/?thread=10092

Use the: Search this Site for "ffmpeg" for other threads discussing ffmpeg.

If you would like to make one of your videos available, I will transcode it with ffmpeg and give you the ffmpeg switches that I used as well as the transcoded video.

Hi therem
Your player is going really good, but i am also facing problems with .mp4. you can see here even i am using .mp4 downloaded video from google.

http://www.n.dk/test_guide.asp

<embed
src="http://www.n.dk/webtv/player/mediaplayer.swf"
width="500"
height="426"
allowscriptaccess="always"
menu="true"
allowfullscreen="true"
flashvars="height=426&width=500&file=http://www.n.dk/webtv/videos/testgoogle.mp4&searchbar=false&image=http://www.n.dk/webtv/images/videothumb.jpg"
/>

Regards

________________

Well .mp4 is working now, but it play after downloading all of then video.
I mean player need to download 100% .mp4 video and then it starts? & in flv format it works at once..

Well, i worked.... :)

Hi,

I also have the Problem that video Playback starts only after full download ...

is there a special encoding parameter to make the video streamable ?

"I also have the Problem that video Playback starts only after full download ..."
I testet it with mp4, m4v, flv, the h264 video only starts to play after 100% loading :(

and what´s with *.f4v files (from the flash media encoder) ? only rename them to .flv or mp4/m4v to work? (I tried it an it works, but any disadvantages?)
thx for your help

I found a way to make it work ...

I encoded a file to .mp4 using ffmpeg (commandline is from somewhere here in the forum)
ffmpeg -i test.avi -acodec libfaac -ab 128k -ar 48000 -s 320x240 -r 25 -vcodec libx264 -b 256000 -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me umh -subq 5 -trellis 1 -refs 2 -bf 1 -coder 1 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 256000 -maxrate 4M -bufsize 4M -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 21 test.mp4

On this site: http://www.adobe.com/devnet/flashplayer/articles/hd_video_flash_player_02.html

Near the end, i found a reference about moov atom ...some information that is needed for starting playback....and a utility "qt-faststart.c" to move this information located at the end of the file to the start ...

They talk about .mov files ...but i gave it a try and it works...a ~40min movie starts after caching 2% ..

Hi Guy,
I had same problem in streaming .mp4 file, well then my mroject manager used "media encoder 9" for encoding its free to use...

try and enjoy it :)

www.Shinegrafix.com
Regards!

i need a commandline utility for automated conversion on linux ...so ffmpeg is my choice

i also found out that

MP4Box -isma test.mp4

also does the trick ...

@Raven

Hi Raven

You are about to save my life !!!

I've been looking for a solution for my video to start before it is actually 100% downloaded...

Ok now, I've downloaded qt-faststart.c but how do I use it ?

Somebody knows if the player can display an mp4 uploaded in Interoute ? I also uploaded the video as a flv but it doesn't work either

Thanks

@Jean-Sam,

I was running into the same problem. In the header of the script (qt-faststart.c), you'll see this:

* Compile this program using:
* make qt-faststart
* Invoke the program with:
* qt-faststart <infile.mov> <outfile.mov>

In OS X, I entered gcc qt-faststart.c in the terminal to compile it and it generated a file called a.out. I then did this to use the script:
./a.out sample1.mov quickstart1.mov
It appears to also work with MP4 in and out files. Any Linux distro would be comparable and you'll probably use the same commands. If you're running Windows, Google "windows c compiler" and try any of the results.

Thanks for the link, Raven! I've been struggling with this problem for some time, and now it works.

I have my site with .mp4's and they start without a full DL.

http://www.theroyal1.com/flashvids.htm

as Raven said, This is a achieved using mp4box because you have to get the MOOV atom to the beginning so that it can read it and begin playback.

If you want you can also use YAMB (What I use) it's pretty much a 2 click solution.

HIH
-Royal

I answer my own question. The problem was the same other posts are describing in this thread: the videos don't start inmediately. With QTIndexSwapper http://renaun.com/blog/2008/02/25/250/ (similar to qt-faststart tool) it seems to be solved.

Regards

A quick note for those who are having trouble playing h.264 files and having to wait for full download. Make sure the meta data when encoded is played at the beginning of the movie file and not the end. If it is at the end than the movie needs to be fully searched before it knows what to do with it. a great adobe AIR program mentioned above will automatically do this for you (QTindexSwapper.air)

Hello ,

I am unable to play mp4 files i have tried a lot doing all the activities like instal updates flash player and my level best but i am unable to play mp4 files

Transcode video to H.264 with defaults of MediaCoder

http://mediacoder.sourceforge.net

For audio I deviate from defaults using

Encoder: FAAC
MPEG version: MPEG4
Container: MP4

Video then streams (100% download not necessary). No other malarkey required.

MediaCoder will NOT foobar your DirectShow filters

Using vista? *upgrade* to XP Pro.

Then for best local preview/playback results use CCCP

http://CCCP-project.net -- officially endorsed by the Matroska developers very much UNlike evil K-lite

(DirectShow filters)

@IntolerantOfEvi

I recently went thorugh a lot of pain trying to use MP4 in the Media player. You need to convert your files to H264.

I tired a lot of diffrent programs to convert the files, and Quick Media converter is the one that worked best for me. best of all is free.

http://www.snapfiles.com/get/qmconverter.html

Or you could use Sorenson Squeeze... make sure your MP4 flavor is AVC or someting like that... I think that's their equivalent to H264.

And, finally you need to add this line to the end of your track, just before the closing </track> tag:

<meta rel="type">flv</meta>

If you use Quicktime Pro or Compressor (part of FinalCutStudio) to convert your files to h264 you should check "Prepare for internet streaming" and then choose "faststart" .This worked for me perfect, my files started in the JW Player while downloading. By the way:the file format is .mov, no problems so far.
Joker

@Joker - that worked for me in Compressor. Note that "Fast Start - Compressed Header" does not seem to work.

Hi

Struggling with this myself.

Tried the last two quicktime methods which work to a point.

If you go into fully screen mode it will not go back on ESC to a small player and plays audio but shows a black screen. If you guess where the full screen button you can go back and forward.

Is this your experience

Just use Quicktime to compress the video into .h264 and make sure fast start is enabled then do something like this.

so.addParam('flashvars','&file=whateveryourmovieis.mov&skin=snel.swf&controlbar=over&autostart=true&fullscreen=true&stretching=exactfit');

Supports .h264 just fine no need to use lame command line compressors or special methods.

You will need the full version of Quicktime Pro to get those features to export the .mov format with .h264 properly.

Tip: Be sure not to compress your video twice. IE: Render in AE in compressed Quicktime format then re-compress the file in say Sorenson Squeeze - That's a big nono and you'll loose quality. Just render the video at a lossless format then open in Quicktime Pro and export it with fast start. Also, stay away from the color Red with text in .h264 it comes out pixelated. .h264 Also tends to mess with your contrast and make the video seem muddy. A good way to get around this is to use one or more of Quicktimes filters and add a little color or contrast to the video during export.

Hope that helps.

i want download h264

I use Sony Vegas to edit my videos, then 'render as' and select 'MainConcept AVC/AAC (*.mp4)'. After its rendered I use the 'MetaData Mover' tool to move the metadata to the beginning of the file. Upload, and my movies are playing fine in JW 4.1

See this thread for metadata mover link...

http://www.jeroenwijering.com/?thread=10766#msg88184

So are you all saying that playing Flash F4V files in JW Player is not possible? Even though Adobe Flash Player can play these files and Adobe indicates it can be done progressively?

I would like the answer to f4v files as well. "Can JW Player play them"?

JW?

Cheers

Did anyone get an answer to the F4V question? can JW Player play them?

My h.264 files in a .m4v container work nicely in flash compressed using quicktime 7 and the default video for ipod preset. Only problem is flash isn't reading the length and the player is displaying 0:00 to total play length..
any thoughts?

I use Sony Vegas too, and had a heck of a time getting my Mp4 videos to stream. I found MP4 FastStart and that did the trick.

http://www.datagoround.com/lab/

when mp4 is opened given massage insurt usb cable
when i press enter software is not loaded what can i do

I am trying to stream .mov/.mp4/.avi files through Quicktime Streaming Server and play it in a flash based player. But, for some reason I cannot play the video. For each file I get an error saying that the video file's structure is invalid. Where am I going wrong? Is it the server that cannot be coupled with flash?

Note: I used <http://www.adobe.com/devnet/flashplayer/articles/hd_video_flash_player_03.html> tutorial to develop my player.

Which server would you use if you wanted to stream H.264 video to a flash based player?

I use wowza but havent gotten it to work yet...

if you have the tech savvy to install and maintain it Id go with RED5

its free

avee:

I am in the planning stages of developing a video streaming website and have the exact same question you did. Can I use Quicktime Streaming Server (Leopard) to serve H.264 files to be played in a Flash player? The Quicktime plug-in does not support fullscreen and while there are workarounds to this (using .qtl files to launch Quicktime in fullscreen mode, for example) I would rather use a Flash player if that is possible.

Any thoughts, anyone?

I've used QTIndexSwapper2 and am getting sound but black screen on video. It plays on my pc fine but with the player online it fails. Anyone have this problem? It is an mp4 file converted.http://www.jamestownrecord.com/mp4test.htm

@Sav - I see the video / hear the sound. Can you clear your cache? It works fine for me here.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic).

More information about formatting options