Joining -NOT muxing- RAW h264 files

Locked
User avatar
blaku92
Joined: Mon Feb 07, 2005 11:27 pm
Location: Los Angeles, CA
Org Profile

Joining -NOT muxing- RAW h264 files

Post by blaku92 » Mon Oct 06, 2008 4:32 pm

I have a couple of Raw h264 files that I want to join together and place within an mp4, but the only thing I've been able to do is mux each of the files on top of one another. I want to join them so they play back sequentially. I dont want to re-encode them in virtualdub. I've tried megui's muxer, DGAVCIndex to see if making a .dga file would help me mux one joined video track with the audio source, and I've tried YAMB, but none of them are able to join (even though Yamb says it can). Any ideas? Thanks!
Image

"I've dated uglier girls than you for breakfast."

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Mon Oct 06, 2008 6:22 pm

Try the -cat option im MP4Box. I've never tried it so I'm not sure what it does, but it sounds like it might join 2 files like you want.

User avatar
blaku92
Joined: Mon Feb 07, 2005 11:27 pm
Location: Los Angeles, CA
Org Profile

Post by blaku92 » Mon Oct 06, 2008 7:18 pm

Hmmm. ok. How would I go about doing that? I'm not too familiar with the command line way of doing things -- mostly I just find a GUI to help me out. I'd like to know what I'm doing though. Is there a way to alter the script in YAMB or do you use a different GUI that allows command line changes? Is that what you mean?
Image

"I've dated uglier girls than you for breakfast."

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Mon Oct 06, 2008 9:43 pm

One possibility would be to use mkvtoolnix to append the two together (use the Add button for the first video, then Append to select the second one), then mkvextract to get the joined raw stream, and then pack that into an MP4 as usual. Although with mkvextract you might need to use the command line, like so:

Code: Select all

mkvextract tracks "video.mkv" 1:"video.h264"
(where the 1: signals that you want to demux the first stream in the MKV)

Be aware, though, that the properties of the two clips should be the same (this actually applies for more formats than H.264, actually), otherwise you could get unexpected results on playback - or the join operation may not even work. I assume the same goes for using MP4Box to do it as well.

User avatar
blaku92
Joined: Mon Feb 07, 2005 11:27 pm
Location: Los Angeles, CA
Org Profile

Post by blaku92 » Mon Oct 06, 2008 11:02 pm

Hey, good idea. The only problem is I'm not able to switch the fps on the appended file. It automatically chooses 25fps if not set, but each way I try always crashes Mkvmerge. Is there a way to change the appended file somehow?
Image

"I've dated uglier girls than you for breakfast."

Mosc
Joined: Mon Oct 30, 2006 8:13 am
Org Profile

Post by Mosc » Tue Oct 07, 2008 1:06 am

I just tried the same thing myself, and yes, it does seem to crash. A somewhat dumb, but effective workaround is to first mux every raw into Matroska separately, and join these files afterwards. Consider reporting this as a bug.

User avatar
EvaFan
Joined: Sun Mar 21, 2004 10:25 pm
Status: (*゚▽゚)o旦~ ー乾杯ー♪
Location: Somerset, KY
Org Profile

Post by EvaFan » Wed Oct 08, 2008 2:03 am

you could load all the video files in an avisynth script and render them out again.

To do it in a simple way just follow this internal filter:

http://avisynth.org/mediawiki/SegmentedDirectShowSource

Just another option anyways.
"The people cannot be [...] always, well informed. The part which is wrong will be discontented, in proportion to [...] the facts they misconceive. If they remain quiet under such misconceptions, it is lethargy, the forerunner of death to public liberty. What country can preserve its liberties, if it's rulers are not warned [...] that this people preserve the spirit of resistance? The tree of liberty must be refreshed from time to time, with the blood of patriots and tyrants."-Thomas Jefferson

User avatar
blaku92
Joined: Mon Feb 07, 2005 11:27 pm
Location: Los Angeles, CA
Org Profile

Post by blaku92 » Wed Oct 08, 2008 3:50 am

Mosc wrote:I just tried the same thing myself, and yes, it does seem to crash. A somewhat dumb, but effective workaround is to first mux every raw into Matroska separately, and join these files afterwards. Consider reporting this as a bug.
Awesome. This works, but the files have to be completely similar. I've had some troubles with it though. Even if the files are identical -- it doesn't work perfectly every time. :? Thanks for the idea!
Image

"I've dated uglier girls than you for breakfast."

Locked

Return to “Video & Audio Help”