[FFmpeg-user] problems decoding opus from RTP stream

Dave Horton daveh at beachdognet.com
Fri Sep 22 23:52:25 EEST 2017


I am trying to decode opus audio from an RTP stream and getting some errors.

I’ve tested two different RTP streams (same conversation, one from caller and the other from callee).
I am using HEAD, as of a few days ago.

One decodes fine, the other gives these errors:

size=      15kB time=00:00:02.38 bitrate=  51.4kbits/s speed=0.786x    
[opus @ 0x7fcc1b000000] LBRR frames is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[opus @ 0x7fcc1b000000] Error decoding a SILK frame.
[opus @ 0x7fcc1b000000] Error decoding an Opus frame.

The SDP I feed in is:

v=0
o=root 1530041045 1530041045 IN IP4 81.201.82.171
s=session
c=IN IP4 127.0.0.1
t=0 0
m=audio 40130 RTP/AVP 107 101
a=rtpmap:107 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:107 useinbandfec=1
a=fmtp:101 0-16
a=rtcp:40131
a=ptime:20
a=maxptime:60
a=sendrecv
a=silenceSupp:off - - - -

The arguments are:

-loglevel debug -y -protocol_whitelist file,crypto,udp,rtp,pipe -re -i pipe:0 -ar 48000 foo.flac



The output looks like this
****
ffmpeg 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 '-protocol_whitelist' ... matched as AVOption 'protocol_whitelist' with argument 'file,crypto,udp,rtp,pipe'.
Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
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 '48000'.
Reading option 'foo.flac' ... 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 re (read input at native frame rate) with argument 1.
Successfully parsed a group of options.
Opening an input file: pipe:0.
[NULL @ 0x7ffbd1810600] Opening 'pipe:0' for reading
TS score: 0 0
[sdp @ 0x7ffbd1810600] Format sdp probed with size=2048 and score=50
[sdp @ 0x7ffbd1810600] audio codec set to: opus
[sdp @ 0x7ffbd1810600] audio samplerate set to: 48000
[sdp @ 0x7ffbd1810600] audio channels set to: 2
[sdp @ 0x7ffbd1810600] audio codec set to: opus
[sdp @ 0x7ffbd1810600] audio samplerate set to: 8000
[sdp @ 0x7ffbd1810600] audio channels set to: 1

udp @ 0x7ffbd1500ea0] end receive buffer size reported is 65536

 end receive buffer size reported is 65536
[sdp @ 0x7ffbd1810600] After avformat_find_stream_info() pos: 311 bytes read:311 seeks:0 frames:1
Input #0, sdp, from 'pipe:0':
  Metadata:
    title           : session
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 1, 1/8000: Audio: opus, 48000 Hz, mono, fltp
Successfully opened the file.

Parsing a group of options: output url foo.flac.
Applying option ar (set audio sampling rate (in Hz)) with argument 48000.
Successfully parsed a group of options.
Opening an output file: foo.flac.

[file @ 0x7ffbd2900660] Setting default whitelist 'file,crypto'

Successfully opened the file.

Stream mapping:
  Stream #0:0 -> #0:0 (opus (native) -> flac (native))
cur_dts is invalid (this is harmless if it occurs once at the start per stream)

 [SWR @ 0x7ffbd3008600] Using fltp internally between filters

 detected 8 logical cores

[graph_0_in_0_0 @ 0x7ffbd1500120] Setting 'time_base' to value '1/48000'
[graph_0_in_0_0 @ 0x7ffbd1500120] Setting 'sample_rate' to value '48000'

 [graph_0_in_0_0 @ 0x7ffbd1500120] Setting 'sample_fmt' to value 'fltp'
[graph_0_in_0_0 @ 0x7ffbd1500120] Setting 'channel_layout' to value '0x4'

[graph_0_in_0_0 @ 0x7ffbd1500120] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x4

[format_out_0_0 @ 0x7ffbd2a003e0] Setting 'sample_fmts' to value 's16|s32'
[format_out_0_0 @ 0x7ffbd2a003e0] Setting 'sample_rates' to value '48000'

[format_out_0_0 @ 0x7ffbd2a003e0] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_0'
[AVFilterGraph @ 0x7ffbd1500440] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x7ffbd1501a20] picking s32 out of 2 ref:fltp
[auto_resampler_0 @ 0x7ffbd1501a20] [SWR @ 0x7ffbd2019a00] Using fltp internally between filters
[auto_resampler_0 @ 0x7ffbd1501a20] ch:1 chl:mono fmt:fltp r:48000Hz -> ch:1 chl:mono fmt:s32 r:48000Hz

[flac @ 0x7ffbd3001800] encoding as 24 bits-per-sample
[flac @ 0x7ffbd3001800]  compression: 5
[flac @ 0x7ffbd3001800]  lpc type: Levinson-Durbin recursion with Welch window
[flac @ 0x7ffbd3001800]  prediction order: 1, 8
[flac @ 0x7ffbd3001800]  order method: estimate
[flac @ 0x7ffbd3001800]  partition order: 0, 8
[flac @ 0x7ffbd3001800]  block size: 4608
[flac @ 0x7ffbd3001800]  lpc precision: 15
Output #0, flac, to 'foo.flac':
  Metadata:
    title           : session
    encoder         : Lavf57.82.100
    Stream #0:0, 0, 1/48000: Audio: flac, 48000 Hz, mono, s32 (24 bit), 128 kb/s
    Metadata:
      encoder         : Lavc57.106.101 flac
cur_dts is invalid (this is harmless if it occurs once at the start per stream)


Last message repeated 48 times
[opus @ 0x7ffbd3000000] LBRR frames is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[opus @ 0x7ffbd3000000] Error decoding a SILK frame.
[opus @ 0x7ffbd3000000] Error decoding an Opus frame.

cur_dts is invalid (this is harmless if it occurs once at the start per stream)

 Last message repeated 20 times
[opus @ 0x7ffbd3000000] LBRR frames is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[opus @ 0x7ffbd3000000] Error decoding a SILK frame.
[opus @ 0x7ffbd3000000] Error decoding an Opus frame.

[opus @ 0x7ffbd3000000] LBRR frames is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[opus @ 0x7ffbd3000000] Error decoding a SILK frame.
[opus @ 0x7ffbd3000000] Error decoding an Opus frame.
ffmpeg stderr says: pipe:0: Operation timed out

[out_0_0 @ 0x7fa710706480] EOF on sink link out_0_0:default.=  14.7kbits/s speed=0.708x    
No more output streams to write to, finishing.

 size=      46kB time=00:00:25.78 bitrate=  14.7kbits/s speed=0.707x    
video:0kB audio:38kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 21.209490%

ffmpeg stderr says: Input file #0 (pipe:0):
  Input stream #0:0 (audio): 206 packets read (25881 bytes); 206 frames decoded (197760 samples); 
  Total: 206 packets (25881 bytes) demuxed
Output file #0 (foo.flac):
  Output stream #0:0 (audio): 43 frames encoded (197760 samples); 44 packets muxed (39157 bytes); 
  Total: 44 packets (39157 bytes) muxed

ffmpeg stderr says: 206 frames successfully decoded, 0 decoding errors

ffmpeg stderr says: [AVIOContext @ 0x7fa710702780] Statistics: 0 seeks, 1 writeouts

ffmpeg stderr says: [AVIOContext @ 0x7fa710500580] Statistics: 311 bytes read, 0 seeks

ffmpeg exited with 0



More information about the ffmpeg-user mailing list