Closed itsmattkc closed 6 years ago
Sound files now play in Olive but they only play when no video is attached from the same source. There either needs to be a way to synchronize the video frame retrieval with the audio frame retrieval, or opening a separate format context for the audio (this solution could also address #21)
WAV files also don't work. FFmpeg, despite reporting the channel count in its stderr output, does not seem to place them in its AVCodecContext struct, so when Olive tries to retrieve this value and pass it to libswresample, it crashes. Clearly the channel count has to be retrieved from elsewhere.
Additionally, sample rate conversions (e.g. 44100Hz clip in a 48000Hz sequence) are surprisingly low quality, despite passing through swresample for that specific purpose. There must either be an option for higher quality resampling or Olive will have to use libsoxr instead.
This of course might also be a flaw in Olive's sample/byte count detection and have nothing to do with FFmpeg specifically.
WAV files work now due to a workaround/fallback that uses the "channel count" to detect the "channel layout" (i.e. 2 channels defaults to stereo).
Olive now officially supports all codecs, sample rates, and format types that FFmpeg supports. Issues that are still present are no seeking support (sound can't detect moving around the timeline), and there is still major slowdown and glitches when video and audio are playing from the same sources.
Once seeking is implemented, I will consider this issue finally(!) closed, and address the second issue in #21
Even if audio clips are in the timeline, Olive makes no sound.