Producing H.264 with the Flash Media Encoding Server

Flash Media Encoding Server

Controls available in Flash Media Encoding Server are much more extensive than Adobe Media Encoder, but you start pretty much the same way: choosing your container format and preset (see Figure 12).

Figure 12. Choosing a container format and preset in Flash Media Encoding Server

Flash Media Server and Flash Player can both stream or play back any H.264 file in virtually any format, so either the F4V or MP4 container would work. If you want a file that can be played by both QuickTime Player and Flash Player, I would choose MP4; otherwise, use F4V. Choose a preset that uses a resolution equal to or higher than your target to ensure that you use the proper Profile and Level.

Figure 13 shows the H.264-related parameters in Flash Media Encoding Server. On the left are the default values for the preset selected in Figure 12. On the right are the values I would use. Big red asterisks identify recommended changes from the preset values, none of which are very dramatic.

Modifying the H.264 encoding parameters:
default values on the left, recommended values on the right

Figure 13. Modifying the H.264 encoding parameters: default values (left), recommended values (right)

As I discussed earlier, I would extend the GOP size to 300 and use adaptive B-frame placement to provide the encoder with maximum flexibility. Extending the number of reference frames from 2 to 4 potentially increases quality at a slight cost in encoding time and decoding complexity, while disabling fast inter and intra decisions again potentially increases quality, with some increase in encoding time.

Overall, my recommended values should produce optimum quality, though at the outer edge of encoding time. If throughput is critical, I would do the following:

  • Use the default value of 2 for reference frames
  • Enable all "fast" encoding options
  • Use a 16 × 16 Search shape
  • Use a Full pixel for Motion estimation subpixel mode
  • Enable two or four slices, assuming that you were encoding on a multiple-core system

If you take this route, however, you should compare the output from these parameters with the output using the recommended settings shown in Figure 13 to see if the faster encoding parameters make a noticeable quality difference.

On the audio front, I would use the default values and change only the target bitrate and channels to match my targets. I also use the default values for other H.264 encoding parameters, like Timestamps and Sequence End codes, that Flash Media Encoding Server makes available.

That's it! Go encode some video.


Comments (4)

Per olsen
Said this on 1-26-2011 At 06:01 am

confusion about H.264

Flash is at container format, normaly compressed using VP6/spark/H.264

wicki says that MPEG4 AVC/ H.264 is "the same" http://en.wikipedia.org/wiki/H.264

question; You use H.264 codec for F4V file, what is your reason for this, wouldent MPEG4 AVC give better quality for same bitrate ?, and suported for same versions of flash player.

im using an AVCHD camera, shoot in HD, cut and save as avchd (codec) in MPEG4 AVC file, this quality is much better, on the net,  than when i save in flash. i think this is becaurce i keep same format, through the proces.

Best regards

Per Olsen Denmark

Said this on 1-26-2011 At 05:12 pm

Per:

>>Flash is at container format, normaly compressed using VP6/spark/H.264.

Correct.

>>wicki says that MPEG4 AVC/ H.264 is "the same" http://en.wikipedia.org/wiki/H.264

Correct.

>>question; You use H.264 codec for F4V file, what is your reason for this, wouldent MPEG4 AVC give better quality for same bitrate ?, and suported for same versions of flash player.

They're the same - H.264 is the same as MPEG4 AVC.

>>im using an AVCHD camera, shoot in HD, cut and save as avchd (codec) in MPEG4 AVC file, this quality is much better, on the net,  than when i save in flash. i think this is becaurce i keep same format, through the proces.

Not sure what you're asking here, sorry. Please:

- when you say "save as avchd (codec) in MPEG4 AVC file" what are the parameters? (resolution, frame rate, data rate).

- When you say ""i save in flash," again, what are the parameters?

Let me know and maybe I can be more useful.

Jan

Said this on 6-22-2011 At 08:20 pm

Hello Jan.

I want to thank you for all your great infromation and tutorials you host here.

They are great!

Specially this one, you made me clear my mind in a lots of things about h264.

I'm actually encoding a file right now (I use Rhozet Carbon Coder 3 which uses the same h264 enconder as Adobe) Everybit of the guide helped :D

Thanks a lot for that.

You'll see me around here, at least, reading stuff.

Greetings from Argentina

 

Sincerely,

Cristian.

 

Said this on 6-22-2011 At 08:31 pm
Cristian:

Wow, thanks for taking the time to write. Carbon Coder is a great tool for H.264, you should get very good results.

I'm glad that you're finding the site useful.

Thanks again.

Jan
Post a Comment
* Your Name:
* Your Email:
(not publicly displayed)
Reply Notification:
Approval Notification:
Website:
* Security Image:
Security Image Generate new
Copy the numbers and letters from the security image:
* Message: