Take the 2-minute tour ×
Sound Design Stack Exchange is a question and answer site for sound engineers, producers, editors, and enthusiasts. It's 100% free, no registration required.

I'm working on a small video editing project at home and am new at this. I have a multiple videos that I'm combining together into one video and am using the audio from one of these videos as the single audio track.

The video that contains the audio is an MP4 with the following attributes (from MediaInfo):

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : LC
Codec ID                         : 40
Duration                         : 4mn 14s
Bit rate mode                    : Variable
Bit rate                         : 152 Kbps
Maximum bit rate                 : 178 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 44.1 KHz
Compression mode                 : Lossy
Stream size                      : 4.62 MiB (2%)
Title                            : IsoMedia File Produced by Google, 5-11-2011
Encoded date                     : UTC 2011-08-17 04:52:52
Tagged date                      : UTC 2011-08-17 04:52:53

Using Corel Video Studio Pro X4, I've been rendering my video project to an MP4 file using the best standard setting (1920 x 1080, etc) . However, the new video's audio has very slight crackling and popping sounds intermittently throughout the track that did not exist in the original. At first I did not even notice it, but after watching through the generated video a few times I started to notice the degradation.

When I checked the format of the generated video file I noticed that the audio attributes were different (see below), specifically, the sampling rate and bit rate.

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : LC
Codec ID                         : 40
Duration                         : 4mn 11s
Bit rate mode                    : Constant
Bit rate                         : 128 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 32.0 KHz
Compression mode                 : Lossy
Stream size                      : 3.84 MiB (1%)
Language                         : English
Encoded date                     : UTC 2012-01-14 05:21:58
Tagged date                      : UTC 2012-01-14 05:21:58

I tried regenerating the video file using the following audio settings, still in MP4 format and still got degraded audio, though noticeably worse.

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : LC
Codec ID                         : 40
Duration                         : 4mn 11s
Duration_FirstFrame              : -21ms
Bit rate mode                    : Constant
Bit rate                         : 256 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 48.0 KHz
Compression mode                 : Lossy
Stream size                      : 7.68 MiB (2%)
Language                         : English
Encoded date                     : UTC 2012-01-14 16:48:04
Tagged date                      : UTC 2012-01-14 16:48:04

Finally, I regenerated the video with these settings (same sampling rate as the original file and the closest bit rate setting available) and the audio now sounds the same quality as the original.

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : LC
Codec ID                         : 40
Duration                         : 4mn 11s
Duration_FirstFrame              : -23ms
Bit rate mode                    : Constant
Bit rate                         : 160 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 44.1 KHz
Compression mode                 : Lossy
Stream size                      : 4.80 MiB (1%)
Language                         : English
Encoded date                     : UTC 2012-01-14 16:51:35
Tagged date                      : UTC 2012-01-14 16:51:35

Is it normal for audio to degrade like this when output using different settings? I would assume that it would be normal for sound to be of less quality with lower settings, but not quite like this. Thoughts?

Could this be a defect in the software that I'm using, or is bit rates and sampling rates something I have to be aware of when doing video editing? I had hoped that this would be all taken care of by video editing software so that I didn't need to think too much about.

I've used mp4box to extract the audio tracks from the video files and have uploaded them here. I've included the original 44.1 KHz audio track and the tracks from two of the rendered video files with degraded quality (32KHz & 48KHz).

share|improve this question

migrated from avp.stackexchange.com Jan 27 at 15:05

This question came from our site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation.

    
While you will experience degradation due to dithering, it shouldn't sound like "cracks and pops," but rather as a kind-of-subtle smearing or deadening of the sound. Do you have a before/after example you could post? –  Warrior Bob Jan 17 '12 at 16:04
    
@WarriorBob: That's what I thought. To me it sounds like the noises you'd get on an old film or record player. Yes, I've put the extracted audio here. The video files were a bit large. –  GiddyUpHorsey Jan 18 '12 at 10:24
    
I have tried recreating my project using different software - CyberLink PowerDirector 10 and with the default settings it changed the sampling rate from 44.1KHz to 48KHz. The rendered video file sounds clean and to my untrained ears, identical to the original. There is no crackling sound in the audio. So, something appears to be broken with Corel VideoStudio Pro X4. –  GiddyUpHorsey Jan 26 '12 at 12:56

2 Answers 2

up vote 1 down vote accepted

NO, resampling – provided it's done properly – does not degrade the quality.

