Read this first if you're lost: Best encoding Practices

Demistate

Veteran
When encoding video, think about your audience. Put video into a format that is best for the audience. The easier it is for them, the better it will be for you.

Streaming video on your personal website:
Use h.264 video with AAC Audio inside F4V/Mp4 containers (They are technically both MPEG-4 Part 12 ISO containers). This will stream right away on over 90% of web browsers and your audience won't have to download a thing.

Quick Settings:
4:3 content

  • 320x240, 400Kbps, h.264 codec, 96K AAC Audio
  • 640x480, 800kbps, h.264 codec, 96K AAC Audio
16x9 content:
  • 640x360, 500kBps, h.264 codec, 96K AAC Audio
  • 960x540, 900kbps, h.264 codec, 96K AAC Audio

If 2-pass encoding is available use it. It will make your videos look less compressed without using more bits.

Encoding the file is only the first step. After that you will need to embed it into a page, and upload those files to your webserver. If you run a Wordpress blog, you can upload a .f4v/.mp4 and have it play easily.

If you're still managing your own pages you can use Dreamweaver to place FLV/F4V/MP4s video by embedding it.

There is also a free player called JW FLV Player that can let you embed FLVs into web pages, but you better know a little bit about editing HTML with a text editor.

If your video does not stream from the web server you'll need to place the MOOV atom at the beginning of the file to stream with a program like YAMB. Creating a .f4v from Adobe Media encoder should present no problems.


Free tools are: ASX gui, Stax Rip, JW FLV Player (to embed it in a HTML)

Pay tools: Adobe Media Encoder (Cheapest way to buy is Premiere Pro Standalone) , Dreamweaver(A more user friendly way to embed it into HTML)

Other Editors:
ASK YOUR EDITOR WHAT FORMAT THEY WANT BEFORE GIVING THEM ANYTHING.


An editor doesn't care about how big or small the file is. All that matters is that it can be opened and edited quickly. Quicktime is compatible with all major NLE systems. Be careful about gamma shift if you are not exporting from Final Cut Pro.
Gamma shift fixes are different depending on what software you are using to export.


SD Content:


  • Video: APPLE DV/DVCPRO - NTSC (Or PAL if you live in Europe)
  • Audio: Linear PCM

Alternatively: All major NLE softwares will have a DV exporter. If your NLE has a native DV exporter, use that instead of Quicktime's to avoid gamma shift.

HD CONTENT:

  • Video: ProRes 422
  • Audio: Linear PCM
ProRes requires Quicktime 7.5.5 or Later. You cannot create ProRes files in Windows. Blame Apple.

Free Tools: None as of this writing

Pay tools: Final Cut Studio , Quicktime Pro

Personal Archive:

Hard drives are incredibly cheap now.

Buy 2 of them and copy the entire project folder over to each drive.
You can back up multiple projects to a drive to save money. Use a label so that you can find your project quickly without plugging up the drive to browse the contents.

Store one drive near your editing machine so that you have easy access to it.
Store the second drive in a different building. If there is a fire in one of the buildings, you will still have your project data.

To go to Youtube (or other video sharing webpage):

Youtube has recently gone Widescreen and HD. This means you need to encode your files differently for Video sharing online.

See this post for more information http://www.dvxuser.com/V6/showthread.php?p=1479260

Mobile Phone local playback:
All modern smartphones support h.264 video and AAC audio via hardware. As long as it's in a ISO standard .mp4 you should have no problems playing it back.

Quick settings:

  • Resolution No larger than 640x480 (You can go smaller)
  • h.264 video codec at 1,100kb/s
  • Baseline Profile
  • Level 3.0
  • 30FPS or lower. (Use FPS that matches your source content)
  • AAC Audio codec at 128kb/s

I'm using the first generation iPhone as a basis for these settings seeing as it is one of the oldest "modern smartphones" capable of playing back locally stored video. You can go higher, but you'll limit the ammount of mobile phones that can be supported.

DVD-Video disc:
DVD operates on the Mpeg-2 video standard, and either PCM or Dolby Digital (AC-3) standard. To make the best use out of the disc's space you'll want to do a 2-pass Mpeg-2 video encode, and use Dolby Digital for the audio.

