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
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.