Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ppc_michael

Guest
Original poster
Apr 26, 2005
1,498
2
Los Angeles, CA
I know Flash does H.264 now, but how do I encode that on a Mac? Right now it seems Adobe's newest Flash Media Encoder thing is Windows and Linux only.

Can I do it from Compressor 2 somehow? I can certainly encode to Quicktime H.264 so it seems like there should be some way I can just change the container to F4V or whatever?

Update: Okay it's looking like I can just compress as a Quicktime H.264 file with AAC audio and it seems to load and play fine in the little Flash player I made.

But is this the proper way?

Edit: Oh, nevermind that was still referencing the FLV file. xD I still can't get H.264 to work.
 
Please don't cross post. You can use the report button to report your own posts (too) -- it sends a message to the moderators, and we would be happy to move it for you.
 
Cool, thanks I wasn't sure how to handle that.

No prob -- it's this little icon on every post:

report.gif
 
I've had a lot of success with simple h.264.mov files as progressive downloads. How exactly are you trying to do it? are you streaming it or making a progressive download? how are you brining it into flash?
 
I'm using an FLVPlayback. I use ActionScript to reference the file when a button is clicked (multiple buttons load different files):

Code:
vidPlayer.contentPath = "file.mov";

The files themselves are 640x360 H.264 Quicktime (.mov extension). I have encoded them in Compressor. They are usually around 1200kbps. For streaming I have enabled "Fast Start—Compressed Header." Audio-wise I'm using AAC at 64kbps mono.

When I click the button it downloads the video (in Safari, the Activity window confirms that) but it never displays or plays as it would if I referenced an FLV.
 
I tried to find some information on Adobe's website on this subject, and couldn't find it. Tons of stuff about playback of H.264, but nothing about the encoding. I'd love to know how to do this properly - saves me the extra step of encoding to an FLV, and better preserves the original quality.

- Martin
 
I tried to find some information on Adobe's website on this subject, and couldn't find it. Tons of stuff about playback of H.264, but nothing about the encoding.

Exactly. The only thing I can find is this, but it seems like such a "hacker-y" way of doing it, there must be some more official method.
 
Alright, I found this page, which seems to suggest that you can use any container format as long as it's encoded with H.264.

That just doesn't work for me though.

I want to load the videos on-the-fly, but just as a test I tried going over to the Parameters tab of the FLVPlayback instance, and I double-clicked the contentPath thing to locate a local file. It will only allow FLV files to be selected and won't work with MOV.

I know I have all the Flash updates because I can play H.264 content from other peoples' Flash stuff. This is just so irritating.
 
I finally got this working.

I used ffmpegX to encode the videos to H.264 [.MP4]. I've tested the ffmpeg and x264 encoders and they both work. I was unable to try the other codec, mencoder, because it wouldn't even encode for some reason.

For audio I used AAC, which is what you're supposed to use.

I've tried this with different bitrates and dimensions and it all seems to work. So yay!

(By the way, I've read that the "proper" file extension to use is .F4V. Flash doesn't care about the extension, it attempts to read the file no matter what, so if you want to be proper you could rename the .MP4 file to .F4V, but it doesn't matter.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.