mux.js icon indicating copy to clipboard operation
mux.js copied to clipboard

Merge multiple ts videos into one mp4 file

Open long-key opened this issue 3 years ago • 5 comments

Are any developers still paying attention to this library? I'm working on a web app and I've converted multiple ts fragments into arraybuffer, I need to merge them into one mp4 file and download to hard drive. Is it possible to merge multiple ts videos into one mp4 file?

long-key avatar Sep 24 '22 05:09 long-key

isn't the basic usage example exactly that?

anonghuser avatar Sep 26 '22 09:09 anonghuser

isn't the basic usage example exactly that?

I have tested that the synthesized video can be played in the video tag. If it is downloaded to the hard disk and played using the local player, the sound is out of sync with the video. It seems that this library is only for playing video in the browser. It cannot composite video for local playback.

long-key avatar Sep 27 '22 11:09 long-key

It should be possible to download the resolution fmp4, and I'd expect it to play back the same as on the web. also, this module provides a binary that can help transmux ts to mp4 https://github.com/videojs/mux.js/blob/main/bin/transmux.js https://github.com/videojs/mux.js/blob/main/package.json#L13

gkatsev avatar Sep 27 '22 16:09 gkatsev

there may be some inconsistencies with the timing data of the video and audio of your source. you can try changing the keepOriginalTimestamps option. or your "local player" may just be bad, since you don't say what it is. its a bit of a pity the library doesn't offer more control over or at least documentation/explanation about the timing data, but it works ok at least for the basic cases.

anonghuser avatar Sep 28 '22 13:09 anonghuser

same issue😭

GrapevineLin avatar Apr 09 '24 06:04 GrapevineLin