Kiến Thức Chung

HowTo split/concatenate MP4 files with MP4Box [Archive]

View Full Version : HowTo split/concatenate MP4 files with MP4Box

bond

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:
MP4Box -splits 716800 input.mp4
concatenating

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:
MP4Box -cat file1.mp4 -cat file2.mp4 output.mp4
both cat and split should work with all streams supported in MP4Box, like ASP, AVC, AAC, MPEG-1/2 Audio and Video (eg MP3), TTXT and even on Vobsubs and ALAC (apple’s lossless audio codec using in itunes) and the chapters should be edited too

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 (http://www.aziendeassociate.it/cd.asp?dir=/gpac/dev) (compiled by celtic_druid)

Selur

cool, I’ve been waiting for this. ?

Cu Selur

virus

Originally posted by bond
eg if you want to split a 1400mb MP4 file into two parts a 700mb you can use the following cmdl:
MP4Box -splits 700000 input.mp4

I’d say that 716800 (700 * 1024 KB) would be better here… ?

JoeBG

Originally posted by Selur
cool, I’ve been waiting for this. ?

Cu Selur

This is the answer to many user questions. Hope mezzanine will add this to his gui!!!

Selur

does anyone know if a frame accurate split is planed?

Doom9

does anyone know if a frame accurate split is planed?Considering that frame accurate means GOP re-encoding I have very strong doubts that’s ever going to happen. mp4box, and the whole gpac framework is not at all about video encoding.

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.

JoeBG

Originally posted by bond
[B] MP4Box -cat file1.mp4 -cat file2.mp4 output.mp4

Does not work for me. I tried (AVC-videos only):

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

bond

Originally posted by JoeBG
Does not work for me. I tried (AVC-videos only):

mp4box -cat Film.mp4 -cat Credits.mp4 Total.mp4
Total.mp4 only includes “Film.mp4”
hm, try mp4box -cat Film.mp4 -cat Credits.mp4 -new Total.mp4

JoeBG

Originally posted by bond
hm, try mp4box -cat Film.mp4 -cat Credits.mp4 -new Total.mp4

Edit:
Same output, just Film.mp4 is in Total.mp4

Here is the log:

D:TestvideoTest2>”C:ProgrammeDVD Toolsmpeg4GPacmp4box.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

JoeBG

@ bond

I´m testing all possible combinations since hours, but it does not work for me ?

bond

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

Selur

“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,..

JoeBG

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?

bond

Originally posted by JoeBG
Do you really need it upped somewhere? [/B] no, but than i have no idea whats wrong ?
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…

Doom9

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?

SeeMoreDigital

Originally posted by JoeBG
This is the answer to many user questions. Hope mezzanine will add this to his gui!!! Indeed… If Mezzanine was able to follow mpucoder’s MuxMan style of GUI, you may like to know that mpucoder made a provision for appending too!

My thanks to everybody… It looks like their are some exciting times ahead for the .MP4 container ?

Cheers

JoeBG

Originally posted by bond
no, but than i have no idea whats wrong ?
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…

No, definitly not. I just choosed the same resolution and the same resize parameters, but apart of this the other settings differ. You know one is the Credit, the other is the main movie => they must have other settings ?

@ doom9

It is AVC, so you might be right with analysing the problem. ?

Doom9

I just choosed the same resolution and the same resize parameters, but apart of this the other settings differ.Then even if the merge would work, your result would not be playable properly. That’s why I changed my separate credits jobs to use the 2pass parameters and just change the encoding mode to quantizer based and set the credits quantizer.. the rest of the settings is the same. aku listed a bunch of options that must match for a merge to be successful.. if you violate any of those, all bets are off and I had to find out the hard way that those details do matter.

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.

JoeBG

Originally posted by Doom9
Then even if the merge would work, your result would not be playable properly. That’s why I changed my separate credits jobs to use the 2pass parameters and just change the encoding mode to quantizer based and set the credits quantizer.. the rest of the settings is the same. aku listed a bunch of options that must match for a merge to be successful.. if you violate any of those, all bets are off and I had to find out the hard way that those details do matter.

This helps a lot for understanding, thank you very much ?

Originally posted by Doom9
Why are you not using MeGUI by the way?[/B]

I used MeGUI for creating the samples. You know I love your tool.

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.

bond

Originally posted by JoeBG
But I cannot join “Main movie” and “Credits” with mp4box. [/B]well i doubt anyone can really help without getting the samples and not just guess around…

did you make a bug report on sourceforge at least already?

DeeGee

I have the same problem. When trying to make 2cd sized AVC/HE-AAC rip of a movie, I forgot the 2×700 option on nero recode… but changed the bitrate myself to fit the audio streams in (which I compressed separatly). So I ended up with one ~700MB .mp4 and another ~460MB. As the files should be identical in compressiong settings I imagined that this should fix it, but no. The streams end up being two different avc streams. Same seems to happen even when the streams are extracted into raw .h264.

[edit] Sample 1 (koti.mbnet.fi/deegee/spiderman_sample1.mp4) 2 (koti.mbnet.fi/deegee/spiderman_sample2.mp4)

29.04.2005 20:11 724 805 950 spiderman.mp4
30.04.2005 03:25 486 222 411 spiderman_cut(1).mp4

D:DVDSPIDERMANVIDEO_TS>mp4box -cat spiderman.mp4 -cat “spiderman_cut(1).mp4”
spiderman_movie.mp4
WARNING: Track ID 1 (type odsm) not handled by concatenation – removing from des
tination
WARNING: Track ID 2 (type sdsm) not handled by concatenation – removing from des
tination
Appending file spiderman.mp4
No suitable destination track found – creating new one (type vide)
WARNING: Track ID 1 (type odsm) not handled by concatenation – removing from des
tination
WARNING: Track ID 2 (type sdsm) not handled by concatenation – removing from des
tination
Appending file spiderman_cut(1).mp4
No suitable destination track found – creating new one (type vide)
Saving to spiderman_movie.mp4: 0.500 secs Interleaving

D:DVDSPIDERMANVIDEO_TS>mp4box -cat spiderman_track3.h264 -cat “spiderman_cut(
1)_track3.h264″ spiderman_video.mp4
AVC-H264 import – frame size 720 x 544 at 25.000 FPS
Adjusting AVC SizeLength to 16 bits
Import results: 97513 samples – Slices: 1295 I 47631 P 48587 B – 1 SEI – 1295 ID
R
Appending file spiderman_track3.h264
No suitable destination track found – creating new one (type vide)
AVC-H264 import – frame size 720 x 544 at 25.000 FPS
Adjusting AVC SizeLength to 16 bits
Import results: 76857 samples – Slices: 1003 I 36383 P 39471 B – 0 SEI – 1003 ID
R
Appending file spiderman_cut(1)_track3.h264
No suitable destination track found – creating new one (type vide)
Saving to spiderman_video.mp4: 0.500 secs Interleaving

Xem thêm:   Hướng dẫn nạp tiền vào MoMo và rút tiền về tài khoản

Xem thêm :  2021 Beauty Industry Trends & Cosmetics Marketing: Statistics and Strategies for Your Ecommerce Growth

D:DVDSPIDERMANVIDEO_TS>mp4info spiderman_movie.mp4
mp4info version 1.2.18
spiderman_movie.mp4:
Track Type Info
3 video H264 [email protected], 3900.520 secs, 1485 kbps, 720×544 @ 25.000000 fps
1 video H264 [email protected], 3074.280 secs, 1263 kbps, 720×544 @ 25.000000 fps

D:DVDSPIDERMANVIDEO_TS>mp4info spiderman_video.mp4
mp4info version 1.2.18
spiderman_video.mp4:
Track Type Info
1 video H264 [email protected], 3900.520 secs, 1484 kbps, 720×544 @ 25.000000 fps
2 video H264 [email protected], 3074.280 secs, 1263 kbps, 720×544 @ 25.000000 fps

bond

Originally posted by DeeGee
Sample 1 (koti.mbnet.fi/deegee/spiderman_sample1.mp4) 2 (koti.mbnet.fi/deegee/spiderman_sample2.mp4) the two indeed seem to be identical featurewise

i filed a bug report on mp4box here (http://sourceforge.net/tracker/index.php?func=detail&aid=1172028&group_id=84101&atid=571741)

would be great if you can keep the files uploaded until it get fixed

DeeGee

Ok, shouldn’t be a problem.

JoeBG

Originally posted by bond

i filed a bug report on mp4box here (http://sourceforge.net/tracker/index.php?func=detail&aid=1172028&group_id=84101&atid=571741)

Maybe this also helps for my Credits-Problem

3ngel

Hi to all,
i’m trying to extract a portion from an .mp4 file in seconds according to the latest version of mp4box with the parameter sec:sec, that is i want an .mp4 containing from ex. 1230sec to 1400.
But all i obtain is a very long number of small .mp4 files (few Kbs), instead of one (shorter) .mp4.
What’s the problem? The .mp4 has been done with nero ASP.
Thank you.

bond

Originally posted by 3ngel
Hi to all,
i’m trying to extract a portion from an .mp4 file in seconds according to the latest version of mp4box with the parameter sec:sec, that is i want an .mp4 containing from ex. 1230sec to 1400.
But all i obtain is a very long number of small .mp4 files (few Kbs), instead of one (shorter) .mp4.
What’s the problem? The .mp4 has been done with nero ASP.
Thank you. are you sure that you used the switch -splitx with X at the end?

3ngel

This is the command line:

MP4Box.exe -splitx 1230:1330 “Test.mp4” -out “Split.mp4”

Or this:

MP4Box.exe -splitx 1230:1330 “Test.mp4”

same result.

bond

Originally posted by 3ngel
Hi to all,
i’m trying to extract a portion from an .mp4 file in seconds according to the latest version of mp4box with the parameter sec:sec, that is i want an .mp4 containing from ex. 1230sec to 1400.
But all i obtain is a very long number of small .mp4 files (few Kbs), instead of one (shorter) .mp4.
What’s the problem? The .mp4 has been done with nero ASP.
Thank you. indeed, i could reproduce this too now. strange i once tested it and it worked fine :confused:

meh, seems this option still has some flaws, propably thats why jeanlf warned me “as anything brand new, this might be buggy…” ?

3ngel

I’m glad you was able to reproduce it.
I’m waiting for the fix ?

Kurtnoise

This bug has been solved or not ? coz I found a way to create a video preview for this trick.

bond

Originally posted by Kurtnoise13
This bug has been solved or not ? coz I found a way to create a video preview for this trick. i am not sure, as on some samples it worked and on one it didnt, so the option is at least not stable

regarding your preview: so its possible to cut parts while looking at the video itself?

Kurtnoise

Originally posted by bond
regarding your preview: so its possible to cut parts while looking at the video itself?
if you think about the same thing as Vdub…I must say yes. ?

btw, the bug doesn’t seems to be fix. I just checked the svn and there is nothing new…

bond

Originally posted by Kurtnoise13
if you think about the same thing as Vdub…I must say yes. ?

btw, the bug doesn’t seems to be fix. I just checked the svn and there is nothing new… geat stuff, but well actually for testing it in your gui mp4box doesnt need to support it, as it we can simply check the cmdl outputted too ?

bond

ok the concatenating problem of avc .mp4 should be fixed now!
joebg and deegee, can you guys plz test if this works fine now on your samples!?

also the extracting of parts via the -splitx option should work now as it should!
cant wait for kurt to implement it into yamb ?

as always get the latest compile here (http://www.aziendeassociate.it/cd.asp?dir=/gpac/dev)

Kurtnoise

Originally posted by bond
also the extracting of parts via the -splitx option should work now as it should!
cant wait for kurt to implement it into yamb ?
-splitx command is already included in Yamb… but if you talking about the preview, yeah it will be great. I tested on 3 different PCs, and it crashes unfortunately. I need much more time to find the bug…But if a good dev could be create a MP4dec library (in the same way as MPEG2Dec), it will be more powerful I think. Maybe –h ?? ?

bond

what about a stripped down libavcodec only decoding mpeg-4?

JoeBG

Originally posted by bond
ok the concatenating problem of avc .mp4 should be fixed now!
joebg and deegee, can you guys plz test if this works fine now on your samples!?

also the extracting of parts via the -splitx option should work now as it should!
cant wait for kurt to implement it into yamb ?

as always get the latest compile here (http://www.aziendeassociate.it/cd.asp?dir=/gpac/dev)

I testet yesterday with the compile from yesterday and it didn´t work. I go home now and will test it with the compile from today.

Kurtnoise

Originally posted by bond
what about a stripped down libavcodec only decoding mpeg-4?
decoding is not enough…I need to open the file. btw, I’ll check out the functions in libavcodec. Thanks to point me out this idea. For the moment I use the dshow filters to render the file. Like I said, I need much more time. All in all, I prefer to fix the different bugs for the moment. ?

@JoeB : it works here with the last compile…:)

JoeBG

it works. It definitly works for main movie and Credits. Avisynthskripts are equal (trimm commands differ) and the commandline are equal, but Credits commandline has –qp 40 instead of –bitrate. Should be the same with MeGUI. Doom9 is planing to add x264cli support to MeGui and therefore this should be very important. There is no need anymore for *.264 output ?

Edit:

Made a new test with -cat, -add and -chap combined with new in one commandline and it works great too. Makes things really easier now ?

DeeGee

Yep, seems to work now. Unfortunatly I deleted the whole files… so i did it on the samples only.

zwommie

Hi,

indeed the AVC concat problem is solved with latest build from here (http://www.aziendeassociate.it/cd.asp?dir=/gpac/dev)

A little addition to the use of -cat : if u add the track ID after the MP4-files, you avoid the objectdescriptor and scenedescription not being recognized warnings, not that it matters ;).
So, this should do the trick :

mp4box -cat part1.mp4#3 -cat part2.mp4#3 output.mp4

Btw, anyone also problems using Osmo4 in that 0.3.0 build? I get application error when i start playing mp4-files that used to play ?
Why is this allready 0.3.0 anyway, i suppose it will be announced at GPAC site soon?

snappybane

I’m having quite a big of a problem joining two mp4 files, here’s the information for each of the parts:

* Movie Info *
Timescale 600 – Duration 01:32:10.453
Fragmented File no – 2 track(s)
File Brand isom – version 1
Created: GMT Fri Apr 20 14:58:26 2007

File has root IOD
Scene PL 0xff – Graphics PL 0xff – OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: AAC Profile @ Level 2 (0x29)
No streams included in root OD

Track # 1 Info – TrackID 1 – TimeScale 25 – Duration 01:32:10.440
Media Info: Language “Undetermined” – Type “vide:avc1” – 138261 samples
MPEG-4 Config: Visual Stream – ObjectTypeIndication 0x21
AVC/H264 Video – Visual Size 640 x 480 – Profile High @ Level 5.1
NAL Unit length bits: 32
Self-synchronized

Track # 2 Info – TrackID 2 – TimeScale 48000 – Duration 01:32:10.453
Media Info: Language “English” – Type “soun:mp4a” – 259240 samples
MPEG-4 Config: Audio Stream – ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC – 2 Channel(s) – SampleRate 48000
Synchronized on stream 1

And for the second part:

* Movie Info *
Timescale 600 – Duration 01:19:59.320
Fragmented File no – 2 track(s)
File Brand isom – version 1
Created: GMT Sun Apr 22 00:24:55 2007

File has root IOD
Scene PL 0xff – Graphics PL 0xff – OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: AAC Profile @ Level 2 (0x29)
No streams included in root OD

Track # 1 Info – TrackID 1 – TimeScale 25 – Duration 01:19:59.320
Media Info: Language “Undetermined” – Type “vide:avc1” – 119983 samples
MPEG-4 Config: Visual Stream – ObjectTypeIndication 0x21
AVC/H264 Video – Visual Size 640 x 480 – Profile High @ Level 5.1
NAL Unit length bits: 32
Self-synchronized

Track # 2 Info – TrackID 2 – TimeScale 48000 – Duration 01:19:59.317
Media Info: Language “English” – Type “soun:mp4a” – 224968 samples
MPEG-4 Config: Audio Stream – ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC – 2 Channel(s) – SampleRate 48000
Synchronized on stream 1

So everything seems to be in order, but when I join them with -cat, I end up with two ‘parallel’ (when looking in MPC) video tracks and it returns this information:

* Movie Info *
Timescale 600 – Duration 02:52:09.770
Fragmented File no – 3 track(s)
File Brand isom – version 1
Created: GMT Fri Apr 27 18:48:20 2007

File has root IOD
Scene PL 0xff – Graphics PL 0xff – OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: AAC Profile @ Level 2 (0x29)
No streams included in root OD

Track # 1 Info – TrackID 1 – TimeScale 25 – Duration 01:32:10.440
Media Info: Language “Undetermined” – Type “vide:avc1” – 138261 samples
MPEG-4 Config: Visual Stream – ObjectTypeIndication 0x21
AVC/H264 Video – Visual Size 640 x 480 – Profile High @ Level 5.1
NAL Unit length bits: 32
Self-synchronized

Xem thêm:   Cách làm thẻ Atm online miễn phí

Xem thêm :  Người việt khôn lỏi là gì

Track # 2 Info – TrackID 2 – TimeScale 48000 – Duration 02:52:09.770
Media Info: Language “English” – Type “soun:mp4a” – 484208 samples
MPEG-4 Config: Audio Stream – ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC – 2 Channel(s) – SampleRate 48000
Synchronized on stream 1

Track # 3 Info – TrackID 3 – TimeScale 25 – Duration 01:19:59.320
Media Info: Language “Undetermined” – Type “vide:avc1” – 119983 samples
MPEG-4 Config: Visual Stream – ObjectTypeIndication 0x21
AVC/H264 Video – Visual Size 640 x 480 – Profile High @ Level 5.1
NAL Unit length bits: 32
Synchronized on stream 1

I’ve tried extracting the raw video streams, then join those, and I still end up with two video tracks. How do I fix this?

Kurtnoise

What’s exactly your command line you use ?

snappybane

MP4Box.exe -cat “MD-11 Part 1.mp4” -cat “MD-11 Part 2.mp4” -new “MD-11.mp4”

And nothing else.

Oh btw. I’m using your latest compile (well I believe so):

MP4Box – GPAC version 0.4.3-DEV – compiled by Kurtnoise – Apr 23 2007
GPAC Copyright: (c) Jean Le Feuvre 2000-2005
(c) ENST 2005-200X

Kurtnoise

Strange…I cannot reproduce this here.

Did you use the Haali Splitter or the Gabest’s one to play your file ?

snappybane

I’m using Gabest. The information you see, is from ‘Yamb’, which presumeably is ‘just’ using some kind of mp4box command?

Reading the help, it seems that mp4box decides when it wants to create a new track, what could trigger such decision?

bond

I’ve tried extracting the raw video streams, then join those, and I still end up with two video tracks. How do I fix this?normally you can only cat two video streams using the same encoding features. theoretically its also possible to cat two avc video streams if the sps in each part have different ids, but i dont know yet any tool that lets you change the ids and i dont know whether players would be able to play such a stream

either way you could run h264_parse from mpeg4ip over the two parts extracted to raw .264 streams and post the output here. that way we can check where the differences between the two streams are

snappybane

either way you could run h264_parse from mpeg4ip over the two parts extracted to raw .264 streams and post the output here. that way we can check where the differences between the two streams are

Thanks for the tip, I gave it a shot, and ended up with a 30MB big text file ? – is there any specific part I should post?

bond

Thanks for the tip, I gave it a shot, and ended up with a 30MB big text file ? – is there any specific part I should post?the start of the file: sequence and picture paramter set

snappybane

Alright here are the two parts:

Part one:
h264_parse.exe – mpeg4ip version 1.5.11
Nal length 27 start code 4 bytes
ref 3 type 7 Sequence parameter set
profile: 100
constaint_set0_flag: 0
constaint_set1_flag: 0
constaint_set2_flag: 0
constaint_set3_flag: 0
level_idc: 51
seq parameter set id: 0
chroma format idx: 1
bit depth luma minus8: 0
bit depth chroma minus8: 0
Qpprime Y Zero Transform Bypass flag: 0
Seq Scaling Matrix Present Flag: 0
log2_max_frame_num_minus4: 5
pic_order_cnt_type: 0
log2_max_pic_order_cnt_lsb_minus4: 6
num_ref_frames: 6
gaps_in_frame_num_value_allowed_flag: 0
pic_width_in_mbs_minus1: 39 (640)
pic_height_in_map_minus1: 29
frame_mbs_only_flag: 1
derived height: 480
direct_8x8_inference_flag: 1
frame_cropping_flag: 0
vui_parameters_present_flag: 1
aspect_ratio_info_present_flag: 0
overscan_info_present_flag: 0
video_signal_info_present_flag: 0
chroma_loc_info_present_flag: 0
timing_info_present_flag: 1
num_units_in_tick: 1
time_scale: 50
fixed_frame_scale: 1
nal_hrd_parameters_present_flag: 0
vcl_hrd_parameters_present_flag: 0
pic_struct_present_flag: 0
motion_vectors_over_pic_boundaries_flag: 1
max_bytes_per_pic_denom: 0
max_bits_per_mb_denom: 0
log2_max_mv_length_horizontal: 11
log2_max_mv_length_vertical: 11
num_reorder_frames: 2
max_dec_frame_buffering: 6
Nal length 8 start code 4 bytes
ref 3 type 8 Picture parameter set
pic_parameter_set_id: 0
seq_parameter_set_id: 0
entropy_coding_mode_flag: 1
pic_order_present_flag: 0
num_slice_groups_minus1: 0
num_ref_idx_l0_active_minus1: 0
num_ref_idx_l1_active_minus1: 0
weighted_pred_flag: 0
weighted_bipred_idc: 2
pic_init_qp_minus26: 0
pic_init_qs_minus26: 0
chroma_qp_index_offset: 0
deblocking_filter_control_present_flag: 1
constrained_intra_pred_flag: 0
redundant_pic_cnt_present_flag: 0
transform_8x8_mode_flag: 1
pic_scaling_matrix_present_flag: 0
second_chroma_qp_index_offset: 0

And for part two:
h264_parse.exe – mpeg4ip version 1.5.11
Nal length 27 start code 4 bytes
ref 3 type 7 Sequence parameter set
profile: 100
constaint_set0_flag: 0
constaint_set1_flag: 0
constaint_set2_flag: 0
constaint_set3_flag: 0
level_idc: 51
seq parameter set id: 0
chroma format idx: 1
bit depth luma minus8: 0
bit depth chroma minus8: 0
Qpprime Y Zero Transform Bypass flag: 0
Seq Scaling Matrix Present Flag: 0
log2_max_frame_num_minus4: 5
pic_order_cnt_type: 0
log2_max_pic_order_cnt_lsb_minus4: 6
num_ref_frames: 6
gaps_in_frame_num_value_allowed_flag: 0
pic_width_in_mbs_minus1: 39 (640)
pic_height_in_map_minus1: 29
frame_mbs_only_flag: 1
derived height: 480
direct_8x8_inference_flag: 1
frame_cropping_flag: 0
vui_parameters_present_flag: 1
aspect_ratio_info_present_flag: 0
overscan_info_present_flag: 0
video_signal_info_present_flag: 0
chroma_loc_info_present_flag: 0
timing_info_present_flag: 1
num_units_in_tick: 1
time_scale: 50
fixed_frame_scale: 1
nal_hrd_parameters_present_flag: 0
vcl_hrd_parameters_present_flag: 0
pic_struct_present_flag: 0
motion_vectors_over_pic_boundaries_flag: 1
max_bytes_per_pic_denom: 0
max_bits_per_mb_denom: 0
log2_max_mv_length_horizontal: 11
log2_max_mv_length_vertical: 11
num_reorder_frames: 2
max_dec_frame_buffering: 6
Nal length 135 start code 4 bytes
ref 3 type 8 Picture parameter set
pic_parameter_set_id: 0
seq_parameter_set_id: 0
entropy_coding_mode_flag: 1
pic_order_present_flag: 0
num_slice_groups_minus1: 0
num_ref_idx_l0_active_minus1: 0
num_ref_idx_l1_active_minus1: 0
weighted_pred_flag: 0
weighted_bipred_idc: 2
pic_init_qp_minus26: 0
pic_init_qs_minus26: 0
chroma_qp_index_offset: 0
deblocking_filter_control_present_flag: 1
constrained_intra_pred_flag: 0
redundant_pic_cnt_present_flag: 0
transform_8x8_mode_flag: 1
pic_scaling_matrix_present_flag: 1
Pic Scaling List[0] Present Flag: 1
delta: 0
scaling list[0][0]: 8
delta: 14
scaling list[0][1]: 22
delta: 0
scaling list[0][2]: 22
delta: 10
scaling list[0][3]: 32
delta: 16
scaling list[0][4]: 48
delta: -16
scaling list[0][5]: 32
delta: 15
scaling list[0][6]: 47
delta: 8
scaling list[0][7]: 55
delta: 0
scaling list[0][8]: 55
delta: -8
scaling list[0][9]: 47
delta: 10
scaling list[0][10]: 57
delta: 6
scaling list[0][11]: 63
delta: -6
scaling list[0][12]: 57
delta: 12
scaling list[0][13]: 69
delta: 0
scaling list[0][14]: 69
delta: 15
scaling list[0][15]: 84
Pic Scaling List[1] Present Flag: 1
delta: 8
scaling list[1][0]: 16
delta: 4
scaling list[1][1]: 20
delta: 0
scaling list[1][2]: 20
delta: 14
scaling list[1][3]: 34
delta: 6
scaling list[1][4]: 40
delta: -6
scaling list[1][5]: 34
delta: 30
scaling list[1][6]: 64
delta: -2
scaling list[1][7]: 62
delta: 0
scaling list[1][8]: 62
delta: 2
scaling list[1][9]: 64
delta: 14
scaling list[1][10]: 78
delta: 20
scaling list[1][11]: 98
delta: -20
scaling list[1][12]: 78
delta: 60
scaling list[1][13]: 138
delta: 0
scaling list[1][14]: 138
delta: 30
scaling list[1][15]: 168
Pic Scaling List[2] Present Flag: 0
Pic Scaling List[3] Present Flag: 1
delta: 4
scaling list[3][0]: 12
delta: 16
scaling list[3][1]: 28
delta: 0
scaling list[3][2]: 28
delta: 0
scaling list[3][3]: 28
delta: 4
scaling list[3][4]: 32
delta: -4
scaling list[3][5]: 28
delta: 4
scaling list[3][6]: 32
delta: 3
scaling list[3][7]: 35
delta: 0
scaling list[3][8]: 35
delta: -3
scaling list[3][9]: 32
delta: 6
scaling list[3][10]: 38
delta: 4
scaling list[3][11]: 42
delta: -4
scaling list[3][12]: 38
delta: 8
scaling list[3][13]: 46
delta: 0
scaling list[3][14]: 46
delta: 9
scaling list[3][15]: 55
Pic Scaling List[4] Present Flag: 1
delta: 10
scaling list[4][0]: 18
delta: 6
scaling list[4][1]: 24
delta: 0
scaling list[4][2]: 24
delta: 10
scaling list[4][3]: 34
delta: 6
scaling list[4][4]: 40
delta: -6
scaling list[4][5]: 34
delta: 7
scaling list[4][6]: 41
delta: 7
scaling list[4][7]: 48
delta: 0
scaling list[4][8]: 48
delta: -7
scaling list[4][9]: 41
delta: 15
scaling list[4][10]: 56
delta: 8
scaling list[4][11]: 64
delta: -8
scaling list[4][12]: 56
delta: 36
scaling list[4][13]: 92
delta: 0
scaling list[4][14]: 92
delta: 18
scaling list[4][15]: 110
Pic Scaling List[5] Present Flag: 0
Pic Scaling List[6] Present Flag: 1
delta: 0
scaling list[6][0]: 8
delta: 3
scaling list[6][1]: 11
delta: 1
scaling list[6][2]: 12
delta: 2
scaling list[6][3]: 14
delta: -1
scaling list[6][4]: 13
delta: -3
scaling list[6][5]: 10
delta: 6
scaling list[6][6]: 16
delta: -2
scaling list[6][7]: 14
delta: -1
scaling list[6][8]: 13
delta: 1
scaling list[6][9]: 14
delta: 4
scaling list[6][10]: 18
delta: -1
scaling list[6][11]: 17
delta: -1
scaling list[6][12]: 16
delta: 3
scaling list[6][13]: 19
delta: 5
scaling list[6][14]: 24
delta: 4
scaling list[6][15]: 28
delta: -2
scaling list[6][16]: 26
delta: -2
scaling list[6][17]: 24
delta: -2
scaling list[6][18]: 22
delta: 0
scaling list[6][19]: 22
delta: 2
scaling list[6][20]: 24
delta: 5
scaling list[6][21]: 29
delta: -2
scaling list[6][22]: 27
delta: 1
scaling list[6][23]: 28
delta: 2
scaling list[6][24]: 30
delta: -2
scaling list[6][25]: 28
delta: -1
scaling list[6][26]: 27
delta: 2
scaling list[6][27]: 29
delta: 3
scaling list[6][28]: 32
delta: -3
scaling list[6][29]: 29
delta: 0
scaling list[6][30]: 29
delta: 3
scaling list[6][31]: 32
delta: 0
scaling list[6][32]: 32
delta: -3
scaling list[6][33]: 29
delta: 0
scaling list[6][34]: 29
delta: 3
scaling list[6][35]: 32
delta: 1
scaling list[6][36]: 33
delta: -1
scaling list[6][37]: 32
delta: 2
scaling list[6][38]: 34
delta: 3
scaling list[6][39]: 37
delta: -3
scaling list[6][40]: 34
delta: -2
scaling list[6][41]: 32
delta: 1
scaling list[6][42]: 33
delta: 2
scaling list[6][43]: 35
delta: 3
scaling list[6][44]: 38
delta: 4
scaling list[6][45]: 42
delta: 0
scaling list[6][46]: 42
delta: -4
scaling list[6][47]: 38
delta: -3
scaling list[6][48]: 35
delta: 4
scaling list[6][49]: 39
delta: 6
scaling list[6][50]: 45
delta: 4
scaling list[6][51]: 49
delta: -4
scaling list[6][52]: 45
delta: -6
scaling list[6][53]: 39
delta: 8
scaling list[6][54]: 47
delta: 8
scaling list[6][55]: 55
delta: 0
scaling list[6][56]: 55
delta: -8
scaling list[6][57]: 47
delta: 10
scaling list[6][58]: 57
delta: 6
scaling list[6][59]: 63
delta: -6
scaling list[6][60]: 57
delta: 12
scaling list[6][61]: 69
delta: 0
scaling list[6][62]: 69
delta: 15
scaling list[6][63]: 84
Pic Scaling List[7] Present Flag: 1
delta: 5
scaling list[7][0]: 13
delta: 1
scaling list[7][1]: 14
delta: 0
scaling list[7][2]: 14
delta: 2
scaling list[7][3]: 16
delta: -1
scaling list[7][4]: 15
delta: 1
scaling list[7][5]: 16
delta: 2
scaling list[7][6]: 18
delta: 0
scaling list[7][7]: 18
delta: 0
scaling list[7][8]: 18
delta: 0
scaling list[7][9]: 18
delta: 2
scaling list[7][10]: 20
delta: -1
scaling list[7][11]: 19
delta: 1
scaling list[7][12]: 20
delta: -1
scaling list[7][13]: 19
delta: 1
scaling list[7][14]: 20
delta: 1
scaling list[7][15]: 21
delta: -1
scaling list[7][16]: 20
delta: 1
scaling list[7][17]: 21
delta: 0
scaling list[7][18]: 21
delta: -1
scaling list[7][19]: 20
delta: 1
scaling list[7][20]: 21
delta: 1
scaling list[7][21]: 22
delta: -1
scaling list[7][22]: 21
delta: 1
scaling list[7][23]: 22
delta: 1
scaling list[7][24]: 23
delta: -1
scaling list[7][25]: 22
delta: -1
scaling list[7][26]: 21
delta: 1
scaling list[7][27]: 22
delta: 2
scaling list[7][28]: 24
delta: -2
scaling list[7][29]: 22
delta: 1
scaling list[7][30]: 23
delta: 2
scaling list[7][31]: 25
delta: 0
scaling list[7][32]: 25
delta: -2
scaling list[7][33]: 23
delta: -1
scaling list[7][34]: 22
delta: 2
scaling list[7][35]: 24
delta: 1
scaling list[7][36]: 25
delta: 0
scaling list[7][37]: 25
delta: 1
scaling list[7][38]: 26
delta: 2
scaling list[7][39]: 28
delta: -2
scaling list[7][40]: 26
delta: -1
scaling list[7][41]: 25
delta: 0
scaling list[7][42]: 25
delta: 2
scaling list[7][43]: 27
delta: 2
scaling list[7][44]: 29
delta: 2
scaling list[7][45]: 31
delta: 0
scaling list[7][46]: 31
delta: -2
scaling list[7][47]: 29
delta: -2
scaling list[7][48]: 27
delta: 4
scaling list[7][49]: 31
delta: 4
scaling list[7][50]: 35
delta: 2
scaling list[7][51]: 37
delta: -2
scaling list[7][52]: 35
delta: -4
scaling list[7][53]: 31
delta: 7
scaling list[7][54]: 38
delta: 4
scaling list[7][55]: 42
delta: 0
scaling list[7][56]: 42
delta: -4
scaling list[7][57]: 38
delta: 10
scaling list[7][58]: 48
delta: 3
scaling list[7][59]: 51
delta: -3
scaling list[7][60]: 48
delta: 13
scaling list[7][61]: 61
delta: 0
scaling list[7][62]: 61
delta: 15
scaling list[7][63]: 76
second_chroma_qp_index_offset: 0

bond

one stream uses cqm and one doesnt.

as i said before you theoretically can merge them by using different ids, but i dont know if this practically possible (would be interesting to test tough)

Xem thêm:   Top 10 ngân hàng qua lăng kính người dùng cá nhân

Xem thêm :  Tham khảo ngay top 100 + ảnh đẹp nhất ngầu nhất connan shinichi

snappybane

Oh darn. Thanks for the help and clarification.

One last question, is ‘pic_scaling_matrix_present_flag’ the one you use to determine whether or not there have been used a CQM?

Anyway, I’m up for the test if one can direct me what to do :).

bond

One last question, is ‘pic_scaling_matrix_present_flag’ the one you use to determine whether or not there have been used a CQM?yes

Anyway, I’m up for the test if one can direct me what to do :). try to get a hexeditor and change the pic_parameter_set_id and seq_parameter_set_id flags to some unique numbers and try to cat the resulting streams again with mp4box

JohnPeterson

when I join them with -cat, I end up with two ‘parallel’ (when looking in MPC) video tracks

I seem to get a similar problem with these files:

Version

mp4box -version
MP4Box – GPAC version 0.4.6-DEV (build 1)
Compilation Date: Oct 13 2009 – by Kurtnoise
GPAC Copyright: (c) Jean Le Feuvre 2000-2005
(c) ENST 2005-200X
GPAC Configuration: –use-js=no
Features: GPAC_HAS_JPEG GPAC_HAS_PNG

File links

http://www.dailymotion.com/video/x81m3m_heather-locklear-first-appearance-p_fun
http://www.dailymotion.com/video/x81m5m_heather-locklear-first-appearance-p_fun

File info

mp4box -info Part1.mp4
* Movie Info *
Timescale 90000 – Duration 00:14:00.600
Fragmented File no – 2 track(s)
File Brand mp42 – version 0
Created: GMT Sat Jan 17 04:40:22 2009

File has root IOD
Scene PL 0xff – Graphics PL 0xff – OD PL 0xff
Visual PL: ISO Reserved Profile (0x7f)
Audio PL: High Quality Audio Profile @ Level 2 (0x0f)
No streams included in root OD

iTunes Info:
Encoder Software: edge 1.5.4

Track # 1 Info – TrackID 2 – TimeScale 44100 – Duration 00:14:00.539
Media Info: Language “Undetermined” – Type “soun:mp4a” – 36199 samples
MPEG-4 Config: Audio Stream – ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC – 2 Channel(s) – SampleRate 44100
Self-synchronized

Track # 2 Info – TrackID 1 – TimeScale 90000 – Duration 00:14:00.600
Media Info: Language “Undetermined” – Type “vide:avc1” – 21015 samples
MPEG-4 Config: Visual Stream – ObjectTypeIndication 0x21
AVC/H264 Video – Visual Size 512 x 384 – Profile Baseline @ Level 3
NAL Unit length bits: 32
Pixel Aspect Ratio 1:1 – Indicated track size 512 x 384
Synchronized on stream 2

mp4box -info Part2.mp4
* Movie Info *
Timescale 90000 – Duration 00:14:04.233
Fragmented File no – 2 track(s)
File Brand mp42 – version 0
Created: GMT Sat Jan 17 04:53:13 2009

File has root IOD
Scene PL 0xff – Graphics PL 0xff – OD PL 0xff
Visual PL: ISO Reserved Profile (0x7f)
Audio PL: High Quality Audio Profile @ Level 2 (0x0f)
No streams included in root OD

iTunes Info:
Encoder Software: edge 1.5.4

Track # 1 Info – TrackID 2 – TimeScale 44100 – Duration 00:14:04.207
Media Info: Language “Undetermined” – Type “soun:mp4a” – 36357 samples
MPEG-4 Config: Audio Stream – ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC – 2 Channel(s) – SampleRate 44100
Self-synchronized

Track # 2 Info – TrackID 1 – TimeScale 90000 – Duration 00:14:04.233
Media Info: Language “Undetermined” – Type “vide:avc1” – 25327 samples
MPEG-4 Config: Visual Stream – ObjectTypeIndication 0x21
AVC/H264 Video – Visual Size 512 x 384 – Profile Baseline @ Level 3
NAL Unit length bits: 32
Pixel Aspect Ratio 1:1 – Indicated track size 512 x 384
Synchronized on stream 2

Concatenate

mp4box -add Part1.mp4#1:fps=25.000 -add Part1.mp4#2 -add Part2.mp4#1:fps=30.000 -add Part2.mp4#2 -new Joined.mp4

Joined file info

mp4box -info Joined.mp4
* Movie Info *
Timescale 600 – Duration 00:14:04.233
Fragmented File no – 4 track(s)
File Brand isom – version 1
Created: GMT Sat Mar 13 18:16:03 2010

File has root IOD
Scene PL 0xff – Graphics PL 0xff – OD PL 0xff
Visual PL: ISO Reserved Profile (0x7f)
Audio PL: AAC Profile @ Level 2 (0x29)
No streams included in root OD

Track # 1 Info – TrackID 1 – TimeScale 90000 – Duration 00:14:00.600
Media Info: Language “Undetermined” – Type “vide:avc1” – 21015 samples
MPEG-4 Config: Visual Stream – ObjectTypeIndication 0x21
AVC/H264 Video – Visual Size 512 x 384 – Profile Baseline @ Level 3
NAL Unit length bits: 32
Pixel Aspect Ratio 1:1 – Indicated track size 512 x 384
Self-synchronized

Track # 2 Info – TrackID 2 – TimeScale 44100 – Duration 00:14:00.539
Media Info: Language “Undetermined” – Type “soun:mp4a” – 36199 samples
MPEG-4 Config: Audio Stream – ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC – 2 Channel(s) – SampleRate 44100
Synchronized on stream 1

Track # 3 Info – TrackID 3 – TimeScale 90000 – Duration 00:14:04.233
Media Info: Language “Undetermined” – Type “vide:avc1” – 25327 samples
MPEG-4 Config: Visual Stream – ObjectTypeIndication 0x21
AVC/H264 Video – Visual Size 512 x 384 – Profile Baseline @ Level 3
NAL Unit length bits: 32
Pixel Aspect Ratio 1:1 – Indicated track size 512 x 384
Synchronized on stream 1

Track # 4 Info – TrackID 4 – TimeScale 44100 – Duration 00:14:04.207
Media Info: Language “Undetermined” – Type “soun:mp4a” – 36357 samples
MPEG-4 Config: Audio Stream – ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC – 2 Channel(s) – SampleRate 44100
Synchronized on stream 1

Problem

In this particular case when I play it in MPC-HC 1.2.908.0 I get a 14:04 length file (4 seconds more than Part1.mp4) and this error message:

The following pin(s)failed to find a connectable filter:

Joined.mp4::Output 3

Media Type 0:
————————–
Video: MPEG4 Video (H264) 512×384 30.00fps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {31637661-0000-0010-8000-00AA00389B71}
formattype: FORMAT_MPEG2_VIDEO {E06D80E3-DB46-11CF-B4D1-00805F6CBBEA}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 165

VIDEOINFOHEADER:
rcSource: (0,0)-(0,0)
rcTarget: (0,0)-(0,0)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 333346

VIDEOINFOHEADER2:
dwInterlaceFlags: 0x00000000
dwCopyProtectFlags: 0x00000000
dwPictAspectRatioX: 512
dwPictAspectRatioY: 384
dwControlFlags: 0x00000000
dwReserved2: 0x00000000

MPEG2VIDEOINFO:
dwStartTimeCode: 0
cbSequenceHeader: 33
dwProfile: 0x00000042
dwLevel: 0x0000001e
dwFlags: 0x00000004

BITMAPINFOHEADER:
biSize: 40
biWidth: 512
biHeight: 384
biPlanes: 1
biBitCount: 24
biCompression: avc1
biSizeImage: 0
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0

pbFormat:
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
0020: 00 00 00 00 00 00 00 00 22 16 05 00 00 00 00 00 ……..”…….
0030: 00 00 00 00 00 00 00 00 00 02 00 00 80 01 00 00 …………€…
0040: 00 00 00 00 00 00 00 00 28 00 00 00 00 02 00 00 ……..(…….
0050: 80 01 00 00 01 00 18 00 61 76 63 31 00 00 00 00 €…….avc1….
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
0070: 00 00 00 00 21 00 00 00 42 00 00 00 1e 00 00 00 ….!…B…….
0080: 04 00 00 00|00 19 67 42 c0 1e 9e 21 01 00 63 60 ……gBÀ.ž!..c`
0090: 22 00 00 03 00 02 00 00 03 00 79 1e 2c 5d 40 00 “………y.,]@.
00a0: 04 68 ce 3c 80 .hÎ<€

Media Type 1:
————————–
Video: MPEG4 Video (H264) 512×384 30.00fps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {31435641-0000-0010-8000-00AA00389B71}
formattype: FORMAT_MPEG2_VIDEO {E06D80E3-DB46-11CF-B4D1-00805F6CBBEA}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 165

VIDEOINFOHEADER:
rcSource: (0,0)-(0,0)
rcTarget: (0,0)-(0,0)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 333346

VIDEOINFOHEADER2:
dwInterlaceFlags: 0x00000000
dwCopyProtectFlags: 0x00000000
dwPictAspectRatioX: 512
dwPictAspectRatioY: 384
dwControlFlags: 0x00000000
dwReserved2: 0x00000000

MPEG2VIDEOINFO:
dwStartTimeCode: 0
cbSequenceHeader: 33
dwProfile: 0x00000042
dwLevel: 0x0000001e
dwFlags: 0x00000004

BITMAPINFOHEADER:
biSize: 40
biWidth: 512
biHeight: 384
biPlanes: 1
biBitCount: 24
biCompression: AVC1
biSizeImage: 0
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0

pbFormat:
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
0020: 00 00 00 00 00 00 00 00 22 16 05 00 00 00 00 00 ……..”…….
0030: 00 00 00 00 00 00 00 00 00 02 00 00 80 01 00 00 …………€…
0040: 00 00 00 00 00 00 00 00 28 00 00 00 00 02 00 00 ……..(…….
0050: 80 01 00 00 01 00 18 00 41 56 43 31 00 00 00 00 €…….AVC1….
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …………….
0070: 00 00 00 00 21 00 00 00 42 00 00 00 1e 00 00 00 ….!…B…….
0080: 04 00 00 00|00 19 67 42 c0 1e 9e 21 01 00 63 60 ……gBÀ.ž!..c`
0090: 22 00 00 03 00 02 00 00 03 00 79 1e 2c 5d 40 00 “………y.,]@.
00a0: 04 68 ce 3c 80 .hÎ<€

However with other mp4 files I simply get parallel video and audio streams without and decoding errors. But how do I place the streams after each other, instead of parallel to each other?

Solution?

try to get a hexeditor and change the pic_parameter_set_id and seq_parameter_set_id flags to some unique numbers and try to cat the resulting streams again with mp4box

I don’t understand that step. How do I cat the parsed raw streams in mp4box, after editing pic_parameter_set_id and seq_parameter_set_id?

UltraTV

I’m having some issues with concatenation using the following command line:

mp4box -add video1.264 -cat video2.264 -cat video3.264 -add audio1.aac -cat audio2.aac -cat audio3.aac -new muxed.mp4 -fps 24

The video and audio files concatenate correctly and in sync, but there are all sorts of motion artifacts and jerky playback after the first section of video. The video files are from the same main source file, split at commercial breaks for other formats, then need to be recombined for mp4’s. All the files are encoded using exactly the same parameters in x264.

x264:
–preset veryslow –tune animation –profile main –bitrate 1000 –level 3.1 –keyint 24 –no-mixed-refs –vbv-bufsize 5000 –vbv-maxrate 6000 –thread-input –sar 1:1

Any thoughts would be greatly appreciated.

Update: I found a workaround. Mux each segment of audio and video individually so there are 6 mp4’s: 3 video mp4’s and 3 audio mp4’s. Concatenate the video and audio separately so you’re left with 1 video and 1 audio mp4. Mux the remaining two tracks. Our engineers think it’s an issue with the start point in the elementary stream starting with the bytes 00 00 01. In any event it would be nice if mp4box could properly handle these types of situations, but I’m happy to have a workaround at least.

Xem thêm bài viết thuộc chuyên mục: Kiếm Tiền Online

Xem thêm bài viết thuộc chuyên mục: Kiến Thức Chung

Related Articles

Back to top button