I want to convert some h264 mp4 videos to clearkey encrypted dash. For now I want to serve them on localhost. So I don't have bandwidth limitations. I'm assuming I should use dashavc264:onDemand profile with static mpd since my videos are not live and they are offline.
My question is:
How should I decide what segment duration I should use? does it depend on how often I have keyframes in my video? how does it affect seeking/trickplay performance? Does it affect anything else?
It is, like many things, a balance between competing factors - efficiency, quality, flexibility etc.
In general, short segments allow quicker bandwidth changes etc, but may not be as efficient or as high quality depending on what is traded off.
Most implementations at the time of writing use between 2 and 10 second chunks.
For further reading, there is a good article here looking at the different impacts of different segment lengths along with some recommendations: https://bitmovin.com/mpeg-dash-hls-segment-length/