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
As the title suggests, when I encode a .wav file to a .mp3 on Linux (Ubuntu 22.04 on WSL) using a pipe input with .FromPipeInput() the first couple seconds (~2) of audio is cut off in the resulting mp3. This only appears to happen on Linux, I have not encountered it when running it on Windows. The following code is afflicted, where both inputWavStream and outputMp3Stream are of type MemoryStream:
If I set the input to be a file with .FromFileInput(), no audio is cut off, regardless of what the output type is. So it seems the problem is narrowed down to something to do with using input pipes on Linux.
It could be that this is a problem with ffmpeg or libmp3lame on Linux, not necessarily an issue with FFMpegCore.
Also, it's not affected by the length of the input file, a 3 second clip is cut down to 1 second, and a 60 second clip is cut down to 58 seconds.
ffmpeg versions used:
Linux: 4.4.2-0ubuntu0.22.04.1 and 6.1
Windows: 7.0.2-full_build-www.gyan.dev
The text was updated successfully, but these errors were encountered:
This is mostly a duplicate of #532 but thought it deserved a more thorough write up.
EDIT: A stack overflow post reporting the same behavior: https://stackoverflow.com/questions/78543368/ffmpegcore-net-cuts-off-the-fist-few-1-5-seconds-of-audio
As the title suggests, when I encode a
.wav
file to a.mp3
on Linux (Ubuntu 22.04 on WSL) using a pipe input with.FromPipeInput()
the first couple seconds (~2) of audio is cut off in the resulting mp3. This only appears to happen on Linux, I have not encountered it when running it on Windows. The following code is afflicted, where bothinputWavStream
andoutputMp3Stream
are of typeMemoryStream
:If I set the input to be a file with
.FromFileInput()
, no audio is cut off, regardless of what the output type is. So it seems the problem is narrowed down to something to do with using input pipes on Linux.It could be that this is a problem with ffmpeg or libmp3lame on Linux, not necessarily an issue with FFMpegCore.
Also, it's not affected by the length of the input file, a 3 second clip is cut down to 1 second, and a 60 second clip is cut down to 58 seconds.
ffmpeg versions used:
4.4.2-0ubuntu0.22.04.1
and6.1
7.0.2-full_build-www.gyan.dev
The text was updated successfully, but these errors were encountered: