How can I play a transport stream file in Angular?

115 Views Asked by At

In my angular app, I have a use case where the user must select a transport stream (.ts) file via a file input. The file must then be played in the html video element available for the user to see.

The problem I believe I'm facing is that html5 does not support .ts files as a src for the video element and I am not sure how else I can manage to play the video.

I do have some limitations for the solution:

  1. If we have to convert the file, the process must be fast so that the user is not stuck waiting for too long. This likely means that we cannot upload the file to the backend for processing as upload times for 30 minutes+ .ts video files will probably take long to upload and then download the mp4.
  2. I have thought of using ffmpeg, but I am not sure that it is feasible. FFmpeg also uses a gpl license which can be a limitation too.

As a side note, I am fine with a solution in which we only retrieve a few frames, as the end goal is for the user to select a frame from the video. However, I am okay with the frame being predetermined.

0

There are 0 best solutions below