You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HI! I'm using the following code to convert a bunch of wav files into mp3
using (var reader = new WaveFileReader(wavFilePath))
{
try
{
MediaFoundationEncoder.EncodeToMp3(reader, mp3FilePath);
}
catch (InvalidOperationException ex)
{
Console.WriteLine(ex.Message);
}
}
but when I compare the wav and mp3 files inside a sequencer or similar (Audacity for example) the mp3 file always has extra silence at both ends, making it longer.
Unfortunately just trimming both ends of the file would be tricky because some of the wav files already have silences and I need to keep them of the same length in the mp3 files.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
HI! I'm using the following code to convert a bunch of wav files into mp3
but when I compare the wav and mp3 files inside a sequencer or similar (Audacity for example) the mp3 file always has extra silence at both ends, making it longer.
Unfortunately just trimming both ends of the file would be tricky because some of the wav files already have silences and I need to keep them of the same length in the mp3 files.
Any help will be greatly appreciated <3
Beta Was this translation helpful? Give feedback.
All reactions