-
Notifications
You must be signed in to change notification settings - Fork 17
Description
I have a video with 5.1.4 audio that I want to encode. Since there's no "official" FFmpeg script for 5.1.4, I made one up based on 5.1.2 and 7.1.4. Could someone validate it?
ffmpeg -i /path/to/input.wav \ -i /path/to/video.mp4 -c:v copy \ -filter_complex "[0:a]channelmap=0|1:stereo[FRONT];[0:a]channelmap=4|5:stereo[BACK];[0:a]channelmap=6|7:stereo[TOP_FRONT];[0:a]channelmap=8|9:stereo[TOP_BACK];[0:a]channelmap=2:mono[CENTER];[0:a]channelmap=3:mono[LFE]" \ -map "[FRONT]" -map "[BACK]" -map "[TOP_FRONT]" -map "[TOP_BACK]" -map "[CENTER]" -map "[LFE]" -map 1:0 \ -stream_group "type=iamf_audio_element:id=1:st=0:st=1:st=2:st=3:st=4:st=5:audio_element_type=channel,layer=ch_layout=5.1.4" \ -stream_group "type=iamf_mix_presentation:id=3:stg=0:annotations=en-us=default_mix_presentation,submix=parameter_id=100:parameter_rate=48000:default_mix_gain=0.0|element=stg=0:headphones_rendering_mode=binaural:annotations=en-us=5.1.4:parameter_id=101:parameter_rate=48000:default_mix_gain=0.0|layout=sound_system=stereo:integrated_loudness=0.0:digital_peak=0.0" \ -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -streamid 6:6 \ -c:a libopus -b:a 64000 /path/to/output.mp4
Edit: I tested it and it seems to be working since FFmpeg didn't output an error, but I just want to be sure...