FFMPEG can sometimes have issues fast seeking through files. It can find false frames.
For example: https://api.acousticobservatory.org/audio_recordings/1111135/media.wav?start_offset=2753.5&end_offset=2763.5 tiggers the bug. Actual server side command below:
Cause: BawAudioTools::Exceptions::AudioToolError: External Program: status=1;killed=false;pid=30388;time_out_sec=60.0;time_taken_sec=0.292756748967804;timed_out=false;exceptions=[];command=ffmpeg -hide_banner -ss 00:45:53.500 -t 00:00:10.000 -i "/data/original_audio/8f/8f1f7f4d-d6ba-4b59-ae92-bf423e9ebf23.flac" -ar 22050.0 -acodec pcm_s16le "/home/baw_web/baw-server/tmp/dc8780e0f02b0a.wav" -nostdin -y
Standard output:
Standard Error: [flac @ 0x55c58f59d300] 1 bytes of comment header remain
Input #0, flac, from '/data/original_audio/8f/8f1f7f4d-d6ba-4b59-ae92-bf423e9ebf23.flac':
Metadata:
RecordingStart : 2022-04-12T16:00:00+1000
RecordingEnd : 2022-04-12T17:59:55+1000
SensorUid : 00001708
:
SensorFirmwareVersion: 3.20 EMU+FL010
MicrophoneType1 : STD AUDIO MIC
MicrophoneUid1 : 003754
MicrophoneBuildDate1: 2019-08-27
ChannelGain1 : 50dB
MicrophoneType2 : unknown
MicrophoneUid2 : unknown
MicrophoneBuildDate2: unknown
ChannelGain2 : 0dB
SdCardCid : 9E42453531324742020000000D012A2F
BatteryLevel : 79p 12.49V
SensorLocation : -35.3786+147.7031/
LastTimeSync : 2022-04-12T01:59:57+1000
Duration: 01:59:54.84, start: 0.000000, bitrate: 190 kb/s
Stream #0:0: Audio: flac, 22050 Hz, mono, s16
Stream mapping:
Stream #0:0 -> #0:0 (flac (native) -> pcm_s16le (native))
[flac @ 0x55c58f5b1300] switching bps mid-stream is not supported
[flac @ 0x55c58f5b1300] decode_frame() failed
Error while decoding stream #0:0: Invalid data found when processing input
[abuffer @ 0x55c58f5e05c0] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09]
Last message repeated 3 times
[abuffer @ 0x55c58f5e05c0] Error setting option time_base to value 1/0.
[graph_0_in_0_0 @ 0x55c58f5e1a80] Error applying options to the filter.
Error reinitializing filters!
Error while filtering: Numerical result out of range
Finishing stream 0:0 without any data written to it.
[abuffer @ 0x55c58f5e3b80] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09]
Last message repeated 3 times
[abuffer @ 0x55c58f5e3b80] Error setting option time_base to value 1/0.
[graph_0_in_0_0 @ 0x55c58f5e3a40] Error applying options to the filter.
Error configuring filter graph
Conversion failed!
Notes:
full file decode with ffmpeg works
full file decode with flac -d works
cutting the segment with flac -d --skip 45:53.500 --until 45:63.500 -o test2.wav works.
FFMPEG can sometimes have issues fast seeking through files. It can find false frames.
For example:
https://api.acousticobservatory.org/audio_recordings/1111135/media.wav?start_offset=2753.5&end_offset=2763.5
tiggers the bug. Actual server side command below:Notes:
ffmpeg
worksflac -d
worksflac -d --skip 45:53.500 --until 45:63.500 -o test2.wav
works.This looks like it is a ffmpeg bug?
similar too https://trac.ffmpeg.org/ticket/9185?