[FFmpeg-user] problem transcoding raw g729 to wav format

Dave Horton daveh at beachdognet.com
Thu Sep 28 16:34:36 EEST 2017


I am trying to decode a raw g729 input stream to wav format like so:

ffmpeg -loglevel debug -threads 1 -y -acodec g729 -f g729 -i pipe:0 -ar 44100 -acodec pcm_s32le -f wav pipe:1

As you can see, the raw g729 is piped to stdin and the wav output should be piped to stdout.

I am seeing this output / errors in the log, and I get an empty wav file:

ffmpeg version N-87327-g18821e3ba1-static http://johnvansickle.com/ffmpeg/ 
Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.4.0 (Debian 6.4.0-5) 20170906 
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg 
libavutil 55. 75.100 / 55. 75.100 
libavcodec 57.106.101 / 57.106.101 
libavformat 57. 82.100 / 57. 82.100 
libavdevice 57. 8.101 / 57. 8.101 
libavfilter 6.105.100 / 6.105.100 
libswscale 4. 7.103 / 4. 7.103 
libswresample 2. 8.100 / 2. 8.100 
libpostproc 54. 6.100 / 54. 6.100 
Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug’. 
Reading option '-threads' ... matched as AVOption 'threads' with argument '1’. 
 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 'pipe:0’. 
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '44100’.
 Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'pcm_s32le’. 
Reading option '-f' ... matched as option 'f' (force format) with argument 'wav’. 
Reading option 'pipe:1' ... 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 pipe:0.
 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: pipe:0. [g729 @ 0x3e25da0] 
Opening 'pipe:0' for reading [pipe @ 0x3e265a0] 
Setting default whitelist 'crypto'

[g729 @ 0x3e25da0] Before avformat_find_stream_info() pos: 0 bytes read:0 seeks:0 nb_streams:1 
[g729 @ 0x3e25da0] After avformat_find_stream_info() pos: 0 bytes read:0 seeks:0 frames:0 
Guessed Channel Layout for Input Stream #0.0 : mono 
Input #0, g729, from 'pipe:0': Duration: N/A, bitrate: 8 kb/s Stream #0:0, 0, 1/8000: Audio: g729, 8000 Hz, mono, s16 
Successfully opened the file. 
Parsing a group of options: output url pipe:1. 
Applying option ar (set audio sampling rate (in Hz)) with argument 44100. 
Applying option acodec (force audio codec ('copy' to copy stream)) with argument pcm_s32le.
Applying option f (force format) with argument wav. 
Successfully parsed a group of options. 
Opening an output file: pipe:1. [pipe @ 0x3e2aba0] 
Setting default whitelist ‘crypto'
Successfully opened the file.
Stream mapping: Stream #0:0 -> #0:0 (g729 (native) -> pcm_s32le (native)) 
cur_dts is invalid (this is harmless if it occurs once at the start per stream) 
No more output streams to write to, finishing. 
Finishing stream 0:0 without any data written to it. detected 8 logical cores

[graph_0_in_0_0 @ 0x3e2daa0] Setting 'time_base' to value '1/8000’ 
[graph_0_in_0_0 @ 0x3e2daa0] Setting 'sample_rate' to value '8000’ 
graph_0_in_0_0 @ 0x3e2daa0] Setting 'sample_fmt' to value 's16’ 
[graph_0_in_0_0 @ 0x3e2daa0] Setting 'channel_layout' to value '0x4’ 
[graph_0_in_0_0 @ 0x3e2daa0] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4 
format_out_0_0 @ 0x3e25ca0] Setting 'sample_fmts' to value 's32’ 
[format_out_0_0 @ 0x3e25ca0] Setting 'sample_rates' to value '44100’ 
[format_out_0_0 @ 0x3e25ca0] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_0' 
[AVFilterGraph @ 0x3e2c640] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed 
[auto_resampler_0 @ 0x3e3fd20] [SWR @ 0x3e400c0] Using fltp internally between filters 
[auto_resampler_0 @ 0x3e3fd20] ch:1 chl:mono fmt:s16 r:8000Hz -> ch:1 chl:mono fmt:s32 r:44100Hz 
Output #0, wav, to 'pipe:1’: 
Metadata: ISFT : Lavf57.82.100 
Stream #0:0, 0, 1/44100: Audio: pcm_s32le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s32, 1411 kb/s 
Metadata: encoder : Lavc57.106.101 pcm_s32le size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown 
Input file #0 (pipe:0): Input stream #0:0 (audio): 0 packets read (0 bytes); 0 frames decoded (0 samples); Total: 0 packets (0 bytes) 
demuxed Output file #0 (pipe:1): Output stream #0:0 (audio): 0 frames encoded (0 samples); 0 packets muxed (0 bytes); Total: 0 packets (0 bytes) muxed Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) 
0 frames successfully decoded, 0 decoding errors

Is there something wrong with my command?  Interestingly, if I transcode to flac instead of wav, while I get similar errors, an accurate output file _is_ created in that case.

Dave



More information about the ffmpeg-user mailing list