Opened 4 years ago

Closed 4 years ago

#8435 closed defect (invalid)

ffmpeg sets opus audio to stereo in SDP even though it is mono

Reported by: rudolfs.bundulis Owned by:
Priority: minor Component: undetermined
Version: unspecified Keywords: opus rtsp sdp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

ffmpeg sets a=rtpmap:98 opus/48000/2 indicating a stereo track
in RTSP SDP when the source is actually mono.

How to reproduce:

The input file has been attached (Big buck bunny with an additional mono audio track that has a sine.

% ffmpeg -re  -i 4000hz-u8bit-pcm-with-video-320-240.mp4 -map 0:0 -map 0:1  -map 0:2  -c:a opus -strict -2 -c:v h264 -profile:v baseline -x264-params repeat-headers=1  -rtsp_transport tcp -f rtsp   rtsp://localhost:554/app/live

ffmpeg version 4.2.1
built on macOS 10.15

Here is the output from ffmpeg with -loglevel panic, which shows the invalid SDP:

[rtsp @ 0x7fc2e802ee00] SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=Big Buck Bunny, Sunflower version
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LADdkBQfsOEAAAAwAQAAADA8DxQqSA,aMuDyyA=; profile-level-id=42C00D
a=control:streamid=0
m=audio 0 RTP/AVP 97
b=AS:96
a=rtpmap:97 opus/48000/2
a=fmtp:97 sprop-stereo=1
a=control:streamid=1
m=audio 0 RTP/AVP 98
b=AS:48
a=rtpmap:98 opus/48000/2 # This track should be mono
a=control:streamid=2

Change History (1)

comment:1 by rudolfs.bundulis, 4 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.