0

I am trying to convert a video stream into 5 video streams which only contain a part of the video stream. Would this be feasible, and what would be the most effective way to do this?

Thank you for your time!

andershopl
  • 19
  • 3

1 Answers1

0

Assigning you are staring with a static video file rather than a live stream, then you can simply split the video file into parts and then stream each one separately.

ffmpeg is a common cross platform tool for this type of thing.

The following command will create a new video from a portion of an input video:

ffmpeg -ss 00:00:00 -t 00:30:00 -i yourInputVideo.mp4 -acodec copy \
-vcodec copy newPortionOfInputVideo.mp4

This example copies the encoding directly - i.e. it does not re-encode. See this answer for some more detailed discussion especially around keyframes and how this can affect the start and end points - essentially if there is not a keyframe (a frame that is used to derive other frames in certain encodings) at the point you want you may need to either re-encode or else include an instruction in the mp4 to tell the player to start the video at an offset: Cutting the videos based on start and end time using ffmpeg

Mick
  • 19,483
  • 1
  • 40
  • 91