[FFmpeg-user] Need Help For Splitting, Re-Encoding and Joining again

Faraz Ahmed faraz.ahmed at purelogics.net
Thu Mar 29 12:00:00 EEST 2018


 Hi,

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


   1. First we split the video into small segments using below command
   2. 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
   3. Then we divide these segments among multiple encoding servers
   4. Each encoding server re-encode the segment using below command
   5. 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
   6. When all segments have re-encoded then we join them to make single
   file using below command
   7. 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. I am also sharing my output video
link below.

https://www.dropbox.com/s/2dugqt944n19s2j/4k_compressed_1.mp4?dl=0

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.



Thanks,
Faraz


More information about the ffmpeg-user mailing list