Opened 9 months ago

Last modified 9 months ago

#10456 new defect

Example decode_filter_audio.c produces noise

Reported by: Mahyar Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Mahyar Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Mahyar)

Summary of the bug:

The decode_filter_audio.c example of the nightly trunk, https://ffmpeg.org/doxygen/trunk/decode_filter_audio_8c-example.html, and of version 6.0, https://ffmpeg.org/doxygen/6.0/decode_filter_audio_8c-example.html, produces noise on the output. The example is supposed to read in an audio file, decode it, apply a filter, and output 16-bit LE PCM audio. The output audio is mostly noise, but the original music can just about be heard.

This issue occured with all the audio files that I tried, including flac, m4a (aac), and ogg. The input file and the output PCM audio will be attached to this bug report.

How to reproduce:

% ./decode_filter_audio.exe Muriel-Nguyen-Xuan-Brahms-rhapsody-opus79-snippet.ogg | ffplay -f s16le -ar 8000 -ac 1 -

This bug occurs on Windows 10 Version 21H2 within an Mingw-w64 (w64devkit) environment.

Playing the input audio files work correctly with ffplay.

ffmpeg version summary:

ffprobe version N-111378-g13e9899014-20230708 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 13.1.0 (crosstool-NG 1.25.0.196_227d99d)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amr  libavutil      58. 14.100 / 58. 14.100
  libavcodec     60. 22.100 / 60. 22.100
  libavformat    60. 10.100 / 60. 10.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9.  8.102 /  9.  8.102
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100

Attachments (6)

decode_filter_audio.c (10.5 KB ) - added by Mahyar 9 months ago.
Example file.
ffprobe-20230709-111356.log (9.4 KB ) - added by Mahyar 9 months ago.
Information on input audio file. Other files were also tested to have the same issue.
Muriel-Nguyen-Xuan-Brahms-rhapsody-opus79-snippet.ogg (317.4 KB ) - added by Mahyar 9 months ago.
Input audio file used in this example. Licensed CC BY-SA 4.0 by Muriel Nguyen Xuan and Stéphane Magnenat. Obtained from https://en.wikipedia.org/wiki/File:Muriel-Nguyen-Xuan-Brahms-rhapsody-opus79-1.ogg. Audio shortened to 30 seconds.
out.s16le (473.1 KB ) - added by Mahyar 9 months ago.
Output audio produced by example. Audio is mostly noise. Reduce audio volume before playing.
Makefile (197 bytes ) - added by Mahyar 9 months ago.
On w64devkit, PKG_CONFIG_PATH environment variable must be set to the ffmpeg pkgconfig folder before running make.
decode_filter_audio.zip (74.2 KB ) - added by Mahyar 9 months ago.
Compiled Windows NT executable with debugging symbols (-Og -g3).

Download all attachments as: .zip

Change History (7)

by Mahyar, 9 months ago

Attachment: decode_filter_audio.c added

Example file.

by Mahyar, 9 months ago

Attachment: ffprobe-20230709-111356.log added

Information on input audio file. Other files were also tested to have the same issue.

by Mahyar, 9 months ago

Input audio file used in this example. Licensed CC BY-SA 4.0 by Muriel Nguyen Xuan and Stéphane Magnenat. Obtained from https://en.wikipedia.org/wiki/File:Muriel-Nguyen-Xuan-Brahms-rhapsody-opus79-1.ogg. Audio shortened to 30 seconds.

by Mahyar, 9 months ago

Attachment: out.s16le added

Output audio produced by example. Audio is mostly noise. Reduce audio volume before playing.

by Mahyar, 9 months ago

Attachment: Makefile added

On w64devkit, PKG_CONFIG_PATH environment variable must be set to the ffmpeg pkgconfig folder before running make.

by Mahyar, 9 months ago

Attachment: decode_filter_audio.zip added

Compiled Windows NT executable with debugging symbols (-Og -g3).

comment:1 by Mahyar, 9 months ago

Description: modified (diff)

Added URL to example in ffmpeg documentation.

Note: See TracTickets for help on using tickets.