View Full Version : Cutting and joining H264 AVC
hubereevez
27th December 2004, 01:15
Hi,
I do not know how to join such streams. In particular streams given by nero.
Thanks
hubert
PS: Mods, feel free to delete/edit this post, i did put a "reminder" question here (http://forum.doom9.org/showthread.php?threadid=80845&perpage=20&pagenumber=5). The question seems to be off topic anyway.
DeathTheSheep
27th December 2004, 18:36
Mmm, H.264 streams can be easily cut and joined with Virtualdub if they are in an AVI container. However, a downfall of the clunky MP4 container is its inability to be opened for any sort of editing. :-( The other AVC codecs (mpegable or x264, mainly) use vfw and can easily be edited inside of VirtualDub(mod). You can cut, edit, insert, delete, add, append, etc all with the push of a button. Nero's MP4 makes that, well... impossible, as far as I know.
If you are desperate, convert the MP4 file into an AVI using another form of compression (do this with graphedit). Then, you can do all your editing, but loosing Nero's compression. Good luck!
Cheers, baa
bond
27th December 2004, 19:52
most tools place avc either in .mp4 (eg envivio, nero, sorenson) or into .mpg (moonlight, mainconcept) as defined by the mpeg standards
afaik these files cant be joined atm in any tool (avc-in-mp4 might be cuttable with the nero directshow muxer in graphedit)
mpegable and videosoft (the later one not really available to the public) offer vfw codecs, which place avc normally into .avi, as also done by x264 (not defined by mpeg). these files _should_ be cutable (and joinable ?) in virtualdub
should because, still there is no really working vfw avc decoder available (tested mpegable and it didnt really handle my videosoft/x264 avc-in-avi streams, even with different settings, DAVC fourcc), so i am not sure if vd(M) actually can split/join avc-in-avi files _in practice_
raw avc streams might be joinable via dos commandline (afaik you can extract avc streams from .mp4 and .avi with the mpeg4ip tools)
moved to container forum
hubereevez
28th December 2004, 02:42
avc-in-mp4 might be cuttable with the nero directshow muxer in graphedit
did try with nero dshowfilter (nero digital avc muxer?) i have one mp4 for the film the other for credits....
The resulting mp4 plays only the first part (eg movie), but is the sum of the two files.
Thanks anyway for your answer bond :)
hubert
PS : i don't want to recompress my movie Death :rolleyes:
Neo Neko
28th December 2004, 08:07
Originally posted by DeathTheSheep
...However, a downfall of the clunky MP4 container is its inability to be opened for any sort of editing.
There are several tools that can edit MP4. Unfortunatly none that I am aware of support AVC just yet. Give it time. Whether or not virtualdub* will support it is debatable. But something will.
Originally posted by DeathTheSheep
If you are desperate, convert the MP4 file into an AVI using another form of compression (do this with graphedit). Then, you can do all your editing, but loosing Nero's compression. Good luck!
Cheers, baa
Actually using graphedit it should be possible to simply repackage the streams in AVI. The only real dificulty I see at the moment is that there is no VFW AVC decoder capable of handling B-frames. Outside of that there should be no other dificulties other than the usual like only being able to cut on key frames etc.
hubereevez
28th December 2004, 19:09
Actually using graphedit it should be possible to simply repackage the streams in AVI
I would like to give it a try, but i'm not so familiar with graphedit....
What filter should I use ?
thanks
hubert
DeathTheSheep
28th December 2004, 19:10
@Neo Neko:
Mmm... Actually, the MP4 AVC to AVI AVC process you mention is impossible. Really. I'm working on an MP4 to MKV to AVI solution, but to no avail (yet). Just check out this containers thread where I wanted to do this initially: http://forum.doom9.org/showthread.php?s=&threadid=86802
2 full pages later-> still where I started. Just thought I'd dash yer hopes afore they fly too high, lol. Heh, sorry for the dull post! ;-)
Cheers, baa
Tuesday
11th January 2005, 00:08
After having searched and found no definitive answers, is there any way to cut/append .mp4 contaniing Nero's AVC ?
The reason I ask is that I usually encode the intro logos and credits as seperate files* then join them all up as .avi in VDub before muxing to MKV and adding audio/subs etc.
I would be quite happy to use .mp4 instead as it seems for now there is no way of muxing AVC into matroska for now, but I need some way of attaching the intro/credits to the movie.
Any advice greatly appreciated.
*To save bits, replacing them with something like:
Blankclip(39634,640,272,fps=25,pixel_type="YV12")
Subtitle("Credits",text_color=$FFFFFF,size=48,x=-1,y=-1)
bond
11th January 2005, 00:25
Originally posted by Tuesday
The reason I ask is that I usually encode the intro logos and credits as seperate files* then join them all up as .avi in VDub before muxing to MKV and adding audio/subs etc.
*To save bits, replacing them with something like:
Blankclip(39634,640,272,fps=25,pixel_type="YV12")
Subtitle("Credits",text_color=$FFFFFF,size=48,x=-1,y=-1)why not simply use this blankclip command together with the normal .avs in one .avs file? its possible (use search or read the avs doc), better for the ratecontrol and easier doable
Tuesday
11th January 2005, 02:54
I realised I could do that just after posting :stupid:
Damn I feel thick now!
Cheers anyway
hubereevez
13th January 2005, 01:52
I usually encode the intro logos and credits as seperate files
same here for movie and credit
i have the both part for almost a month now :(
++
hubert
bond
13th January 2005, 13:05
you can extract avc streams to raw from .mp4 with mp4creator, than you could join them via dos commandline and mux back again to .mp4 with mp4creator (will only work if no b-frames have been used)
hubereevez
16th January 2005, 00:38
hi bond,
i did use b-frames (who's not ? :confused: )
like described in the nero guide
hubert
bond
16th January 2005, 05:42
mp4creator will not mux avc streams with b-frames correctly atm
JoeBG
16th January 2005, 12:12
Originally posted by bond
mp4creator will not mux avc streams with b-frames correctly atm
What about mp4creator60 from gpac
bond
16th January 2005, 16:15
Originally posted by JoeBG
What about mp4creator60 from gpac gpac's tool is called mp4box. it doesnt support avc as input
JoeBG
16th January 2005, 16:51
@ bond
Any chance to mux a AVC AVI with b-frames to MP4? Independandce day is just finished and it took a very long time to encode him. Do you have an indea?
bond
16th January 2005, 17:02
i dont think its possible
but you might want to drop the mpeg4ip dev a message here (http://sourceforge.net/forum/forum.php?thread_id=1201621&forum_id=59136), hopefully making him more motivated to speed up fixing the b-frame support
also you might want to try muxing with the nero dshow muxer, but i am not sure at all whether this will work
ak
16th January 2005, 17:39
Originally posted by bond
but you might want to drop the mpeg4ip dev a message here (http://sourceforge.net/forum/forum.php?thread_id=1201621&forum_id=59136)
Hm, I tried the sample linked there, can't see any difference on playback between avi and mp4 (in mplayer). Prolly was fixed in cvs already?
bond
16th January 2005, 17:50
well just because mplayer handles the file doesnt mean that its a correct file :)
ak
16th January 2005, 18:07
I see, how does one verify then?
bond
16th January 2005, 18:19
Originally posted by ak
I see, how does one verify then?ask the dev, and when he says "we dont do xyz correctly" you know the files are not correct :D
ak
16th January 2005, 18:43
Sounds reasonable.
My point was, maybe it was fixed since then. Anyways, seems there's nothing related in cvs logs, so I shut up for now.
hubereevez
17th January 2005, 03:16
So do I
i' have subscribed this thread, I hope such a tool come rapidly.
thanks for your answers bond :)
hubert
JoeBG
17th January 2005, 10:12
Originally posted by bond
i dont think its possible
but you might want to drop the mpeg4ip dev a message here (http://sourceforge.net/forum/forum.php?thread_id=1201621&forum_id=59136), hopefully making him more motivated to speed up fixing the b-frame support
done, hope this helps with b-frame support for mp4 muxing tools. :D
bond
17th January 2005, 12:21
;)
JoeBG
18th January 2005, 08:29
We are getting support for b-frames with the next release (see last post of Bill Murray). Hurray :D :D :D
By: bond - b-o-n-d
raw avc with b-frames to .mp4 import problems
2004-12-28 13:02
i tested interoperability of mp4creator's raw avc import functions with the following results:
i conducted the test the following way:
1) created avc-in-avi files with x264 (mencoder) by using the default settings (cabac, loop, (no) b-frames)
2) extracted the raw avc stream with mpeg4ips avi2raw tool
3) imported the raw avc stream to .mp4 with mpeg4ips mp4creator
and the resulting files play fine with
- nero .mp4 dshow parser and avc decoder
- moonlight .mp4 dshow splitter and avc decoder (seeking seems to be buggy or at least very cpu consuming)
- videolan
- mplayer
so without b-frames, mp4creator seems to be pretty stable already
but when doing the same with a sample using 2 b-frames in a row:
- with moonlight i get choppy playback
- with videolan and mplayer (which dont handle decoding b-frames with cabac!) i get "jumpy" playback (picture jumping back/forwards in small steps)
- with the nero filters i get exactly the same effect as with mplayer/videolan!
nero should be stable to handle b-frames correctly, combined with that mplayer/videolan should not be able to handle them, but still show the same effect as nero, it may be the case that mp4creator has problems with b-frames
By: JoeB - brehme
RE: raw avc with b-frames to .mp4 import problems
2005-01-16 21:58
It would be very nice to have b-frame support with this tool. After MeGUI from doom9 and sex264 from Syskin came out, h.264 encoding is possible for the public. But how to get it into MP4 with b-frames???
Thanks in advance
By: Bill May - wmaycisco
RE: raw avc with b-frames to .mp4 import prob
2005-01-17 09:48
I'm about to commit the code to do so for CVS. I'll probably release 1.3 with it, after I solve a couple of other problems.
Happy ?
yaz
18th January 2005, 10:49
@joebg
pls, try ffdshow too.
i tested syskin's latest x264 w/1b-frame. the avi ouputted by vdm played fine w/nero and w/ffdshow in mpc. when repacked to mp4 nero produced jerky playback but ffdshow still played smooth and fine. it's quite strange as the nero parser was used for both. (info: i only used mpc, moonlight not installed, nero filters are those of nbr6603)
i don't know what's the state-of-the-art of b-frame but, iirc, only one b-frame was told to be safe. am i outta scope here ?
the bests
y
JoeBG
18th January 2005, 11:24
I always use 3 b-frames with AVC. ffdshow in the latest release can play them and Nero Video Decoder can play them. I use both in mplayerc from celticdruid.
yaz
18th January 2005, 11:51
@joebg
hmmm ... having read your post above i thought u had playback problems when b-frames were used. maybe i misunderstood sg :confused:
the bests
y
JoeBG
18th January 2005, 13:17
Originally posted by yaz
@joebg
hmmm ... having read your post above i thought u had playback problems when b-frames were used. maybe i misunderstood sg :confused:
the bests
y
I have problems with muxing AVC including b-frames to MP4 :)
RadicalEd
18th January 2005, 23:45
Originally posted by JoeBG
I always use 3 b-frames with AVC. ffdshow in the latest release can play them and Nero Video Decoder can play them. I use both in mplayerc from celticdruid.
This is good for Nero AVC, but not x264. B-frame placement is not yet adaptive, and therefore is likely to do more harm than good with any more than one.
hubereevez
24th January 2005, 14:03
any news yet bond ?
thks
hubert
bond
24th January 2005, 14:10
Originally posted by hubereevez
any news yet bond ?- you can cut avc-in-mp4 in graphedit with the nero dshow muxer
- mp4creator is able to mux b-frames correctly from raw avc streams
hubereevez
24th January 2005, 14:53
Thks
have two mp4 files created by nero recode
Joining ? Couldn't do it with graphedit. Should I extract raw h264 with mp4creator -extract ? and then try to join ? And then muxing them with mp4creator ?
erf
thks
hubert
edit : mp4creator 1.2.5
bond
24th January 2005, 14:55
Originally posted by hubereevez
Joining ? Couldn't do it with graphedit.yep, it only supports cutting
Should I extract raw h264 with mp4creator -extract ? and then try to join ? And then muxing them with mp4creator ?yep
join the raw .264 streams with the dos join command
hubereevez
24th January 2005, 14:58
i did edit my post
ok so for now "cutting and muxing" is solve
will try the join command
thks
hubert
edit : :):):):):):):):):):):):):)
youhouuuuuuuuuuuuu !
it works !
1) extract to t3 files with mp4creator (why t3 ?). Renaming them into h264
2) using hjsplit to merge them (what's a join command ? :p)
3) create mp4 with mp4creator -frame=25 (Error decoding sei message ?)
5) as a noob adding he-aac with mp4creator : arghhhhhh ! will try with mp4box
thnaks again bond :)
bond
24th January 2005, 15:47
Originally posted by hubereevez
1) extract to t3 files with mp4creator (why t3 ?). Renaming them into h264because the avc stream was track 3 in the .mp4
mp4creator always uses the tracknumber as extension when extracting to raw
2) using hjsplit to merge them (what's a join command ? :p)1) create a .txt file
2) place the following line in it:
copy /b part1.264 + part2.264 output.264
3) rename the .txt to .bat and execute it
4) mux the resulting joined .264 to .mp4 with mp4creator :)
3) create mp4 with mp4creator -frame=25 (Error decoding sei message ?)note: i dunno what the hjsplit tool does, so it might not be save to use it at all
5) as a noob adding he-aac with mp4creator : arghhhhhh ! will try with mp4boxhm mux the he-aac to .mp4 with mp4box first and after that mux the .264 stream with mp4creator into the .mp4 created with mp4box, not the other way round (as mp4box might not handle the avc stream!)
hubereevez
24th January 2005, 17:17
not the other way round (as mp4box might not handle the avc stream!)
i red it on the forum. But guess what, did that way, lol. Muxed two mp4 he-aac+avc : 0x0 video for mp4box. Audio seems to be fine with :
mp4box -add audio.aac -sbr -out audio.mp4
i dunno what the hjsplit tool does, so it might not be save to use it at all
Hjsplit (http://www.freebyte.com/hjsplit/) is a freeware tool, did the copy.bat. Same warning from mp4creator : "Error decoding sei message". Files are equal when comparing bat and hjsplit files.
hm mux the he-aac to .mp4 with mp4box first and after that mux the .264 stream with mp4creator into the .mp4 created with mp4box
mp4creator shows : "MakeIsmaCompliant:can't make ISMA compliant when file contains an avc1 track". So it might be impossible to mux avc AND he-ac for the moment.
Results with the indicate method:
1) mplayerc (filter: nero video decode) is playing the file with audio (coreaac filter), but :
*delay raise up at the end of the movie (due to he-aac non compliant file ?)
*crash at the joining scene sometimes (or black screen instead of credits, strange issue : by seeking credits plays fine. When you plays from the end of the movie with credits: they don't appear :confused: )
2) videolan did crash
3) nero player plays no sound, and has great difficulty to seek. This player stops at the joining scene. But he can plays when seeking. (neroplayer is not able to play the audio_only.mp4)
I tried to mux the both mp4 with graphedit (nero muxer ?) with no results.
++
hubert
bond
24th January 2005, 19:24
try without hjsplit, without the make isma compliant option in mp4creator and without using mp4box on an avc containing .mp4
hubereevez
24th January 2005, 20:31
i wrote all these in my previous post, I guess....or my english is too bad.....:confused:
try without hjsplit
i did, files are the same (checksum compare md5) anyway
without the make isma compliant option in mp4creator
I did not use this option, or is it an option to "not make it compliant" ? (force 3gp compliance eg isma not compliant : what the diff ?)
without using mp4box on an avc containing .mp4
did not (but yep the first try, like I wrote):
aac --mp4box-->audio.mp4
movie+credits.264 ---mp4creator--> audio.mp4
Hope you have understain how I did build my files, now.....:)
thanks
hubert
bond
24th January 2005, 21:20
ah ic
hm you might want to try it without the aac stream, apart from that i dont know what you could try, sorry :(
hubereevez
25th January 2005, 23:16
erf
1) so you confirm that it's impossible, for now, to mux he-aac with avc stream.
2) what do you think about this strange behaviour when playing the movie at the cutting scene?
thanks
hubert
bond
25th January 2005, 23:32
Originally posted by hubereevez
1) so you confirm that it's impossible, for now, to mux he-aac with avc stream.nope, you can mux he-aac with mp4creator and a he-aac decoder should detect implicitely sbr, altough its not explicitely signalled in the .mp4 (eg coreaac and any faad2 based decoder does it)
theoretically mp4creator should be able to add streams to existing stream (eg like mp4ui does), but as it doesnt seem to work, there might be a bug
2) what do you think about this strange behaviour when playing the movie at the cutting scene?well afaik the raw avc streams dont contain any headers or so which could cause problems when joined via dos cmdl (as with adts aac there are adts headers)
but you might want to discuss that with an avc dev
either way you might want to file a bug report on the mpeg4ip forum on sourceforge
hubereevez
26th January 2005, 23:07
there might be a bug
Yep i think there is
discuss that with an avc dev
just Pm'ed babayaga, is that right ?
Moreover, it seems to me that this thread does not belong to container topic (or perhaps the half of it :) )
thks again bond
hubert
PS : I should ask if it's usefull to encode credits separtly : fo me yes when i got 7 Mo for 20 min credits. Imho i think i have spared some usefull size.
bond
26th January 2005, 23:12
Originally posted by hubereevez
PS : I should ask if it's usefull to encode credits separtly : fo me yes when i got 7 Mo for 20 min credits. Imho i think i have spared some usefull size.its useful! doesnt recode support the extra compression of credits? if no than drop a feature request here (http://forum.doom9.org/showthread.php?s=&threadid=88903&perpage=20&pagenumber=4) :)
hubereevez
7th February 2005, 04:12
Hi, I did request...;
Apart......
nothing new about joining/muxing hee-aac and avc?
thanks
iapir
7th February 2005, 10:46
MP4 is not made for editing. It's mostly designed for storage (as I understand it). Maybe you should look as other interim solutions to do that, like Matroska. Beta builds of mkvtoolnix will let you join/cut any content, including AVC and AAC.
bond
7th February 2005, 14:14
Originally posted by iapir
MP4 is not made for editing. It's mostly designed for storage (as I understand it)thats not true
if that would be true why are there .mp4 editing tools existing for .mp4 on linux, why does quicktime allow editing of .mp4...
.mp4 is similar to .mov, would anyone say .mov isnt made for editing... :rolleyes:
hubereevez
7th February 2005, 15:50
nimporte kwa as we said in french !
lol
bond, I must admit babayaga wrote me with a lot of details (so nice and polite :)), they ask nero for an editing tools......
He said better joining in mp4 than editing within raw videos (if my trnaslation is good ?) cos of iso compliant....
could you pm me if you have news
thks again
hubert
hubereevez
25th February 2005, 00:50
Still hanging there.
Have two AVC-video files and one he-aac audio file created by nero.
Cannot happen movie & credits. Cannot mux avc with he-aac
;(
Help me please.......
hubereevez
6th March 2005, 17:41
It has been month now, that I'm trying to join h264 streams.
No editor could do that, at least, into mp4 !!!!
Moreover, babayaga told me, they asked nero to produce such an editor, but he thinks that, it's "container dependant" (mp4 tools), due to compliance.
But now, and as always, the solution comes from matroska.
I would like to build a mp4 compliant file to be able to play the movie on futur dvd/avc capable player. But I dismiss, fo now.
I think encoding credits separatly is important due to the gain of space (20 mins on 8Mo).
So, with the new mkvtoolnix, you'll be able to muw join, cut avc and He-aac, subs, chapter.
The only backside, is that demuxing is, for now, impossible (like with rv10 before :) ).
voilà
hubert
bond
6th March 2005, 23:29
just before everyone starts crying because this thread gets "abandoned":
1) its possible to join raw avc streams via dos commandline when they have the same resolution/encoding options used
2) its possible to mux the resulting joined raw avc stream correctly into .mp4 with mp4creator
3) its possible to mux he-aac with implicit sbr signalling into .mp4 with mp4creator
4) its possible to mux he-aac with explicit (and of course implicit) signalling into .mp4 with mp4box
5) its possible to join avc streams with he-aac streams with mp4creator
anything left?
hubereevez
6th March 2005, 23:57
1) and 2) now it's possible with 1.2.10 mp4creator. I did test it with bond, he was helping and questionning me on irc. There is no more seeking problem and/or black scene at the joining scene.
3 4 and 5) do not know, I have problem with muxing .aac files. the mehtod you decribe seems to be complicated.
anyway
This thread can be consider close. for peaolple, like me who are encoding separatly movie and credits, you can use mp4creator :
*extract video streams, renaming them : .h264
*join them, dos or download hjsplit
*mux them using frame command (-rate= )
Voilà
No need to be hard.
hubert
Doom9
7th March 2005, 08:25
anything left?split MP4 at timecode hh:mm:ss:ff, and split while muxing (based on timecode or size).
bond
7th March 2005, 09:27
Originally posted by Doom9
split MP4 at timecode hh:mm:ss:ff, and split while muxing (based on timecode or size). well my answers were related to huberts problems
you can split while muxing with the nero dshow muxer at a specific size...
Doom9
7th March 2005, 09:38
you can split while muxing with the nero dshow muxer at a specific size...I thought they had changed their filters to only allow them to be used by Recode and NVE3. Plus, Graphedit isn't really a user-friendly tool. CLI options for tools like mp4creator would be much more convenient and can easily be wrapped in a GUI (MeGUI, AutoAC and mp4muxer come to mind).
hubereevez
24th May 2005, 22:34
Give another try with cutting AVC in mp4 (want to cut 03:18 at the beginning of the movie). No luck with latest mp4box build(MP4Box - GPAC version 0.3.0-DEV 23/05/05).
J:\Programmes\Encodage\mp4>mp4box -splitx 78:7555 "E:\les charlots\débattent sur l'europe.mp4"
+ splitx
remove all mpeg4 systems media :confused:
Seems the only solution is to use the cutting fonction into mkv at this time. I'd rather keep my mp4 format for this.
Thanks
Hubert
DeeGee
24th May 2005, 22:59
Huh? MPEG4 systems media?
A file with AVC, 3x HE-AAC, 2x subtitle tracks and chapters splitted just fine with mp4box. try mp4box -info filename.mp4 to see what tracks the file has.
hubereevez
25th May 2005, 20:13
here is the info given by mp4box, from mp4 created by nero (only video, that's all)
* Movie Info *
Timescale 1000 - Duration 02:00:23.120
Fragmented File no - 3 track(s)
File Brand avc1 - version 0
File has root IOD
Scene PL 0x01 - Graphics PL 0xfe - OD PL 0xfe
Visual PL: No visual capability required (0xff)
Audio PL: ISO Reserved (0x00) (0x00)
Track # 1 Info - TrackID 1 - TimeScale 1000 - Duration 00:00:00.001
Track is present in Root OD
Media Type "odsm" - Media Sub Type "mp4s" - 1 samples
MPEG-4 Config: ObjectDescriptor Stream - ObjectTypeIndication 0x01
Self-synchronized
Track # 2 Info - TrackID 2 - TimeScale 1000 - Duration 00:00:00.001
Track is present in Root OD
Media Type "sdsm" - Media Sub Type "mp4s" - 1 samples
MPEG-4 Config: SceneDescription Stream - ObjectTypeIndication 0x01
Synchronized on stream 1
Track # 3 Info - TrackID 3 - TimeScale 25000 - Duration 02:00:23.120
Media Type "vide" - Media Sub Type "avc1" - 180578 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 592 x 320
Synchronized on stream 1
here is the help about -splitx
-splitx start:end extracts a new file from start to end (in seconds)
* Note: this removes all MPEG-4 Systems media
voilà
hubert
hubereevez, whats the exact problem?
mp4box removes the bifs/od streams when splitting a .mp4
the bifs/od streams are the systems information, the "scene". eg they can carry a dvd-like menu
now imagine you have a .mp4 which carries such a menu. when you now split the file simply in the middle, the menu info is not necessarily correct anymore (it can be still working, but more likely it will not), therefore mp4box will remove the systems streams when splitting, to avoid having f*ed up systems info in the splitted parts
after all its not mandatory having the systems streams in a .mp4
Originally posted by Doom9
[B]I thought they had changed their filters to only allow them to be used by Recode and NVE3. their muxer seems to work still :)
hubereevez
28th May 2005, 13:29
Please read my previous messages more carefully, Bond.
Said no luck with latest mp4box and nero recode. i have created a video-only mp4 !
WARNING: Track ID 1 (type odsm) not handled by spliter - skipping
WARNING: Track ID 2 (type sdsm) not handled by spliter - skipping
Adjusting chunk start time to previous random access at 717.12 sec
Then asking, what was this "mpeg4 media removing" (thanks for the clear and nice respons :))
Anyway, it seems i have a pb with these warnings. mp4box is crashing then (am i the only one here ?)
DATABASE>
<EXE NAME="MP4Box.exe" FILTER="GRABMI_FILTER_PRIVACY">
<MATCHING_FILE NAME="MP4Box.exe" SIZE="999424" CHECKSUM="0x1978C645" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/23/2005 02:16:46" UPTO_LINK_DATE="05/23/2005 02:16:46" />
..............
Originally posted by hubereevez
Anyway, it seems i have a pb with these warnings. mp4box is crashing then (am i the only one here ?) [/B] ok so a crash happens
can you upload such a small sample showing this somewhere?
hubereevez
28th May 2005, 13:45
Thanks for the quick respons, I can't cut a sample of my file since mp4box crashes. :rolleyes:
But I will try to re-encode a small part this week end. :)
NuPogodi
8th September 2005, 13:33
Hi, mp4-gurus! i've just met a tiny problem when used MP4Box (GPAC version 0.4.0, i guess the celtic_druid's compile) for cutting and joining AVC H264 (x264CLI, --bframes=2, --ref=3, --b-pyramid, etc.). Well, mp4box does sucessfully split such a video till the last i-frame... The question is how to extract the p & b-frames following the last i-frame? everytime when i define the end time (-splitx start_time_sec:end_time_sec) within the movie duration range, mp4box ignores them. As soon as i use the command with the end time which exceeds the movie duration, mp4box does not output at all (just gives me a warning that the video stream is too long or smth like this).
Well, i've found the only workaround - i've added, at least, one keyframe to the end of a movie and cut with the end time = original movie duration + 1sec. It requires some additional efforts, so my question is: Does somebody know more convenient way?
bond
1st October 2005, 11:20
it doesnt make sense to extract p/b-frames only without an i-frame before them
alos avc is very advanced and allows you to have frames referencing to frames before the last i-frame, therefore it might also be that you need two i-frames to get a correct snip
NuPogodi
4th October 2005, 15:03
it doesnt make sense to extract p/b-frames only without an i-frame before them
You didnot catch a problem. Ok, let me explain the whole situation... i've compressed a movie, but some frames somewhere in the middle look, to my opinion, too "bad" and require higher bitrate. Should i recompress a whole movie? too long, too stupid, too... so, i want to recompress only "bad" frames and to join them with the rest (of already encoded video). In other words, i have to take just encoded movie and to extract by mp4box (-splitx begin_time:end_time)
i) its part preceeding this "bad" encoded frames and
ii) its part following "bad" frames -- till the last movie frame (whatever it is - i, p or b), but not till the last i-frame.
Then i have
iii) to recompress the clip in-between (i still have the sources) and finally
iv) to join all 3 clips into a whole movie.
The problem appears on the step ii). No matter what i'm doing (i actually tried to play around "end_time"), mp4box always extracts the clip ii) ended at the last i-frame of the whole movie and ignores the following p,b-frames (few seconds).
alos avc is very advanced and allows you to have frames referencing to frames before the last i-frame, therefore it might also be that you need two i-frames to get a correct snip
Do you mean: two preceeding i-frames? i don't think so - otherwise how mp4box can cut (without reencoding)? maybe, one i-frame preceeding and one following i-frame? it sound quite reasonable, but i did not meet movies ended by i-frame, i.e. the last movie frame (p- or b-) refers to preceeding frames only... i still don't understand what does prevent mp4box to cut at this frame?
bond
4th October 2005, 15:50
is it this what you mean:
you want to have two parts after splitting:
1) part1 goes from the beginning till where the bad frames begin
2) part2 goes from the bad frames end till the end of the whole movie
i assume splitx has hardcoded to only cut on keyframes, thats why it stops outputting the frames after the last keyframe
edit: i reproduced the same/similar problem and made a bug report here (https://sourceforge.net/tracker/index.php?func=detail&aid=1312928&group_id=84101&atid=571738)
as alternative you could try cutting the stream not with splitx, but with split, which will split the movie every x seconds and should give you the same part1 and part2 you want, but needs to split the original stream 2 times
the other question is of course: what are these bad frames? any screenshot? x264 shouldnt give you "bad frames" unless there is a bug
NuPogodi
4th October 2005, 18:37
is it this what you mean:
you want to have two parts after splitting:
1) part1 goes from the beginning till where the bad frames begin
2) part2 goes from the bad frames end till the end of the whole movie
Yes (not exactly between the beginning and the end of "bad" frames, but the closest preceeding and the closest following keyframes).
i assume splitx has hardcoded to only cut on keyframes, thats why it stops outputting the frames after the last keyframeWell, i guess any split (split, splits, splitx) is possible only at keyframes. The problem is that, ATM, mp4box splits on the keyframe which preceeds the "end_time" and does not output when "end_time" exceeds the movie duration.
edit: i reproduced the same/similar problem and made a bug report here (https://sourceforge.net/tracker/index.php?func=detail&aid=1312928&group_id=84101&atid=571738)Thanks a lot...
as alternative you could try cutting the stream not with splitx, but with split, which will split the movie every x seconds and should give you the same part1 and part2 you want, but needs to split the original stream 2 timesI've already found few workarounds
1. to join original movie with some trash and to split the joined movie at "end_time" = movie duration + 1 sec
2. or to split original movie till the last keyframe, recompress the following frames and to join them, etc.
the other question is of course: what are these bad frames? any screenshot? x264 shouldnt give you "bad frames" unless there is a bug
I've used the word "bad" just for brevity. In fact, these frames show a rainy street and require very high bitrate to see that it does look like a rain. It is definitely not a bug, just a bit wrong encoding settings.
bond
4th October 2005, 18:44
Well, i guess any split (split, splits, splitx) is possible only at keyframes. The problem is that, ATM, mp4box splits on the keyframe which preceeds the "end_time" and does not output when "end_time" exceeds the movie duration.well you should try it, split/splits might output till the end on the last split
I've used the word "bad" just for brevity. In fact, these frames show a rainy street and require very high bitrate to see that it does look like a rain. It is definitely not a bug, just a bit wrong encoding settings. ok, but beaware that you cant join avc streams with different settings in some cases (higher bitrate is of course fine)
NuPogodi
5th October 2005, 12:52
ok, but beaware that you cant join avc streams with different settings in some cases (higher bitrate is of course fine)
i've already tried and found another non-documented "feature" of mp4box. It seems that mp4box can join any streams - no matter, whether they were compressed at the same x264cli-settings or not.
i) When the settings are the same, the second videoclip is just appended to the end of the first (as, actually, is expected). So, the ouput is one videotrack with the duration = duration1 + duration2.
ii) When the settings for two joined segments are different, mp4box produces mp4-ouput with two independent videotracks... when i at first joined such segments, i wondered why the ouput size (KB) = size1 + size2, but the output duration = duration1. Fortunately, there are mkvtools and mmg (thanks to Mosu).
bond
5th October 2005, 19:30
i've already tried and found another non-documented "feature" of mp4box. It seems that mp4box can join any streams - no matter, whether they were compressed at the same x264cli-settings or not.
i) When the settings are the same, the second videoclip is just appended to the end of the first (as, actually, is expected). So, the ouput is one videotrack with the duration = duration1 + duration2.
ii) When the settings for two joined segments are different, mp4box produces mp4-ouput with two independent videotracks... when i at first joined such segments, i wondered why the ouput size (KB) = size1 + size2, but the output duration = duration1. Fortunately, there are mkvtools and mmg (thanks to Mosu).thats exactly the behaviour it should have, you are not able/shouldnt be able to mux segments with different encoding settings
bond
7th October 2005, 14:09
seems to be fixed now:
https://sourceforge.net/tracker/?func=detail&atid=571738&aid=1312928&group_id=84101
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.