Version 2.2.2 streaming channel-layout audio stereo


#1

Hi,

Currently using version 2.2.2 beta.
I think the default audio mixer channel layout is 8 channels.

How can I change the audio channel layout to stereo for the ffmpeg producer for streaming rtmp?
Methods that I have tried but failed.

  1. config file (works for 2.1 and 1.7 but not 2.2)
    <channel>
      <video-mode>720p2997</video-mode>
	<channel-layout>stereo</channel-layout>
      <consumers>
      </consumers>
    </channel>
  1. add ffmpeg options (-ac 2). ffmpeg consumer unitialized the stream.

Result of the stream’s audio is 7.1 channel and not stereo

Input #0, flv, from ‘rtmp://71.xxx’:
Metadata:
encoder : Lavf58.17.101
Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 2000 kb/s, 30.30 fps, 29.97 tbr, 1k tbn, 59.94 tbc
Stream #0:1: Audio: aac (LC), 48000 Hz, 7.1, fltp, 469 kb/s
[aac @ 0000000000659f00] Assuming an incorrectly encoded 7.1 channel layout instead of a spec-compliant 7.1(wide) layout, use -strict 1 to decode according to the specification instead.

Any help would be appreciated


#2

For recording a pal signal with stereo audio i used a command like below

add 1 file test1.mp4 -codec:v libx264 -maxrate:v 15M -minrate:v 15M -bufsize:v 1146k  -filter:v fps=25,setdar=4/3 -flags:v +ildct  -filter:a pan=stereo| FL < FL + 0.5*FC + 0.6*BL + 0.6*SL | FR < FR + 0.5*FC + 0.6*BR + 0.6*SR

#3

Thank you Vimlesh,
Your code works converting it to stereo