Body: <p>I am building a web application that consists of a web client and a server. The web client needs to play a continuous stream of MP4 files to the user, preferably through a player like <code>video.js</code>. The problem is that I need to stream the MP4 files in my own protocol rather than something like DASH or HLS. The reason for this is that I cannot create a manifest file for my chunks and that I need to add more messages to the server to prepare the MP4 files.</p>
  <p>In a nutshell, my server needs to fetch some files from some archive storage, convert them to MP4, transcode them and then send them to my client. Fetching the files can take up to 30 seconds. I also do not know all files I have available, so I cannot create a manifest that would tell the client how early this stream goes back in time.</p>
  <p>My solution is simply to have logic on the client to fetch the MP4 files from the server and play them to the client. The problem I am facing at the moment is that when I try to play MP4 files one after another in my client player (video.js), there is slight stuttering when a file ends and a new one starts playing. So this doesn't feel like a long continuous stream.</p>
  <p>The solution I am exploring at the moment would be to convert the MP4 files to MP4 fragments and stream them, but I do not know how this would work considering that I would try to concatenate fragments from different MP4 files.</p>
  <p>How would you go about playing an originally continuous video stream when this stream has been fragmented in multiple MP4 files?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-09T18:16:31.430Z
Comments.Text: I feel that's more a programming challenge that should go on Stackoverflow than a video production question.
Comments.UserDisplayName: Matt
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-09T18:23:04.940Z
Comments.Text: @Matt I am not yet at the programming challenge part. At the moment, I am simply trying to figure out what format I should be sending to my client so that I can merge my chunk together in some sort of byte array to play a seamlessly continuous video. Can I take two different MP4 files, fragment them, and then just join the bytes in my client to play a continuous video? Those are the sort of questions I am facing at the moment.
Comments.UserDisplayName: ThomasFromUganda
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-12T23:22:39.090Z
Comments.Text: I'm not sure I get your use case, but it might be useful to take a look at the nginx-vod-module by Kaltura. It features a mapped/remote mode where you can specify, through a JSON file, sequences of clips that are then concatenated and JIT-transmuxed to produce HLS/DASH/progressive download streams.
Comments.UserDisplayName: mcont
Tags: <streaming><mp4><mpeg-dash><hls>
Title: Streaming MP4 files through HTTP without HLS or DASH?
UserDisplayName: ThomasFromUganda
ThreadText: # Streaming MP4 files through HTTP without HLS or DASH?
  
  (Asked by: username_0 on 2021-02-09)
  
  I am building a web application that consists of a web client and a server. The web client needs to play a continuous stream of MP4 files to the user, preferably through a player like `video.js`. The problem is that I need to stream the MP4 files in my own protocol rather than something like DASH or HLS. The reason for this is that I cannot create a manifest file for my chunks and that I need to add more messages to the server to prepare the MP4 files.
  
  In a nutshell, my server needs to fetch some files from some archive storage, convert them to MP4, transcode them and then send them to my client. Fetching the files can take up to 30 seconds. I also do not know all files I have available, so I cannot create a manifest that would tell the client how early this stream goes back in time.
  
  My solution is simply to have logic on the client to fetch the MP4 files from the server and play them to the client. The problem I am facing at the moment is that when I try to play MP4 files one after another in my client player (video.js), there is slight stuttering when a file ends and a new one starts playing. So this doesn't feel like a long continuous stream.
  
  The solution I am exploring at the moment would be to convert the MP4 files to MP4 fragments and stream them, but I do not know how this would work considering that I would try to concatenate fragments from different MP4 files.
  
  How would you go about playing an originally continuous video stream when this stream has been fragmented in multiple MP4 files?
  
  **Tags:** streaming, mp4, mpeg-dash, hls
  
  > **Comments:**
  > **username_1**: I feel that's more a programming challenge that should go on Stackoverflow than a video production question.  
  > **username_0**: @username_1 I am not yet at the programming challenge part. At the moment, I am simply trying to figure out what format I should be sending to my client so that I can merge my chunk together in some sort of byte array to play a seamlessly continuous video. Can I take two different MP4 files, fragment them, and then just join the bytes in my client to play a continuous video? Those are the sort of questions I am facing at the moment.  
  > **username_2**: I'm not sure I get your use case, but it might be useful to take a look at the nginx-vod-module by Kaltura. It features a mapped/remote mode where you can specify, through a JSON file, sequences of clips that are then concatenated and JIT-transmuxed to produce HLS/DASH/progressive download streams.  
  
  ---
  
  ## 0 answers
  
  