In any sampled audio signal, the assumption is that, prior to sampling, it was ensured that the signal only contains frequencies up to the Nyqvist frequency before sampling; for this purpose AD converters contain low pass filters, which don't work perfectly but can work very good, in high-quality interfaces. Such a signal can then be exactly reconstructed from the sampled signal, because all artifacts introduced in the DAC are above the Nyqvist limit and can therefore be removed with another such filter. Again, this doesn't work perfectly in practice, but that doesn't matter in your case since both ADC and DAC were working at 44.1 kHz, leaving the resampling in the purely digital domain, where we have total control.

Resampling can be thought of as creating a virtual analog intermediate signal and sampling this again, with the other sample rate. Since we're in digital domain, we can implement the brickwall filter very well as a sinc FIR, so we can really have only those frequencies that can be sampled precisely. This requires an FFT with a resolution containing both sample rates and a brickwall in frequency domain at the lower one of both Nyqvist frequencies. If the sample rates don't have a nice rational relation, this can be quite expensive computionally, so it's common to apply approximations — instead of a proper sinc filter, one might also use simple cubic interpolation, this still gives really good results. In very simple implementations, there may be no filtering at all, and this is what leads to the infamous aliasing artifacts (hence the filtering process is also called antialiasing). But any proper conversion tool can do better than that.

So the only artifact of a properly done resampling is band limiting to the lowest used Nyqvist frequency in the processing chain. If all intermediate steps used a higher sampling rate than the final output, this does not matter at all. In your first example it means frequencies above 16 kHz are missing, which is audible but not yet really bad.

What does degrate the quality is if you use a lossy data compression codec such as aac more than once, as you did. This is bad practise, since even uncompressed audio files aren't too big for today's standards you should always use a lossless format (e.g. .wav of .flac) for intermediate audio files.

BUT Artifacts such as this nasty crackling in your files neither turn up through properly done resampling nor data compression. So something about the used audio codecs is broken, one likely reason is that it has to do with the significantly too high audio peak level. Always make sure the signal stays below 0 dB in all working steps.

share|improve this answer
    
Yes, (resampling DOES degrade quality) [wiki.hydrogenaudio.org/index.php?title=Resampling] when it's done with a shitty algorithm. But considering the description of the artifacts that were introduced (I haven't listened to the audio samples yet) seem like resampling problems and not codec. –  Johnny Bigoode Jan 20 '12 at 18:34
1  
@JohnnyBigoode (the link above is broken, this one works) that's just what I said: bad algorithms cause artifacts; but good ones don't. The OP's examples sound neither like typical resampling alias nor like lossy-codec artifacts, that's why I suggested checking audio levels: perhaps something in the processing change produces hard overflows, that might indeed result in crackles like those in the examples. –  leftaroundabout Jan 20 '12 at 20:08

Check this Wikipedia article

The article doesn't go into full detail, but let's address yo your problem:

YES Audio loses quality very easily specially when changing its sampling rate and in your particular case it probably has to do with aliasing, which is a consequence of re sampling audio.

Basically - as people tell me at least - you should only raise the sample rate IF YOU DOUBLE IT. So, 44,1 goes to 88,2 and 48 goes to 96. I'm not exactly sure why, but that's what I've been told. You should avoid raising the sample rate since it will generate some noise - but this is necessary when re sampling when we are producing music.

The same way you should only double the sample rate, you may also only half it.

Anyways, avoid changing sample rate - it does cause some damage.

share|improve this answer
    
As I understand it (but I'm no expert), the reason that you always want to exactly double the sample rate is because every other sample can be exactly the same as the original recording. You only have to interpolate every other sample, as opposed to subtly altering all of them. This would make a good AVP.SE question, actually. –  Warrior Bob Jan 17 '12 at 16:06
1  
A consequence of aliasing, not a consequence of dithering. Dithering is a strategy to reduce aliasing artefacts. –  slim Jan 17 '12 at 16:19
    
@JohnnyBigoode: I've uploaded the audio tracks from the original and rendered video files here. Could you have a listen and see whether the noise that is added in on the two rendered files sounds like the dithering you mention or if it is something else? –  GiddyUpHorsey Jan 18 '12 at 10:30
    
@GiddyUpHorsey I will as soon as I get home –  Johnny Bigoode Jan 19 '12 at 17:47
    
@slim: dithering is a strategy to reduce quantization artifacts, that's again something different and has nothing to do with sample rates at all. –  leftaroundabout Jan 19 '12 at 19:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.