PDA

View Full Version : OT - Computer question - video compression



rockrat
12-10-2010, 04:04 PM
I'll ask this here because I know there is a good brain-trust that thinks like I do, somewhat. :rolleyes:

I have video authoring software that I use to cut and dice up different video files. Made a few anniversary dvd's set to music for couples and such. These dvd's are put together and burned with Nero. I however do not like Nero for cutting and fine tuning video clips so I am using Media Wizard. It is a good tool but I think that they recently changed the name.

None the less, I am trying to find a good audio video compression to use for uploading video to photobucket and sending in an email. Currently the avi (no compression) files are taking way too long to upload.

Audio options
http://i4.photobucket.com/albums/y128/katiecat222/temp/audiocompression.jpg

Video options
http://i4.photobucket.com/albums/y128/katiecat222/temp/videocompress.jpg

I am looking for a small file without horrible chopping in the video or audio AND (cause I'm asking) something that most computers will have available for playback on the receiving end.

Thoughts?
rock~

Black_Moons
12-10-2010, 04:32 PM
Id use Mpeg layer 3 for audio (Mp3) and Xvid or Divx codec.
While xvid/divx is not exactly standard, it is included in basicly every codec package on the face of the planet.

danlb
12-10-2010, 05:15 PM
It might also help to resize the video and check the interlace/FPS.

Dropping a 1 hour TV show from a 1920x1080 60 fps AVI file to one sized for my cell phone (400x272) 30 FPS MP3 drops it from 6.9GB to 533MB.

Dan

rockrat
12-10-2010, 08:47 PM
It might also help to resize the video and check the interlace/FPS.

Dropping a 1 hour TV show from a 1920x1080 60 fps AVI file to one sized for my cell phone (400x272) 30 FPS MP3 drops it from 6.9GB to 533MB.

Dan

Wow! But how does it look on the computer?

rock~

Evan
12-10-2010, 09:14 PM
This is a question without a simple answer. As usual, It Depends...

It depends on what frame rate is tolerable. It depends on what resolution is required. Those two items have the largest impact on file size.

It also depends on what compression protocol is acceptable. That depends on the source material. It also depends greatly on the quality of the source material since it is very likely already compressed. Direct translation from a compressed format to another isn't the way to gain maximum quality. For best results the original format should be decompressed to an uncompressed lossless format first. That will result in a very large file, either individual images or a huge video file in lossless JPEG2000 format. Recompressing that to the required end format will produce the best results.

However, you need to understand how any particular format works in order to probuce best results. Most compressed formats use what is called a "key frame" which is a frame that contains all the information that describes that frame's image. Subsequent frames may then contain information the represents only the changes from the key frame. This works very well when the content doesn't change much or quickly from frame to frame. Many such formats include an option to specify how often a key frame is to be included. The more often the better the quality but the larger the file size.

Some codecs are adaptive and will automatically determine how often a key frame should be included. Many codecs will benefit from a very slight overall reduction in sharpness of the orginal images. This is easily apparent by the reduction in file size in the compression used for jpeg still images.

macona
12-10-2010, 09:47 PM
h.264 is getting pretty standard with the HD downloadable videos now. And the audio is encoded AAC. There are codec packs available free of charge that have these. I think FFMpeg is one.

whitis
12-11-2010, 12:49 PM
Direct translation from a compressed format to another isn't the way to gain maximum quality. For best results the original format should be decompressed to an uncompressed lossless format first.

The problems that come from recompressing already compressed video don't go away when you use an intermediate file which is not compressed. Video editing software often doesn't like interframe compression formats, though, so sometimes you have to use an intermediate format.

WebM (VP8 video codec, Vorbis audio codec, Matroska container) is the new standard for web video. Unfortunately, many machines aren't ready to play it yet, so you need an additional format for a little while. If you upload a WebM file to youtube, it will be made available in other formats automatically.

Evan
12-11-2010, 02:23 PM
The problems don't go away but it does reduce artifacts. There is a very wide range in quality among the various software conversion methods for translating formats. Using an intermediate uncompressed format usually produces better results.

rockrat
12-11-2010, 04:50 PM
As usual, It Depends...

Yea, I kinda figure that. I was one step from just compressing it, sending it to some friends and asking them to give me their opinion. Starting from the bottom most crappy compression I would work my way up till it was tolerable.

I thought I would ask the question here and see if I could bird dog out some of the work.

Rock~

dm1try
12-11-2010, 09:37 PM
Using an intermediate uncompressed format usually produces better results.
is there a software which transcodes directly from one compression format to another without intermediate decompression? i doubt there's any.. so why bother?

danlb
12-14-2010, 12:18 AM
Dropping a 1 hour TV show from a 1920x1080 60 fps AVI file to one sized for my cell phone (400x272) 30 FPS MP3 drops it from 6.9GB to 533MB.

Wow! But how does it look on the computer?

rock~

Not bad at all. It's close to what you get with broadcast TV. Of course, the size it will be displayed at depends on the monitor and resolution. A 640x480 14 inch ,monitor will display that 400x272 image at around 10 inches across. A 1920x1200 24 inch monitor will display it at about 4 inches across.

The key is that most of us were raised on really poor quality broadcast TV, and when using a VCR we made the picture even fuzzier. A poor picture of friends and family is often better than no picture at all.

Dan
Dan

macona
12-14-2010, 01:05 AM
is there a software which transcodes directly from one compression format to another without intermediate decompression? i doubt there's any.. so why bother?

On a mac I use FFMpegX. There ought to be a windows equivalent. Probably virtual dub. I dont think it creates a scratch file. Install the latest codecs from http://ffmpeg.org/.

Like I mentioned before everything I encode is h.264 for video and either mp3 or aac for audio, though FLAC is starting to appear more often since it is a lossless compression.

Evan
12-14-2010, 02:34 AM
is there a software which transcodes directly from one compression format to another without intermediate decompression? i doubt there's any.. so why bother?


There can be very big differences in how the image is created when decoding each image as single still. Antialiasing, supersampling and sharpening may all be applied when decoding to an uncompressed format and may not be applied internally for transcoding.

lazlo
12-14-2010, 08:46 AM
is there a software which transcodes directly from one compression format to another without intermediate decompression?

Not that I know of, and video acceleration is a component of my team's responsibilities.

The problem is that calculating the motion vectors: searching for a macroblock as it moves from frame to frame, is the vast majority of the compression time. Each video codec has a different strategy for motion search. Which is why XVid, which is an MPEG-4 codec, is incompatible with other, less sophisticated MPEG-4 formats, such as DiVX. XVid uses a hierarchical motion search, which is very sophisticated and substantially improves compression ratio.

Likewise for H.264. It's a family of compression strategies. The "full" H.264 format, as used on Blu-Ray, literally does 8 separate motion searches for each 16x16 macroblock, and estimates the entropy (roughly, the loss of video quality) for each motion search. Based on the results of the motion search, the H.264 algorithm can sub-divide the macroblock into smaller tiles, and search again.

Then there's the actual entropy (bitstream) encoding: the full H.264 standard used in Blu-Ray (for example) does CABAC encoding, where it compresses the bitstream, and essentially plays it back during the encoding/compression process, and adjusts the compression strategy depending on the results.

All in all, real H.264 compression is incredibly compute intensive.

So many consumer electronic devices, especially camcorders, webcams etc, take shortcuts on the H.264 standard: they only do 1 motion search instead of doing 8 and taking the best. They don't sub-divide macrocells. They do CAVLC entropy coding instead of CABAC.

The result: H.264/AVC has about as many incompatible "profiles" as there are H.264 devices.

lazlo
12-14-2010, 08:58 AM
On a mac I use FFMpegX. There ought to be a windows equivalent.

FFMpegX is just a Mac GUI for the OpenSource FFMeg libraries. The best transcoder I've used, by far, is Handbrake, which uses the FFMeg libraries:

http://handbrake.fr/

Nero recode was pretty good in version 8. In version 9, some idiot programmer decided to make the transcoding "multi-threaded" by gridding the video and assigning each grid to a separate thread. The problem is the motion search doesn't extend past the grid :rolleyes: , so you end up with distinct "regions" in the compressed video.

Bravo, Nero :mad:

Handbrake (free, OpenSource) is totally multithreaded (and they correctly load-balance the threads, so there's no video artifacts), much faster than any non-commercial transcoder I've used, and generates fantastic quality video.

aostling
12-14-2010, 05:58 PM
This article on the subject was published today: http://www.dpreview.com/learn/?/Guides/Understanding_Video_Compression_01.htm