Quick settings:

  • Highest Quality: 2-pass VBR Video low 1.5mbps, video avg 7mbps, video peak 9.0 mbps, Audio Dolby Digital at 384kbps. This will yield about 1.2 hours on a single layer DVD.
  • If you are encoding DV material, set your fields to Lower (or Odd).
  • Always keep the source framerate. 23.976 is 24P, 29.976 is DV standard. (see "what framerate do I use?" section)

Free software: HCenc

Pay software: DVD Studio Pro, Adobe Encore, iDVD




Other considerations:

Reducing Frame size:
If you have to resize the video frame ever (which you will do for Web streaming) always try divide your frame sizes by a whole number where the resulting frame dimensions are whole numbers.

For example:

Assume all Standard Definition 4x3 content is 640x480: For web streaming you should use 320x240 for the frame size, or 160x120. Frame size divisions that yield fractions of a pixel will not be as clear results as a clean frame size division by 2 or 4.

For all HD content there is 1280x720, 960x540, and 640x360.

If you need to do a custom size due to a web design, seek a professional compressionst to help scale your footage properly as most NLE software packages will do a poor job resizing your footage.


What bitrate should I use?
You should always experiment with bitrates, Take a small sample of 15-45 seconds of video and run it through the encoder at three different bitrates, pick the best settings. Ask questions online. See what settings other people are using. There is no "right" answer.


What framerate should I use?
Use the same framerate as your source. Never try to change frame-rates unless you know what you are doing or being instructed to do so by another person.

Remember, that 29.97 is different from 30. So make sure you get all of the numbers correct!

Should I de-interlace?

You should always try to get your format to match the output device as close as possible.

Interlaced Displays
*NTSC and PAL Tube TVs
*Most Live Broadcasting equipment/switcher boards

Progressive Displays
*All Comptuer Monitors
*LCD/Plasma/DLP TV
*Film/Digital Projectors

If you are ever going to go back to tape, you need to preserve the interlacing. Broadcasting equipment usually doesn't deal with a progressive source.

Just remember that an interlaced source will need a lot more bitrate, and takes up more space if you try to compress it to a file.

If you are never going back to tape and staying purely on the web, you should de-interlace your footage (if it was interlaced to begin with). Be careful when you use de-interlacing filters though as they can reduce the perceived resolution of the file in half. Some are better than others, so TEST a few 30 second clips before rendering out the whole sequence. Make sure you're happy with the results.

All footage should be published on the web in a PROGRESSIVE format. De-interlace any interlaced footage you have before posting online.

If you shoot progressive, your life will be a lot easier.

I'm still lost:

Video compression is just as much a science as it is an art form. Over time you'll learn how to use it, but you just need to test, test, test. Test different sources, read up about codecs and containers on wikipedia, and have patience.

This guide is in no ways the end all to be all in terms of encoding as this stuff changes every year. In two years this whole post, with the exception of the "Read everything" advice, will be useless as more advances in technology come along. Just keep reading, and keep compressing those files!

Like most things, learning the fundamentals of how and why things work the way they do is more important than just using a bunch of recipes.

Extended reading:

Doom9 Forums

VC-1 On Wikipedia
Codec on Wikipedia
Free software encoding thread

 
Last edited:
just to clear things, isn't 720x480 3:2 and 640x480 4:3? if so, don't i want to preserve the original aspect ratio of the dvx and not crop my footage to 640x480?
 
just to clear things, isn't 720x480 3:2 and 640x480 4:3? if so, don't i want to preserve the original aspect ratio of the dvx and not crop my footage to 640x480?

For the sake of keeping this easy, you should always assume that 4:3 DV is 640x480 unless you are trying to go back out to tape. It has a non-square pixel aspect ratio.

To be real complex, some footage has a non-squre aspect ratio, meaning that the actual frame size is different than the ammount of pixels encoded. When trying to export any video to be played back on a PC, it is highly reccomended that you convert the source to a square pixel aspect ratio. Some software supports non-square aspect ratios, however you'll find that some people with non-standard setups and different media players may not support the non-square pixel ratio, and it wont be rendered back properly.
 
Any suggestion for an "other editors" for those using premiere pro CS4? There's no ProRes 4:2:2 choice, there is an Uncompressed YUV 4:2:2 8 bit & 10 bit choice. I'm trying to figure something out that will be compatible with FCP users.

Thanks for this thread by the way, and your youtube one. I had no idea about HD encoding before reading them.
 
