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.

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 myvid.mov

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

mencoder -oac pcm -ovc ??? -o myvid.??? myvid.mov
share|improve this question

1 Answer 1

up vote 5 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.

HuffYUV

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 infile.mov -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.

MPEG2

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 infile.mov -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

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 infile.mov -vcodec dnxhd -b <bitrate> -an output.mov

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
1  
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

Your Answer

 
discard

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.