Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Strange audio issue (Read 6033 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Strange audio issue

Hey guys, I hope I am not sounding redundant by asking this question but I am new to audio compression. I compress video files and I recently discovered that LAME compression was the way to go to handle the audio portion, so I downloaded the latest version of LAME to use with Virtual Dub. I have a 4 minute video I created in Adobe Premiere that I needed compressed, so using virtual dub I set the audio compression to LAME then chose the highest quality format (Im not at my home pc but believe it was 33000HZ stereo). I selected the option in VDub to view all the audio formats but when I chose one of the 40000 + options, I got errors. So I stuck with what I could choose...

Now when I compressed the video it plays like a charm on my computer but when I play it on any other PC,  half of the audio is missing or plays intermittently. At first no audio comes up at all, then when I rewind the video on media player all of a sudden it starts playing, then wouldnt play etc...it was weird.

Now I have two questions...

I just read on this forum that the latest version of Lame has alot of issues, and I believe I was using 3.98...so which is the best version I should use with VirtualDub 1.6? Or rather which is the most efficient version that will ensure proper play on all computers...

Next question is, what are the best settings I should use to get the highest audio quality when I compress the audio on a 4 minute avi file?

Any help is greatly appreciated, thank you.

Strange audio issue

Reply #1
I'd suggest using the currently recommended version of Lame - 3.97b2.  I've used in with VirtualDub a few times and had no problems.  You need to install the ACM in order to select it under Audio / Compression (I assume you already know how to do this).

For best results it's recommended that you keep the same sample rate as the source audio, e.g. if the source audio is at 48000Hz then compress to Lame MP3 @ 48000Hz @ the bitrate of your chosing.  You can view the sample rate of your source audio in vdub under File/File Information... The "view all audio formats" checkbox is there to keep users from making bad resampling choices ("good" choices being those you can see before checking the box). 

If your looking for highest audio quality, select the highest MP3 bitrate.  The ACM allows you to choose either CBR or ABR, though as I hear that VBR audio in AVI is non-standard, the safe bet is to choose CBR.  It's up to you to determine what's overkill and what isn't - 128kbps should be acceptable but you could go up to 320kbps if you really wanted...

Strange audio issue

Reply #2
I'd suggest using the currently recommended version of Lame - 3.97b2.  I've used in with VirtualDub a few times and had no problems.  You need to install the ACM in order to select it under Audio / Compression (I assume you already know how to do this).

For best results it's recommended that you keep the same sample rate as the source audio, e.g. if the source audio is at 48000Hz then compress to Lame MP3 @ 48000Hz @ the bitrate of your chosing.  You can view the sample rate of your source audio in vdub under File/File Information... The "view all audio formats" checkbox is there to keep users from making bad resampling choices ("good" choices being those you can see before checking the box). 

If your looking for highest audio quality, select the highest MP3 bitrate.  The ACM allows you to choose either CBR or ABR, though as I hear that VBR audio in AVI is non-standard, the safe bet is to choose CBR.  It's up to you to determine what's overkill and what isn't - 128kbps should be acceptable but you could go up to 320kbps if you really wanted...

Excellent my friend, that is great info thanks. I will try that as soon as I get home, much appreciated.

I did try to select a 48000hz option but got an error that it was not compatible with the video or something, but I have to be in front of the program to know exactly what I picked it was probably the wrong one.

One last question if you have a chance....Is there any setting or option I should go with to ensure the audio will play consistently on every computer?

Strange audio issue

Reply #3
I'm not goint to pretend to be an expert on digital video (hardly one on audio either ), but I'm pretty sure as long as it's MP3-standard (which Lame produces), most any computer today should be able to play the audio content.  Unfortunately I know next-to-nothing about which audio sample rates are compatable with which types of video/codecs.  If you're still having trouble you may want to post a question in the digital a/v subforum.

Strange audio issue

Reply #4
I'm not goint to pretend to be an expert on digital video (hardly one on audio either ), but I'm pretty sure as long as it's MP3-standard (which Lame produces), most any computer today should be able to play the audio content.  Unfortunately I know next-to-nothing about which audio sample rates are compatable with which types of video/codecs.  If you're still having trouble you may want to post a question in the digital a/v subforum.

Thank you for your help!

I took your advice and installed 3.97 b2...Then I tried to compress it in VDub again using the same settings as the compressed file which was 32000khz, 16 bit rate. Although when I did that, when I tried to play the clip I got a codec error and no sound played. That was the first time I seen that error, but I didn't have a chance to play around with the bit rates and other samples...I will have to try some other things then I will post in the digital AV forum if anything.

 

Strange audio issue

Reply #5
One last thing I can offer is that 32000 Hz might not be a valid sample rate for mpeg 1 layer 3, though IIRC Lame forces mpeg 2 (or something like that) for these sample rates.  I remember seeing a table somewhere here around HA that had this information - I just searched around for a while w/ no luck.  Perhaps one of the mp3 experts here can shine a little light on the subject. 

Also, make sure that your not confusing bit depth (e.g., 16-bits per sample, very common w/ digital audio) with bit rate (e.g., 16 kilobits per second, which would be very low quality audio).  For uncompressed audio:

bitrate (kbps) = sample rate (Hz)  x  bit depth (bits/sample)  x  # of channels  /  1000

Good luck!

edit - I meant 32000 hz

Strange audio issue

Reply #6
One last thing I can offer is that 32000 bits/sample might not be a valid sample rate for mpeg 1 layer 3, though IIRC Lame forces mpeg 2 (or something like that) for these sample rates.  I remember seeing a table somewhere here around HA that had this information - I just searched around for a while w/ no luck.  Perhaps one of the mp3 experts here can shine a little light on the subject. 

Also, make sure that your not confusing bit depth (e.g., 16-bits per sample, very common w/ digital audio) with bit rate (e.g., 16 kilobits per second, which would be very low quality audio).  For uncompressed audio:

bitrate (kbps) = sample rate (Hz)  x  bit depth (bits/sample)  x  # of channels  /  1000

Good luck!

Damn this stuff is complicated! 

But yea I probably am confusing alot of things...thanks alot fella, I will be referring to all your info while I play around with it tonight.

Strange audio issue

Reply #7
If the audio is 32khz then leave it at 32khz (unless there is some reason why you need to change it), and only use CBR with AVI (even though ABR/VBR can work, don't use it)

As far as I can tell, you seem to be doing everything correctly in vdub.
What video codec are you using?
What decoders are you using for playback? (if you are using a directshow based player, what filters)

My guess on the other computer's playback problem would be that it is missing a decoder.
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune

Strange audio issue

Reply #8
If the audio is 32khz then leave it at 32khz (unless there is some reason why you need to change it), and only use CBR with AVI (even though ABR/VBR can work, don't use it)

As far as I can tell, you seem to be doing everything correctly in vdub.
What video codec are you using?
What decoders are you using for playback? (if you are using a directshow based player, what filters)

My guess on the other computer's playback problem would be that it is missing a decoder.

I am using the MPEG 4 v1 codec...I am not sure if I selected CBR or ABR, I will have to double check.

Real quick, this is where this all came about

I make higlight videos in Adobe Premiere. The compression feature on Adobe doesnt really work so by default it will export a 4 minute movie at around 500mb. So I discovered Virtual Dub for compression. It worked like a charm for the last two videos I did...but they were all a little too big for their size (My last vid was 2:44 and is 56mb). It was in Vdub 1.5 and I didnt use any audio compression cuz that feature wasnt availble. So I had to lower the quality and the frame processing on the MPG 4 video compression to make it a decent size. Obviously I lost some video quality but that video works fine, plays on all computers, never had an issue with video or audio playback.

But now that the new VDub as audio compression, I realized that my vids were so big cuz of the AUDIO not being compressed. And since I can make the video a much higher quality at a good size if I also compress the audio, I am trying to figure it out.

Strange audio issue

Reply #9
But now that the new VDub as audio compression, I realized that my vids were so big cuz of the AUDIO not being compressed. And since I can make the video a much higher quality at a good size if I also compress the audio, I am trying to figure it out.


So you don't know how to compress audio with VirtualDub? If that's the case, then

Audio -> Full processing mode

Otherwise just ignore this post.

Strange audio issue

Reply #10
Intermittent playback on other PC's could be due to the A/V interleaving in VDub.  I've found that if I compress with XVid and interleave MP3 audio, I get A/V sync problems on playback.  You can disable interleaving by going into the (surprise, surprise) "Interleaving" option under the "Audio" menu (if you see "Stream list" under "Audio", select that, then right-click on the audio stream and select "Interleaving").  Disabling interleaving shouldn't cause any problems when playing back from a hard drive (note that I've only tested this on three different PC's), but it won't work if you're trying to stream the files over the Internet.

It's hard to say why you're getting an error on playback with LAME 3.97b2 encoding, but I can tell you that if you're trying to encode at a different sample rate than your source audio, you need to go into the "Conversion" option in VDub's "Audio" menu and change the sample rate there (and be sure to enable the "high quality" option).  The LAME ACM codec evidently can't do sample rate conversion, so if your source audio is at 32 kHz and you try and encode at, say, 48 kHz, it will give you an error.

However, there's really no reason to do that as 32 kHz is most certainly a standard MP3 sampling rate (at bitrates of 32 kb/s and higher) and should be played properly by any MP3 decoder.

Edit: It turns out that the interleaving/sync issue may have been isolated to one source clip, or, more specifically, to one source clip using an external WAV file as the audio source - I haven't been able to reproduce the issue with a couple other clips, so YMMV.
"Not sure what the question is, but the answer is probably no."

Strange audio issue

Reply #11
Intermittent playback on other PC's could be due to the A/V interleaving in VDub.  I've found that if I compress with XVid and interleave MP3 audio, I get A/V sync problems on playback.  You can disable interleaving by going into the (surprise, surprise) "Interleaving" option under the "Audio" menu (if you see "Stream list" under "Audio", select that, then right-click on the audio stream and select "Interleaving").  Disabling interleaving shouldn't cause any problems when playing back from a hard drive (note that I've only tested this on three different PC's), but it won't work if you're trying to stream the files over the Internet.

It's hard to say why you're getting an error on playback with LAME 3.97b2 encoding, but I can tell you that if you're trying to encode at a different sample rate than your source audio, you need to go into the "Conversion" option in VDub's "Audio" menu and change the sample rate there (and be sure to enable the "high quality" option).  The LAME ACM codec evidently can't do sample rate conversion, so if your source audio is at 32 kHz and you try and encode at, say, 48 kHz, it will give you an error.

However, there's really no reason to do that as 32 kHz is most certainly a standard MP3 sampling rate (at bitrates of 32 kb/s and higher) and should be played properly by any MP3 decoder.

Edit: It turns out that the interleaving/sync issue may have been isolated to one source clip, or, more specifically, to one source clip using an external WAV file as the audio source - I haven't been able to reproduce the issue with a couple other clips, so YMMV.


Man, some great advice. Thank you very much. Everything you said sounds like something I could utilize...

So I deselected video interleaving and then compressed the audio at the following settings:



So far so good, it plays perfectly on my cpu but I will have to check a few other computers to see if it solved the problem. I think it probably did...

p.s. - If anyone would want to help me out as a test, I can give you a download link to the video... and u to try and watch it on your cpu and see if it messes up at all.