Any suggestion for an "other editors" for those using premiere pro CS4? There's no ProRes 4:2:2 choice, there is an Uncompressed YUV 4:2:2 8 bit & 10 bit choice. I'm trying to figure something out that will be compatible with FCP users.

Thanks for this thread by the way, and your youtube one. I had no idea about HD encoding before reading them.


No Problem.

As for Premiere Pro its going to be difficult to hand footage to Final Cut Pro users since the codecs you can export are going to be very big in size, and you'll end up having to mail a hard drive to them. Assuming they have a $3,000-$10,000 raid set up they will be able to play back un-compressed HD files in real time.

Cineform is a good solution for cross platform compatibility, however all clients will need to download software to read those files. (I'm not sure if the decoder is free on the Mac). And again its a one way street untill everybody buys the software package.

I've had Sorenson 3 files delivered to me in super high bit-rates for some motion graphics work, and they seemed to hold up okay at HD resolutions, however I can't imagine the codec holding up well for live video. (I havn't tried, so you could start there)

Jpeg2000 at 75 quality does a good job of preserving most detail, however the decoder on the PC end is terrible. You'll never be able to review those files in real-time. I've never tested decoding Jpeg2000 in real time on FCP, so maybe those will work.

What will most likely end up happening is you'll hand them a file that you can encode in quicktime, and on their end they'll end up converting it to Pro-Res.

If they are Avid Based, you can download the Avid DNxHD QT codecs, and export those out of Premiere. Thats how I've been dealing with THQ when sending footage to their editors.
 
man i cant figure out how to make it flash video using compressor... the videos on my website are quicktime right now and take wayyyyy too long to load!
 
oh wait, i have flash video encoder... ha ha.. ok now i just gotta figure out how to embed this flash video into my web page using html....
 
So just to clarify, what are the best settings when exporting to DVD Pro4? I am using 24pA, on a 23.97 timeline, and I have tried various export formats, and DVD Pro always sees the file at 29.98 size. I tried several tests and was able to get it to change to 16x9 and read that successfully (originally it was cut down to 4:3) but no matter what I do, it will only recognize it as a 29.98 frames per second. I tried using the dv/dvcpro-ntsc format, but there is no 23.97 or anything there. What sample frame rate should I be using?I think i have it set to every 24 frames or something like that. I am talking about the window in FCP when you export>quicktime then go to change the format, pick options, dv/dvcpro-ntsc. How should that window be set up? Sorry i don't have it in front of me so I may have missed something. I know this must be a common issue, still trying to search the site to find answers, been trying for 2 days to figure it out. Everytime I try different things, it takes forever to encode the files to test.
 
The latest flash player handles playing of quicktime .mov files that are h.264, .f4v which is flash's h.264 format and .flv movies.

The media encoder that comes with CS4 will let you encode a wider variety of formats including the flash version of h.264 which is .f4v. So if someone makes an h.264 movie using quicktime, the video player component that ships with flash means that the quicktime h.264 movie can be played from a swf just as easily as an .flv encoded movie. That makes things very simple for cross platform issues and you don't have to touch your quicktime movie. Since that player will also reject any quicktime movie that isn't h.264 you can easily test while authoring.

You can get flash to give you the code for the html tags you need by telling it to publish your swf and having the html default page generated. It will give you an html page with the correct embedding tags which you can copy and paste into the web page your building.

Like most things, learning the fundamentals of how and why things work the way they do is more important than just using a bunch of recipes.
 
So just to clarify, what are the best settings when exporting to DVD Pro4? I am using 24pA, on a 23.97 timeline, and I have tried various export formats, and DVD Pro always sees the file at 29.98 size. I tried several tests and was able to get it to change to 16x9 and read that successfully (originally it was cut down to 4:3) but no matter what I do, it will only recognize it as a 29.98 frames per second. I tried using the dv/dvcpro-ntsc format, but there is no 23.97 or anything there. What sample frame rate should I be using?I think i have it set to every 24 frames or something like that. I am talking about the window in FCP when you export>quicktime then go to change the format, pick options, dv/dvcpro-ntsc. How should that window be set up? Sorry i don't have it in front of me so I may have missed something. I know this must be a common issue, still trying to search the site to find answers, been trying for 2 days to figure it out. Everytime I try different things, it takes forever to encode the files to test.


DV is 29.97 only. Don't use it as an intemedeary codec to pass onto another video application if you're trying to get 23.976 fps to another program. If you're using FCP try creating a proxy or non self-contained video, and pass that onto DVDSP. Assuming timeline settings are 23.976 the video should encode with the proper cadence.
 
Just found this thread...good stuff!! I have a question about the following...

"Other considerations:

Reducing Frame size:
If you have to resize the video frame ever (which you will do for Web streaming) always try divide your frame sizes by a whole number where the resulting frame dimensions are whole numbers.

For example:

To make things simple, all Standard Definition content is 640x480: For web streaming you should use 320x240 for the frame size, or 160x120. Frame size divisions that yield fractions of a pixel will not be as clear results as a clean frame size division by 2 or 4.

For all HD content there is 1280x720, 960x540, and 640x360"

If I acquire HD footage at 720 24p and have resulting frame size of 960 by 720 I have to get to a framesize of 720 by 480 for DVD authoring. That isn't a division by two or four. Is there a trick?
 
If I acquire HD footage at 720 24p and have resulting frame size of 960 by 720 I have to get to a framesize of 720 by 480 for DVD authoring. That isn't a division by two or four. Is there a trick?

This is a very tricky subject that requires a high quality scaler. 960x720 has a 1.333 AR which means it expands to 1280x720 when played back properly.

The 720x480 DVD standard, if anamorphic widescreen, has a 1.2 AR, or 864x480. If you do the math, 1280x720 doesn't fit into 720x480 with a 1.2AR.

If you are concerned about making the AR from your HD match exactly in SD you'll need to pad your horizontal resolution with 1 pixel by zooming in slightly and increasing your frame size to 1281x720, and then scale that down to 720x480.

Attempting to scale with your NLE (like FCP or Adobe Premiere) will result in a draft quality squeeze and you'll get that fraction of a frame scaling.

The reason why I tell most people to scale with whole numbers is that it doesn't throw off the bilinear interpolation that most NLEs use when scaling down footage. In laymen terms, scaling from whole pixels always results in a clean image even if your scaler software isn't so great.

Without a real high technilcal knowhow (AviSynth Scripts, etc) your footage will always look crappy when you down-sample to DVD since the scalers built into NLE software has always been crappy.

See the Encoding services link in my signature for some picture results of encoding straight out of CS3 and going through a more complicated pre-processing route.
 
Hi demistate,

I need help! Your forum here looked promising.
I am editing using Premiere Pro for CS4. I edited some footage on a sequence with the incorrect settings (25 fps instead of 23.976). I copied this footage into a new sequence with the correct settings.
However, now the footage is very jumpy. I looked for a feature that would allow me to remove the distortion due to copying the sequence over, like Final Cut's "remove attributes", "distort". However, so far I cannot find anything.
Any ideas????
 
Hi demistate,

I need help! Your forum here looked promising.
I am editing using Premiere Pro for CS4. I edited some footage on a sequence with the incorrect settings (25 fps instead of 23.976). I copied this footage into a new sequence with the correct settings.
However, now the footage is very jumpy. I looked for a feature that would allow me to remove the distortion due to copying the sequence over, like Final Cut's "remove attributes", "distort". However, so far I cannot find anything.
Any ideas????


You might want to check your clip settings to make sure that the Footage matches the input exactly. For example, the HVX200 shoots 720P footage at 960x720, not 1280x720.

Make sure all the frame sizes, frame rates, and aspect ratios match. The skipping could be the system's inability to keep up with scaling the footage in real time to a timeline setting that isn't native.

You can find a clip's native settings by MOUSE2 --> Properities on any clip. Try playing a clip in the preview window to see what it should look like, and then try to match the settings in your timeline and play it back from the timeline to verify that your settings are correct.

Also, in premiere Pro make sure Frame Blending is not turned on for each clip in the timeline unless you purposely want that effect. That can make the footage look blurry when it should be sharp.
 
thanks for the ideas!
i checked the properties again. my d90 shoots its 720P footage at 1280x720 so that is correct already.
what i did wrong initially was to edit the footage with a frame rate of 25 instead of 24/23.976 ... it doesnt jump or anything in the preview window- only after i export it.
so i copied the edited footage from the original sequence into a sequence with the correct frame rate. i think the jumpiness of the footage after its exported might be caused by the distortion due to copying the footage between sequences with different frame rates (??)
i was hoping there was some way to remove this distortion, rather than having to re-edit the footage...
 
Back
Top