302001014794094.wav <http://www.ffmpeg-archive.org/file/t378828/302001014794094.wav> File is attached here. Ananths-MacBook-Pro:speechtotext ananth$ ffmpeg -i 302001014794094.wav ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers built with Apple LLVM version 8.1.0 (clang-802.0.42) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libass --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --enable-openssl --disable-lzma --enable-nonfree --enable-vda libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 [wav @ 0x7f8010004800] ignoring wrong sample_count 1165360 [g729 @ 0x7f8010809200] Only mono sound is supported (requested channels: 2). [wav @ 0x7f8010004800] Failed to open codec in avformat_find_stream_info [g729 @ 0x7f8010809200] Only mono sound is supported (requested channels: 2). [wav @ 0x7f8010004800] Estimating duration from bitrate, this may be inaccurate Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, wav, from '302001014794094.wav': Duration: 00:02:25.67, bitrate: 16 kb/s Stream #0:0: Audio: g729 ([131][0][0][0] / 0x0083), 8000 Hz, stereo, 16 kb/s At least one output file must be specified When i run Ananths-MacBook-Pro:speechtotext ananth$ ffmpeg -loglevel debug -y -acodec g729 -f g729 -i 302001014794094.wav -ar 8000 -acodec pcm_s16le -f wav output.wav ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers built with Apple LLVM version 8.1.0 (clang-802.0.42) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libass --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --enable-openssl --disable-lzma --enable-nonfree --enable-vda libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'g729'. Reading option '-f' ... matched as option 'f' (force format) with argument 'g729'. Reading option '-i' ... matched as input url with argument '302001014794094.wav'. Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '8000'. Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'pcm_s16le'. Reading option '-f' ... matched as option 'f' (force format) with argument 'wav'. Reading option 'output.wav' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url 302001014794094.wav. Applying option acodec (force audio codec ('copy' to copy stream)) with argument g729. Applying option f (force format) with argument g729. Successfully parsed a group of options. Opening an input file: 302001014794094.wav. [g729 @ 0x7fbe8d803400] Opening '302001014794094.wav' for reading [file @ 0x7fbe8d50f060] Setting default whitelist 'file,crypto' [g729 @ 0x7fbe8d803400] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:1 [g729 @ 0x7fbe8d803400] All info found [g729 @ 0x7fbe8d803400] Estimating duration from bitrate, this may be inaccurate [g729 @ 0x7fbe8d803400] After avformat_find_stream_info() pos: 10 bytes read:32768 seeks:0 frames:1 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, g729, from '302001014794094.wav': Duration: 00:04:51.45, start: 0.000000, bitrate: 8 kb/s Stream #0:0, 1, 1/8000: Audio: g729, 8000 Hz, mono, s16 Successfully opened the file. Parsing a group of options: output url output.wav. Applying option ar (set audio sampling rate (in Hz)) with argument 8000. Applying option acodec (force audio codec ('copy' to copy stream)) with argument pcm_s16le. Applying option f (force format) with argument wav. Successfully parsed a group of options. Opening an output file: output.wav. [file @ 0x7fbe8d510b60] Setting default whitelist 'file,crypto' Successfully opened the file. Stream mapping: Stream #0:0 -> #0:0 (g729 (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s detected 4 logical cores [graph_0_in_0_0 @ 0x7fbe8d5111e0] Setting 'time_base' to value '1/8000' [graph_0_in_0_0 @ 0x7fbe8d5111e0] Setting 'sample_rate' to value '8000' [graph_0_in_0_0 @ 0x7fbe8d5111e0] Setting 'sample_fmt' to value 's16' [graph_0_in_0_0 @ 0x7fbe8d5111e0] Setting 'channel_layout' to value '0x4' [graph_0_in_0_0 @ 0x7fbe8d5111e0] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4 [format_out_0_0 @ 0x7fbe8d511760] Setting 'sample_fmts' to value 's16' [format_out_0_0 @ 0x7fbe8d511760] Setting 'sample_rates' to value '8000' [AVFilterGraph @ 0x7fbe8d511000] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed Output #0, wav, to 'output.wav': Metadata: ISFT : Lavf57.71.100 Stream #0:0, 0, 1/8000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s Metadata: encoder : Lavc57.89.100 pcm_s16le [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 5214 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 38 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 1 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 1410 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 700 times [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/ss/s speed=1.86x Last message repeated 5402 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 1404 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 687 times [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/ss/s speed=1.87x Last message repeated 2916 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 306 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 3475 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 904 times [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/ss/s speed=1.88x Last message repeated 2321 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 1014 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 679 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 808 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 14 times [g729 @ 0x7fbe8d814c00] pitch_delay_int 144 is too large [g729 @ 0x7fbe8d814c00] Packet type: G.729 @ 8kbit/s Last message repeated 1833 times [g729 @ 0x7fbe8d814c00] Packet size 4 is unknown. Error while decoding stream #0:0: Invalid data found when processing input [out_0_0 @ 0x7fbe8d5113e0] EOF on sink link out_0_0:default. No more output streams to write to, finishing. size= 4554kB time=00:00:03.65 bitrate=10212.5kbits/s speed=1.85x video:0kB audio:4554kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001673% Input file #0 (302001014794094.wav): Input stream #0:0 (audio): 29146 packets read (291454 bytes); 29145 frames decoded (2331600 samples); Total: 29146 packets (291454 bytes) demuxed Output file #0 (output.wav): Output stream #0:0 (audio): 29145 frames encoded (2331600 samples); 29145 packets muxed (4663200 bytes); Total: 29145 packets (4663200 bytes) muxed 29145 frames successfully decoded, 1 decoding errors [AVIOContext @ 0x7fbe8d400260] Statistics: 4 seeks, 29148 writeouts [AVIOContext @ 0x7fbe8d50f1c0] Statistics: 291454 bytes read, 0 seeks I get an audio file double in time of the original with some junk output. I guess I am doing something wrong but unable to figure out the mistake -- Sent from: http://www.ffmpeg-archive.org/