I'm using ffmpeg
library in an ios application to convert mp4 video to HLS. I want to keep the ts file duration as exactly 10 seconds. So I put the following code.
av_opt_set_int(formatContext->priv_data, "hls_time", 10, AV_OPT_SEARCH_CHILDREN);
But the result is not exactly 10 seconds, the duration falls around 10 second, say 11 seconds, 12 seconds, 9 seconds etc. Is there any method to get the accurate 10 second segments from the ffmpeg?