#11696: WAV ≥ 4 GiB abnormal decoding due to length field overflow ----------------------------------+------------------------------------ Reporter: wavybaby | Owner: (none) Type: defect | Status: new Priority: minor | Component: avformat Version: 7.1 | Resolution: Keywords: wavdec | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | ----------------------------------+------------------------------------ Comment (by wavybaby):
Replying to [comment:2 Marton Balint]: > You might want to try using the -ignore_length 1 option. In wav fiels the data chunk contains the wave data and it has a 32 bit length, so if your phone writes some random data there instead of UINT32_MAX, then that can limit the read audio. > > Alternatively you might want to upload here the first 64kb of some of your samples which are > 4GiB so we can check if there is a pattern which can be used to autodetect this... Good morning all, indeed `-ignore_length 1` resolves the issue: {{{ $ ffmpeg -ignore_length 1 -i "2025-07-22 21.39.41.wav" 2025-07-22_21.39.41.flac ffmpeg version n7.1.1 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 15.1.1 (GCC) 20250425 configuration: --prefix=/usr --disable-debug --disable-static --disable- stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable- gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable- libglslang --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable- libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable- libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable- libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable- libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable- shared --enable-vapoursynth --enable-version3 --enable-vulkan libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 [aist#0:0/pcm_f32le @ 0x62ca6c2e0040] Guessed Channel Layout: stereo Input #0, wav, from '2025-07-22 21.39.41.wav': Duration: 00:37:51.04, bitrate: 21273 kb/s Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 96000 Hz, stereo, flt, 6144 kb/s File '2025-07-22_21.39.41.flac' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (pcm_f32le (native) -> flac (native)) Press [q] to stop, [?] for help [flac @ 0x62ca6c2d9900] encoding as 24 bits-per-sample, more is considered experimental. Add -strict experimental if you want to encode more than 24 bits-per-sample Output #0, flac, to '2025-07-22_21.39.41.flac': Metadata: encoder : Lavf61.7.100 Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit), 128 kb/s Metadata: encoder : Lavc61.19.101 flac [wav @ 0x62ca6c2d8c00] Packet corrupt (stream = 0, dts = NOPTS).30x [in#0/wav @ 0x62ca6c2d8940] corrupt input packet in stream 0 [out#0/flac @ 0x62ca6c2e0200] video:0KiB audio:1292022KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.000626% size= 1292030KiB time=02:11:03.45 bitrate=1346.0kbits/s speed= 297x }}} While my issue is resolved now, I imagine this might pose an issue in the future for others; thus, please feel free to close this ticket once or if any flags or changes are made :) Please let me know if a further sample or similar such thing is required, I can make another very very long recording on my phone :) Thank you again for the assistance to all! -- Ticket URL: <https://trac.ffmpeg.org/ticket/11696#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
_______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org https://ffmpeg.org/mailman/listinfo/ffmpeg-trac To unsubscribe, visit link above, or email ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".