I'm trying encode a video stream using HEVC with ffmpeg and create a MPEG-TS file. I need to be able to insert IDR frames to certain locations in the stream. I came across the flag -force_key_frames
under ffmpeg documentation, but it doesn't seem to work for me.
Here is the command I tried:
ffmpeg -s:v 1280x720 -i input.yuv -c:v libx265 -x265-params crf=20:keyint=25:fps=25:preset=ultrafast -force_key_frames 1,12,30,111 -f mpegts out.ts
Please help me to sort out this issue.
Thanks.