Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
19th April 2005, 17:17 | #1 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
HowTo split/concatenate MP4 files with MP4Box
some might have already noticed it: MP4Box now supports splitting and concatenating of MP4 files too
splitting splitting can be done timewise, sizewise (eg split every 700MB). parts of a MP4 can be extracted timewise (eg from sec 10 - 60)... of course splitting video will be done at keyframes automatically. to avoid too much hassles with keyframes the splitting option will only work on mp4 files which have only 1 video stream! the flags for splitting are: - split seconds - splits size (in kb) - splitx Starttime:Endtime (in seconds) eg if you want to split a 1400mb MP4 file into two parts a 700mb you can use the following cmdl: Code:
MP4Box -splits 716800 input.mp4 concatenating (or appending) can be done on all files which are similar (eg same resolution, some audio/video format...), framerate shouldnt matter (as MP4 supports variable framerate) the flag for concatenating is: - cat it works in a similar way as "-add", which means you can even -cat two .avi or .mpg files into one MP4 file in one commandline eg for concatenating two files you can use: Code:
MP4Box -cat file1.mp4 -cat file2.mp4 output.mp4 i did lots of tests with these functions, so it seems to be pretty stable already, but of course there can still be glitches as its a pretty new feature get a binary supporting it here (compiled by celtic_druid)
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free Last edited by bond; 2nd June 2005 at 21:02. |
19th April 2005, 21:28 | #3 | Link | |
Senior n00b
Join Date: Jan 2004
Location: Italy
Posts: 446
|
Quote:
|
|
20th April 2005, 19:19 | #4 | Link | |
stupid
Join Date: Sep 2004
Location: Cologne
Posts: 638
|
Quote:
__________________
cu Joe ------------------------ freedom is just another word for nothing left to loose |
|
23rd April 2005, 12:19 | #6 | Link | |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
Quote:
Here's a piece of info not mentioned anywhere: you can split while muxing. mp4box first muxes all your streams, then it splits the final MP4 file.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
|
25th April 2005, 17:44 | #7 | Link | |
stupid
Join Date: Sep 2004
Location: Cologne
Posts: 638
|
Re: HowTo split/concatenate MP4 files with MP4Box
Quote:
mp4box -cat Film.mp4 -cat Credits.mp4 Total.mp4 Total.mp4 only includes "Film.mp4" Here is the log: mp4box.exe" -cat Film.mp4 -cat Credits.mp4 Total.mp4 Appending file Film.mp4 No suitable destination track found - creating new one (type vide) Appending file Credits.mp4 No suitable destination track found - creating new one (type vide) Saving to Total.mp4: 0.500 secs Interleaving
__________________
cu Joe ------------------------ freedom is just another word for nothing left to loose |
|
25th April 2005, 17:50 | #8 | Link | |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
25th April 2005, 18:11 | #9 | Link | |
stupid
Join Date: Sep 2004
Location: Cologne
Posts: 638
|
Quote:
Same output, just Film.mp4 is in Total.mp4 Here is the log: D:\Testvideo\Test2>"C:\Programme\DVD Tools\mpeg4\GPac\mp4box.exe" -cat Film.mp4 -cat Credits.mp4 -new Total.mp4 Appending file Film.mp4 No suitable destination track found - creating new one (type vide) Appending file Credits.mp4 No suitable destination track found - creating new one (type vide) Saving Total.mp4: 0.500 secs Interleaving
__________________
cu Joe ------------------------ freedom is just another word for nothing left to loose Last edited by JoeBG; 25th April 2005 at 18:41. |
|
26th April 2005, 14:07 | #11 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
maybe the two samples use some features that are not combineable into one stream...
can you upload two short snips of both streams somewhere plz
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
26th April 2005, 15:46 | #12 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
"Considering that frame accurate means GOP re-encoding.."
no, it shouldn't have to if one uses a mp4 shell. iirc with a mp4 shell it should be possible that the split would still be at gop start/end, but the 1st part shouldn't show the frames behind the splitpoint that belong to the gop the splitpoint belongs too. The second part would start decoding at the start of the gop, but display would start at behind the splitpoint,.. |
26th April 2005, 15:47 | #13 | Link |
stupid
Join Date: Sep 2004
Location: Cologne
Posts: 638
|
I can join them with DOS and "-add" the joined file with mp4box; works perfekt. It´s a scene, cuttet out of the middle of a film. Similar avs Skripts for credits and film, just other trim parameters.
The encoding of the Credits was done with CQ 40. The encoding of the main-movie was with 2 pass. Do you really need it upped somewhere?
__________________
cu Joe ------------------------ freedom is just another word for nothing left to loose |
26th April 2005, 15:59 | #14 | Link | |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
with the split option you could upload two small 500kb samples somewhere i could try are you sure you used the same settings in both files, apart from the quant thingie? meaning, do both use cabac, same deblocking setting, same resolution, etc...
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
26th April 2005, 16:16 | #15 | Link |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
if it's AVC, it might have something to do with the issue we discussed about joining raw streams when I introduced the separate credits encoding in megui. Does raw merging, then muxing the resulting stream into an mp4 work?
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
26th April 2005, 17:03 | #16 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
|
Quote:
My thanks to everybody... It looks like their are some exciting times ahead for the .MP4 container Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
26th April 2005, 17:25 | #17 | Link | |
stupid
Join Date: Sep 2004
Location: Cologne
Posts: 638
|
Quote:
@ doom9 It is AVC, so you might be right with analysing the problem.
__________________
cu Joe ------------------------ freedom is just another word for nothing left to loose |
|
26th April 2005, 18:00 | #18 | Link | |
clueless n00b
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
|
Quote:
Why are you not using MeGUI by the way? Even though there are potential problems even with MeGUI, so far nobody has reported a problem with separate end credits using x264. At least you cannot mess up the settings unless you edit the xml files.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org |
|
28th April 2005, 17:54 | #19 | Link | ||
stupid
Join Date: Sep 2004
Location: Cologne
Posts: 638
|
Quote:
Quote:
But to come back to facts. I can join them with DOS, I can add the result with mp4box and everything plays fine. No stuttering. But I cannot join "Main movie" and "Credits" with mp4box.
__________________
cu Joe ------------------------ freedom is just another word for nothing left to loose |
||
28th April 2005, 20:17 | #20 | Link | |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
did you make a bug report on sourceforge at least already?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|