ffmpeg – Reduce the number of chunk-stream files when converting to mpeg-dash

My command: ffmpeg -i input_file.mp4 -c:v libx264 -c:a aac -b:v 6000k -b:a 192k -f dash output.mpd

When I convert a mpeg4 file into mpeg-dash, ffmpeg generates a certain number of .m4s files (e.g chunk-stream0-00003.m4s) of different sizes. If I convert a really large file ffmpeg can generate thousands of files like that. My questions are:

  1. how can I set that no .m4s file is more than 5MB? I need this to stream a smaller chunk faster over HTTP.
  2. how can I reduce the number of generated .m4s files? I need this because the custom storage has a limit on files in a directory.

Read more here: Source link