Opened 8 years ago

Closed 8 years ago

#3992 closed defect (invalid)

When streaming stereo opus audio over rtp, ffmpeg prints sdp info for a mono stream

Reported by: CoRoNe Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: opus rtp sdp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


How to reproduce:

ffmpeg -hide_banner -f dshow -channel_layout stereo -i audio="NVIDIA(R) nForce(TM)
Audio" -c:a libopus -ab 96k -f rtp rtp://
Input #0, dshow, from 'audio=NVIDIA(R) nForce(TM) Audio':
  Duration: N/A, start: 8066.233000, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Output #0, rtp, to 'rtp://':
    encoder         : Lavf56.7.101
    Stream #0:0: Audio: opus (libopus), 48000 Hz, stereo, s16, 96 kb/s
      encoder         : Lavc56.1.101 libopus
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> opus (libopus))
o=- 0 0 IN IP4
s=No Name
c=IN IP4
t=0 0
a=tool:libavformat 56.7.101
m=audio 1234 RTP/AVP 97
a=rtpmap:97 opus/48000

Press [q] to stop, [?] for help
[libopus @ 02f26480] Queue input is backward in time/s
size=      59kB time=00:00:04.49 bitrate= 106.8kbits/s
video:0kB audio:56kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 4.765315%

When I copy-paste and save the SDP info to a sdp-file and open it with ffplay.exe (or MPC-HC) the stereo opus stream has become mono.
When I add /2 to the end of the sdp-file, it's stereo again.

a=rtpmap:97 opus/48000/2

I've read the comment in libavformat/sdp.c#l600, but I still don't understand why you default to mono in this case.

Change History (1)

comment:1 by Carl Eugen Hoyos, 8 years ago

Keywords: mono removed
Resolution: invalid
Status: newclosed

Please test current FFmpeg git head before reporting a bug and please always provide the command line that allows to reproduce your problem together with the complete, uncut console output.

The issue you describe was fixed Monday.

Note: See TracTickets for help on using tickets.