Every video converted with FFMPEG cannot be played on TV

I am trying to convert a sample video to 1080p size from 4K. My TV is HD that can support FULL HD playback via USB. It's an LG Smart TV from 2017 that can even play HEVC 1080p. But any video that I convert or encode via ffmpeg is not working. I tried numerous settings. Currently, this is what I used:

ffmpeg -i input.mp4 -c:v libx264 -vf scale=-1:1080,scale=out_color_matrix=bt709 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -pix_fmt yuv420p -crf 18 -preset veryslow -c:a copy output.mp4

The TV does display the thumbnail, but unable to play. I even tried separating the audio to see if that was causing the issue, but it didn't work either. However, if I conver it via online software, a simple one, it works. However not able to set the quality according to my need.

It's a 4K video that I want to convert to Full HD keeping the highest quality of video.


Solution 1:

The veryslow preset for the libx264 encoder will try to use upto 16 refs but your TV may not support that. Add -refs 2 -bf 2 to limit to a sane number of reference frames.