Opened 19 months ago

Last modified 19 months ago

#10387 new defect

ffmpeg decoding audio stream includes index data from the idx1 section at end of avi

Reported by: derek inksley Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg -i ffmpeg_issue_game_test.avi out.wav

link to avi: https://anonfiles.com/Q7370dt4zd/ffmpeg_issue_game_test_avi

the resulting wav file contains part of the index from idx1 near end of avi, this produces and unwanted click in the audio.

I tried with ffmpeg version from 2018 to near-present, with issue occuring in all of them.

output of ffprobe:
ffprobe version 2023-05-18-git-01d9a84ef5-essentials_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers

built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 58. 7.100 / 58. 7.100
libavcodec 60. 14.100 / 60. 14.100
libavformat 60. 5.100 / 60. 5.100
libavdevice 60. 2.100 / 60. 2.100
libavfilter 9. 8.100 / 9. 8.100
libswscale 7. 2.100 / 7. 2.100
libswresample 4. 11.100 / 4. 11.100
libpostproc 57. 2.100 / 57. 2.100

Input #0, avi, from 'ffmpeg_issue_game_test.avi':

Duration: 00:03:00.60, start: 0.000000, bitrate: 7784 kb/s
Stream #0:0: Video: h264 (High 4:4:4 Predictive) (H264 / 0x34363248), yuv420p(progressive), 448x512 [SAR 1:1 DAR 7:8], 6225 kb/s, 60 fps, 60 tbr, 60 tbn
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s

output of "ffmpeg -v 9 -loglevel 99 -i ffmpeg_issue_game_test.avi d.wav
attached, it wont fit here
https://anonfiles.com/be0120t9zb/log_txt

thanks for looking :)

Attachments (1)

ffmpeg_issue_game_test_LOG.txt (2.1 MB ) - added by derek inksley 19 months ago.

Change History (2)

by derek inksley, 19 months ago

comment:1 by derek inksley, 19 months ago

Just for reference, I was concat-ing several videos together w/ffmpeg and noticed a click where the videos were joined, so I tracked it down to ffmpeg adding the idx1 data to the pcm data by experimentation.

The videos were created using the AVIFile api on Windows, using x264vfw for compressed video and 2-channel uncompressed signed 16bit pcm for audio.

Here's an image showing the end of the wavfile which was created via:
ffmpeg -i ffmpeg_issue_game_test.avi d.wav

https://i.postimg.cc/c1g09C8D/idx1-data-in-wavefile.png
Note: Highlighted part is the idx1 data

thanks and best regards,

  • dink
Note: See TracTickets for help on using tickets.