Flash H.264?

Discussion in 'Web Design and Development' started by ppc_michael, May 6, 2008.

  1. ppc_michael Guest

    ppc_michael

    Joined:
    Apr 26, 2005
    Location:
    Los Angeles, CA
    #1
    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.
     
  2. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #2
    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.
     
  3. ppc_michael thread starter Guest

    ppc_michael

    Joined:
    Apr 26, 2005
    Location:
    Los Angeles, CA
    #3
    Cool, thanks I wasn't sure how to handle that.
     
  4. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #4
    No prob -- it's this little icon on every post:

    [​IMG]
     
  5. TheNightPhoenix macrumors 6502

    Joined:
    Dec 16, 2005
    #5
    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?
     
  6. AviationFan macrumors 6502a

    AviationFan

    Joined:
    Jan 12, 2006
    Location:
    Cedar Rapids, IA
    #6
    Through a Flash-based video player, or through QuickTime?

    - Martin
     
  7. ppc_michael thread starter Guest

    ppc_michael

    Joined:
    Apr 26, 2005
    Location:
    Los Angeles, CA
    #7
    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.
     
  8. AviationFan macrumors 6502a

    AviationFan

    Joined:
    Jan 12, 2006
    Location:
    Cedar Rapids, IA
    #8
    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
     
  9. ppc_michael thread starter Guest

    ppc_michael

    Joined:
    Apr 26, 2005
    Location:
    Los Angeles, CA
    #9
    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.
     
  10. ppc_michael thread starter Guest

    ppc_michael

    Joined:
    Apr 26, 2005
    Location:
    Los Angeles, CA
    #10
    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.
     
  11. jdavtz macrumors 6502a

    Joined:
    Aug 22, 2005
    Location:
    Kenya
    #11
    Can you find contact details and email them and ask how they encode?
     
  12. ppc_michael thread starter Guest

    ppc_michael

    Joined:
    Apr 26, 2005
    Location:
    Los Angeles, CA
    #12
    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.)
     
  13. AviationFan macrumors 6502a

    AviationFan

    Joined:
    Jan 12, 2006
    Location:
    Cedar Rapids, IA
    #13
    Thanks a lot, Michael! I'll have to give that a try!

    - Martin
     

Share This Page