On Sep 28, 2017, at 5:52 PM, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
Does it work if you use file input?
Carl Eugen
Hmm, well in my latest testing I am getting a good wave file generated — both when I test using streams or files. So perhaps my only concern is the warnings about "Non-monotonous DTS in output stream..” What is this trying to tell me? Is this something I can safely ignore, or should I look into addressing it somehow? Here is the output when I run from files... ffmpeg -loglevel debug -y -acodec g729 -f g729 -i caller.raw -ar 44100 -acodec pcm_s32le -f wav caller.wav version N-87326-g3ffd3b7 Copyright (c) 2000-2017 the FFmpeg developers built with Apple LLVM version 7.3.0 (clang-703.0.29) configuration: --enable-gpl --enable-nonfree --enable-libopus --enable-libspeex --enable-libvpx --enable-libmp3lame --disable-optimizations --disable-stripping --extra-cflags='-DDEBUG -O0 -g' 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 '-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 'caller.raw'. 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 'caller.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 caller.raw. 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: caller.raw. [g729 @ 0x7fd079010600] Opening 'caller.raw' for reading [file @ 0x7fd078c15720] Setting default whitelist 'file,crypto' [g729 @ 0x7fd079010600] Before avformat_find_stream_info() pos: 0 bytes read:20480 seeks:0 nb_streams:1 [g729 @ 0x7fd079010600] All info found [g729 @ 0x7fd079010600] Estimating duration from bitrate, this may be inaccurate [g729 @ 0x7fd079010600] After avformat_find_stream_info() pos: 10 bytes read:20480 seeks:0 frames:1 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, g729, from 'caller.raw': Duration: 00:00:20.48, 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 caller.wav. 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: caller.wav. [file @ 0x7fd078c17300] Setting default whitelist 'file,crypto' Successfully opened the file. Stream mapping: Stream #0:0 -> #0:0 (g729 (native) -> pcm_s32le (native)) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s detected 8 logical cores [graph_0_in_0_0 @ 0x7fd078e002a0] Setting 'time_base' to value '1/8000' [graph_0_in_0_0 @ 0x7fd078e002a0] Setting 'sample_rate' to value '8000' [graph_0_in_0_0 @ 0x7fd078e002a0] Setting 'sample_fmt' to value 's16' [graph_0_in_0_0 @ 0x7fd078e002a0] Setting 'channel_layout' to value '0x4' [graph_0_in_0_0 @ 0x7fd078e002a0] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4 [format_out_0_0 @ 0x7fd078e00840] Setting 'sample_fmts' to value 's32' [format_out_0_0 @ 0x7fd078e00840] Setting 'sample_rates' to value '44100' [format_out_0_0 @ 0x7fd078e00840] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_0' [AVFilterGraph @ 0x7fd078c186a0] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed [auto_resampler_0 @ 0x7fd078e011c0] [SWR @ 0x7fd079800600] Using fltp internally between filters [auto_resampler_0 @ 0x7fd078e011c0] ch:1 chl:mono fmt:s16 r:8000Hz -> ch:1 chl:mono fmt:s32 r:44100Hz Output #0, wav, to 'caller.wav': 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 [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -82; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -77; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -71; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -66; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -60; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -55; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -49; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -44; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -38; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -33; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -27; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -22; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -16; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -11; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s [wav @ 0x7fd079008600] Non-monotonous DTS in output stream 0:0; previous: 0, current: -5; changing to 0. This may result in incorrect timestamps in the output file. [g729 @ 0x7fd079019800] Packet type: G.729 @ 8kbit/s Last message repeated 2031 times [out_0_0 @ 0x7fd078e004e0] EOF on sink link out_0_0:default. No more output streams to write to, finishing. size= 3528kB time=00:00:00.26 bitrate=108706.8kbits/s speed=0.653x video:0kB audio:3528kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002823% Input file #0 (caller.raw): Input stream #0:0 (audio): 2048 packets read (20480 bytes); 2048 frames decoded (163840 samples); Total: 2048 packets (20480 bytes) demuxed Output file #0 (caller.wav): Output stream #0:0 (audio): 2049 frames encoded (903168 samples); 2049 packets muxed (3612672 bytes); Total: 2049 packets (3612672 bytes) muxed 2048 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x7fd078c17440] Statistics: 4 seeks, 17 writeouts [AVIOContext @ 0x7fd078c15860] Statistics: 20480 bytes read, 0 seeks