After some searching, I’ve seen other posts that have been made on this topic over the years, but nothing I found seems to address my problem. I’m trying to take a short wav file and trim it, lower the volume, and export it. When I do, the resulting wav file has no sound.
Things I’ve read and tried:
Perhaps your speaker/device volume is turned down. No, I can play the original and other wav files fine. I also hear it fine when playing in Audacity.
Try loading the resulting wav file back into Audacity and see if there is anything there. Yes, when I do that, it shows the waveform and it plays it just as I expect it to – at the trimmed length and at the lower volume.
You need to save the project before exporting the wav file. I don’t see why that should affect the exported file, but I tried it, and it made no difference.
You exported a selection that didn’t include the actual sound. No, it’s clear that’s not the case because I’ve tried both export and export selection, and in both cases, the actual data is making it to the file because I can open the resulting wav file in Audacity and it is all there.
I also tried exporting a wav file before I make any modifications to it (so it is exactly the same as the original), and that works. I hear it fine when I replay the output file. Once I trim it or something, then the output file has no sound.
So, you’ve got an audio file… You can open and play it in Audacity, but VLC won’t play it…
So, It’s supposed to be a “regular” WAV file, but there’s something wrong with it or something non-standard about it…
Questions -
What are the format details? (Sample rate, bit-depth, number of channels?) Did you intentionally change any of these things? (The sample rate is shown as “Project Rate” in the lower-left of the Audacity window.)
If you didn’t change the format, how does the file size of the exported file compare with the files size of the original? i.e. If you trimmed-off a little bit, is the new file slightly smaller? If you trim-off half of it, is it half the size?
What’s the playing-time and what’s the file size of the “bad” file?
Can you give us the exact steps and the exact options you use when you export?
OK. This is strange. I opened it with Windows Media Player, and it showed that the volume was all the way down. So I turn it up, and it plays it. But VLC’s volume was up, and it still is and doesn’t play it.
Sample rate is 44100, which I didn’t change. 32-bit float, which I didn’t change. Two channels, which I didn’t change.
If you didn’t change the format, how does the file size of the exported file compare with the files size of the original? i.e. If you trimmed-off a little bit, is the new file slightly smaller? If you trim-off half of it, is it half the size?
Yes, I trimmed it to about 1/4 the length, and it went from 28 KB to 7 KB as expected.
What’s the playing-time and what’s the file size of the “bad” file?
Playing time is 0.038 sec (it’s just a little click sound). Size is 7 KB. The original is like a mouse “click down” sound followed by the “click up”, and I trimmed the “click up” out of it along with the dead space in between.
Can you give us the exact steps and the exact options you use when you export?
Exact steps:
FIle > Open. Answer the “Warning” box by saying “Make a copy…”
Drag the selection so it higlights the part I want (from 0.00 to just under 0.04 seconds).
Click the “Trim Audio” button.
Drag the output volume down to 0.3.
Press Play, and it sounds exactly like I want it to.
File > Export…, then save as a new name in “WAV (Microsoft) signed 16 bit PCM” format.
I don’t fill in any of the values for the tag fields, and i click OK.
Per my earlier post, the file plays fine in Windows Media Player (after I turned the volume up). Doesn’t make a sound when I try playing it in VLC, The original file does play fine in VLC, howver.
Many media players will buffer the output before playing. When the buffer is full, the media starts playing while the computer loads the next buffer.
If the buffer size is greater than the length of the audio, it is quite likely that the media player will not play it because the buffer has not filled up (implementation details vary from one application to another). I am not familiar with the inner workings of the VLC audio engine, but it does not surprise me at all if it does not play a 38 ms audio file.
I would guess that with a larger file (say, 5 seconds) that VLC will play the exported file. Am I right?
When I clipped a longer wav file down to 3-4 seconds, made it mono, and exported it, it didn’t have the problem. But I tried it with my much shorter “click” file, making it mono and exported it, and it still has the problem. Plays in WMP but not VLC. It is attached.
Mystery solved.
If you need to play a very short sound in VLC you could pad the sound with a bit of silence before and after the sound so as to make the file long enough for VLC to play.
Great. Thank you very much. I don’t really need it in VLC. I just need it in a program, and I was afraid to use it if the file itself was somehow corrupt, which is clear now it isn’t.