We want to encode large video files faster. To make encoding faster we are using multiple encoding servers. Below is our process of encoding flow
First we split the video into small segments using below command
ffmpeg -i F:\video_data_set\4k_compressed.mp4 -f segment -segment_time 5 -segment_start_number 1 -codec copy -copyts -avoid_negative_ts 1 F:\video_data_set\test\%d_4k_compressed.mp4
Then we divide these segments among multiple encoding servers Each encoding server re-encode the segment using below command
ffmpeg -hide_banner -i F:\video_data_set\test\1_4k_compressed.mp4 -c:a aac -ar 44100 -b:a 128k -c:v libx264 -x264opts nal-hrd=cbr:force-cfr=1 -pix_fmt yuv420p -profile:v baseline -level 3.0 -vf "scale=1280:-2,setdar=16:9" -b:v 3.9M -minrate 3.9M -maxrate 3.9M -bufsize 7.8M -preset ultrafast -crf 18 -r 30 -g 30 -threads 8 F:\video_data_set\test\1_4k_compressed_1.mp4
When all segments have re-encoded then we join them to make single file using below command
ffmpeg -hide_banner -f concat -safe 0 -i F:\video_data_set\test\files_2.txt -c copy -threads 8 F:\video_data_set\4k_compressed_1.mp4
All is performing well but the issue we are facing is that after each segment there is click sound in output audio.
For example I have encoded 5 segments having duration 6,6,3,6 and 6 seconds when I joined them using above mentioned command the output video has click sound at 6,12,15 and 21 seconds of video.
Can you please help me and let me know what is the cause of this click sound and how to fix and remove this click sound from output video.