Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a video that I would like to edit, but it's currently a mov (H.264) file, which makes frame by frame editing impossible. So, I'd like to re-encode it to a better format. I read that DV is a good format for frame by frame editing, but when I've tried to do so I find that I lose resolution. My video is 1280x720, but the DV video comes out at only 720x480.

I've been playing with mencoder, ffmpeg, and winff on a Windows machine. So many of the command line arguments are over my head! I just want to preserve the settings from the original and get out a high quality video that is good for editing frame by frame. Can you point me to the right codec (and how to install it), the best tool, and the command line arguments to use?

This worked great for AVI:

mencoder -oac pcm -ovc x264 -o myvid.avi

What do I need for HD and editable? Something like this?

mencoder -oac pcm -ovc ??? -o myvid.???
share|improve this question
up vote 6 down vote accepted

What you are looking for is probably a so-called intermediate codec that is specifically targeted towards editing. It will allow you to perform a (visually) lossless compression but still make changes to the video without reasonable quality loss. Just like JPEG isn't made for resaving a photo a hundred times, you will need a special codec.

Your approach with DV wasn't that bad. The only problem is that the DV standard only specifies a maximum resolution of 640x480 pixels.


I'd suggest you try HuffYUV, which is a lossless codec that is relatively fast and should be easily editable on Windows platforms. On Linux and OS X it's not the best choice though. ffmpeg has HuffYUV support built in, so you don't need to install anything else. You can try something like:

ffmpeg -i -vcodec huffyuv -acodec copy outfile.avi

You shouldn't need to specify the frame size or anything. Just give it a try. The advantage is that it saves the video frame-by-frame, which is what you want for editing.


Another alternative is to convert to MPEG2 using only intra-coded frames. Intra-coded meaning that every frame is fully coded. MPEG2 is not really that useful as an intermediate codec, but it's still used for professional video transmission and storage.

ffmpeg -i -vcodec mpeg2video -qscale 1 -qmin 1 -intra -an outfile.m2v

Note that you could get a really huge file. MPEG2 should be easy to edit though, as it's a very basic codec.


DNxHD is a visually lossless intermediate codec by Avid. There are ffmpeg versions that can encode to DNxHD. For example, ffmbc is a specialized ffmpeg version targeted towards video broadcasting.

ffmpeg -i -vcodec dnxhd -b <bitrate> -an

See this table for bitrates to be used. You might not be able to open the result file with every editor. You'd also need to have the decoder plugin installed. I've personally used it with Premiere Pro on a Mac and it's a really good codec.

If you have any issues, let me know.

share|improve this answer
I thought H.264 was better than MPEG2 at intra-coding? Obviously, if we're shooting for lossless, there won't be a quality distinction, but there may well be a filesize advantage. – Lukasa Jun 8 '11 at 18:52
Mostly true, yes. But for really large files or high bit rates, the tradeoff between H.264 and MPEG2 is nearly nonexistent (or even inverted) -- and the much simpler MPEG2 syntax makes it a bit faster, actually. – slhck Jun 8 '11 at 18:54
Good to know! +1 for that alone. :) – Lukasa Jun 8 '11 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .