Comments (7)
You just concatenate an init segment with the media segments to get a multi-segment file
cat init.mp4 *.m4s > combined.mp4
That file can be played with ffplay or other tools.
You can even do it on the fly like cat init.mp4 *.m4s | ffplay -
.
Of course, if you have many segment files you must add the one-digit segments before the two-digit ones etc:
cat init.mp4 ?.m4s ??.m4s ???.m4s| ffplay -
from mp4ff.
For the mp4 without audio, the command cat init.mp4 *.m4s > combined.mp4 works!!!
But for the mp4 with audio and video, what is the proper combine sequence?
xx_v1_init.mp4 xx_a1_init.mp4 xxx_v1_01.m4s xxx_a1_01.m4s ... ,
from mp4ff.
I have a problem with combining both audio and video segments. help for how to combine the segment files.
from mp4ff.
Typically you should not combine them if they are segmented. That is the approach that DASH-IF and HLS are taking for VoD assets. Not combining them gives much more possibilities for bitrate adaptation and combinations of languages and that is what ABR streaming is about.
If you combine them, you need to make a multiplexed init segment with different tracks for audio and video.
There are mp4ff functions that can be used, but you need to know what you're doing.
I would suggest that you use MP4Box for the job. After you have joined the video segments into v.mp4 and audio segments into a.mp4, use MP4Box like
MP4Box -add v.mp4 -add a.mp4 av.mp4
and you will have a combined (progressive) mp4 file.
from mp4ff.
My question: For the fragment MP4 with audio and video, there is no such single file for the player to play. Is it true?
As my previous understanding, the segment app could separate the progress the MP4 file into segments. It is suitable for the player. The resegment could combine the segment files into one, so it is easy to contribute. (I think it is a wrong understanding.)
from mp4ff.
Sure, you can have multiplexed segments with both audio and video in the same segment. They will be different tracks defined in the init segment with two different trak
boxes and then specified with two different traf
boxes in the media segments.
I wrote some code Python code for multiplexing segments a long time ago. That code is available at https://github.com/Dash-Industry-Forum/dash-live-source-simulator/blob/develop/dashlivesim/dashlib/segmentmuxer.py
from mp4ff.
Thank you for help
from mp4ff.
Related Issues (20)
- decode mdat: unexpected EOF HOT 2
- combine fragments HOT 12
- support mdat size 0 HOT 2
- stsc: single entry HOT 2
- How to transform the ES stream into segment MP4 file HOT 2
- PSSH box not parsed when DecryptInit is called HOT 6
- Too few bytes in ESDS box HOT 4
- decode box "n:mp", size 30066 too big HOT 2
- Panic when dumping STPP Mdat HOT 3
- [mp4ff-wvttlister ]Missing Data HOT 5
- SPS/PPS serialization HOT 5
- mp4ff cannot parse multi-level sidx file
- DecodeESDecriptor: read size 19 differs from calculated size 17 HOT 12
- mp4ff-decrypt: decryptSegment: no senc box in traf HOT 5
- Make MP4 Descriptor code cope with erroneous input
- decode box \"s://\", size 1752462448 too big (max 345) HOT 5
- AAC LC to PCM HOT 5
- Support for Event Message boxes
- sbgp grouping type seam not supported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mp4ff.