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 videocamera that uses mini-dv tapes. In the past, I've transferred the files and made DVDs, but that was time- and disk-space- consuming. I wanted to find new tools and to figure out how to convert the videos to something smaller like divx but I didn't know enough about all the different formats to answer a previous question.

Well, now I've done a bunch of research and I understand some of the details of video encoding, and in the process I wrote up some notes on the different formats involved in going from a DV videocam to divx or H.264

They're a bit rambling, but in case it's of any use, I'm going to post them as an answer. I'd be very interested in anyone else's answer as well.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

When you're talking about video formats, you have to talk about two things: the type of video encoding and the type of file that is wrapped around the encoded video. Actually, you also have to worry about how the audio is encoded, because for most video formats, there are choices of audio coding and wrapping. In many cases, however, there's a most common way of dealing with audio.

(just a little bit below, there's a ** after JPEG, because image compression works the same way: technically, there's no such thing as a "JPEG image file" because JPEG is a standard for image compression, the files that we all name abc.jpg are actually JFIF's - JPEG File Interchange Format - or EXIF's: Exchangeable Image file Format)

Starting with the DV tapes:

The format on DV tapes is called DV.

It compresses each frame individually using a compression algorithm similar to JPEG** (DCT - discrete cosine transform - also used in MPEG-4 Part 2 / DivX). Frame size is 720 pixels per line for both 4:3 and 16:9 frame aspect ratios, which means the pixels have to be different sizes for fullscreen and widescreen video. The # of lines per frame depends on whether it's 50 or 60 Hz, and I assume the different frequencies come up because we have 60Hz AC in N.America vs. 50 in Europe. 60Hz system has 480 lines.

The avis I get when I transfer files from tape to computer are DV video wrapped in an AVI container. There are two types of wrapping: with Type 1 the multiplexed audio and video is saved into the video section of a single AVI file, with Type 2 only video is saved in AVI file, audio is saved in a separate file. Type 2 is rare, it's almost always Type 1

The audio is two channels (stereo) of 16-bit resolution and 48 kHz sampling rate (CDs are 44.1kHz) PCM (pulse-code modulation - same as on CDs) sound.

http://en.wikipedia.org/wiki/DV

DVDs and MPEGs

There umpteen standards with MPEG in the name...

DVDs use MPEG-2 compression of their video. As with DV, it's different for 50Hz, but in N.America DVDs frames are 720x480 pixels and the frame rate is 23.976 frames/second (dunno why it doesn't come out to exactly 24).

The container files are called MPEG-PS (Program Stream), so this is why I get confused because the encoding and the wrapper file are both just called "MPEG." It gets worse: The container files on a DVD have a .VOB extension because they are a special type of MPEG-PS file with extra information. MPEG files are typically .mpg or .mpeg

The audio data on a DVD movie can be PCM, DTS, MPEG-1 Audio Layer II (MP2), or Dolby Digital (AC-3) format, this is one of the reasons for the .vob file, a basic .mpg file can't contain DTS or AC3 audio data (DTS and AC3 are competing formats for movie and home theatre sound).

http://en.wikipedia.org/wiki/DVD-Video

http://en.wikipedia.org/wiki/MPEG%5Fprogram%5Fstream

http://en.wikipedia.org/wiki/Dts%5Faudio

I don't know and am not going to find out about the details of converting the DV video to DVD. This link has some info, I wonder if this is what Deo does:

http://www.transcoding.org/transcode?DVtoDVD

Digital Video Cameras

Just before our last trip to Disneyland, our Canon Camera died and we bought a JVC Everio that records on a hard drive. (We didn't like the way it worked, so we returned it later).

This stores mpeg video in an .MOD container file. .mod is another special type of .mpg container file.

http://en.wikipedia.org/wiki/MOD%5Fand%5FTOD%5F%28video%5Fformat)

Digital cameras

Our Canon camera can take movies as well, but just mono sound. I haven't found any details about how the video is encoded. The files it stores on the memory card are .avis.

Ok, I looked into this a bit more just now and found that most digital cameras store videos in Motion JPEG format:

http://en.wikipedia.org/wiki/Motion%5FJPEG

It's not very good quality and not great in terms of compression, it gets used in digital cameras because it's easy to implement: the camera already does JPEG compression of pictures, apparently it's easy to implement M-JPEG for video.

While looking this up, I found some recommendations for a program called GSpot which seems to have a comprehensive internal database of codecs and gives a bunch of information on video files:

http://www.headbands.com/gspot/

Finally, on to the modern encodings

MPEG-4 Part 2 is the compression standard used by DivX and XVid codecs.

MPEG-4 Part 10 is also called H.264 or AVC. (Or sometimes a combination like MPEG-4 Part 10 AVC). H.264 is used on Blue-Ray disks.

http://en.wikipedia.org/wiki/MPEG-4%5FPart%5F2 http://en.wikipedia.org/wiki/H.264/MPEG-4%5FAVC

As always, those are the compression standards, there are a few different container files.

You can have divx video inside avi files, but that's what started my several hours wasted on research: apparently that's not a great option, and some software has already stopped supporting it. Yet another standard MPEG-4 Part 14 defines a container file format which usually gets the extension .MP4 But Apple started using .M4A at some point, and apparently .M4V is also sometimes used. It's supposed to be .mp4

http://en.wikipedia.org/wiki/Audio%5FVideo%5FInterleave http://en.wikipedia.org/wiki/MPEG-4%5FPart%5F14

Finally, there's an open-source standard that defines a file type .mkv that's named after the Russian nesting dolls (matryoshka / Матрёшка).

http://en.wikipedia.org/wiki/Matroska

MPEG-4 has more options and possibilities for audio than MPEG-2, too many for me to sort out. It looks like AAC is what's used on BluRay DVDs.

So for my current use, I'm gonna transcode the avis from the videocam to divx, later I might do it again for H.264. I'll be using Handbrake for most of the transcoding, I'm not sure if it'll work on the motion Jpeg videos from the still camera.

share|improve this answer

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.