[FFmpeg-trac] #8435(undetermined:new): ffmpeg sets opus audio to stereo in SDP even though it is mono
FFmpeg
trac at avcodec.org
Thu Dec 19 13:22:53 EET 2019
#8435: ffmpeg sets opus audio to stereo in SDP even though it is mono
-------------------------------------+-------------------------------------
Reporter: | Type: defect
rudolfs.bundulis |
Status: new | Priority: minor
Component: | Version:
undetermined | unspecified
Keywords: opus rtsp | Blocked By:
sdp |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
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
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8435>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list