videojs / mux.js

Lightweight utilities for inspecting and manipulating video container formats.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merge multiple ts videos into one mp4 file

long-key opened this issue · 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?

isn't the basic usage example exactly that?

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.

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

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.

same issue😭