Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any program that allows encoding a video file into a H.264 stream inside a SWF, or that allows muxing an existant (x264) stream into a SWF?

If not, any other possible codec better than Flash Video for a SWF? (I suppose it's possible since Youtube uses H.264 and AAC already)


share|improve this question

4 Answers 4

up vote 0 down vote accepted

Camilo Martin

You won't be able to encode H.264 to swf because as mentioned, swf supports Vector Graphics. You can't encode H.264 using flv container either (using ffmpeg, etc) because the authors intentionally prevents this for copyright reasons. You would have to purchase H.264 licenses to encode to flv. (YouTube has H.264 flv because they purchased the license to do so.)

The best thing you can do is encode your file to h.264 mp4 container and create or use an swf player and include XML meta data and tags to stream the mp4 file. Its just like using H.264 flv and the JWPlayer is great for doing this with Flash Player 10.

This worked great for me!!!

share|improve this answer
Thanks for the answer. But are you sure Youtube has H.264 FLVs? Their H.264 streams seem to be encoded in mp4 containers. –  Camilo Martin Feb 14 '10 at 19:46
This is wrong... You can compile FFmpeg yourself with h.264 support. I have x264 in my FFmpeg build. –  Wyatt8740 May 7 at 2:36

The simplest solution would be to import the video into Flash then play about with it there.

Another way, depending on where you're using the SWF would be to make a video player in Flash then use XML (or any other method, I don't know Flash or AS) then stream the video through the player.

But I don't know of any software which fits your precice needs.

share|improve this answer
The problem is I don't know Flash either. I just wanted to have a nice quality video in SWF since Flash video and MP3 are not the best for low bitrates. –  Camilo Martin Jan 6 '10 at 17:41
@Camilo, if you are using an external encoder, you can tweak things a bit. I was able to get decent size/quality out of mp3 with lame using 8-bit mono 22khz sample rate, YMMV. For the video, it sucks but you can use 3rd party encoders that get better results than what comes with Flash. –  Tracker1 Jan 16 '10 at 3:18

Wish I had a better answer for you. For compatibility you're pretty much stuck with FLV. FLV is geared towards a longer encoding time, and a less-cpu intensive decoding. If you don't go too nuts with the size targeting you can get sizes and quality similar to mp4 (non-avc, no h.264) with flv. It's worth noting that there are some 3rd party FLV encoders that do a better job than the ones that come with Flash, most are commercial though.

IIRC, FLV uses an encoding from a company that was bought out by Google last year and an earlier version of that codec was the base for Theora.

share|improve this answer
flv is container not encoder! –  Maciek Sawicki Jan 16 '10 at 3:27

Why not use flv ( http://en.wikipedia.org/wiki/Flash_Video )? it's Adobe container that supports h264. You can do this with ffmpeg or vlc.

SWF is for Vector graphics ( http://en.wikipedia.org/wiki/SWF), and I'm not sure if it supports h264 directly. I think programs like "Alice H264 to SWF" just embedding flv into swf.

If You need easy option to play flv You can use flash based player (JWplayer for example).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.