.mkv -> .h264 -> avi

If you have questions about compression/encoding/converting look here.
Locked
Shinodude
emodude
Joined: Sun Dec 12, 2004 1:36 pm
Location: under your bed
Org Profile

.mkv -> .h264 -> avi

Post by Shinodude » Wed Jun 20, 2007 12:31 am

I put my .mkv into mkvextractor to get a .h264 file when it was done


so I was wondering if there was a way to get a .h264 to .avi

I tried avc2avi but apparently my file isnt a raw .h264(I cant put it in the program)

User avatar
Tab.
Joined: Tue May 13, 2003 10:36 pm
Status: SLP
Location: gayville
Org Profile

Post by Tab. » Wed Jun 20, 2007 1:30 am

GraphEdit will do the trick. Just pipe the output of the mp4 parser into an avi muxer and dump the output to a file.

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 » Wed Jun 20, 2007 10:00 am

Did you use the command-line MKVExtract or the GUI, because the GUI craps out on H.264*. I also seem to remember avc2avi being very specific about which extension it accepted. If .h264 doesn't work, rename it as simply .264 and see if that works.

In other words, you need to use the CLI to do this correctly, in which case the correct command is this (assuming the video is the first stream in the file):

Code: Select all

mkvextract tracks "path/to/your/mkv.mkv" --raw 1:"path/to/output/file.264"
If --raw doesn't work, you could also try the --fullraw command.

Shinodude
emodude
Joined: Sun Dec 12, 2004 1:36 pm
Location: under your bed
Org Profile

Post by Shinodude » Wed Jun 20, 2007 12:35 pm

Qyot27 wrote:Did you use the command-line MKVExtract or the GUI, because the GUI craps out on H.264*. I also seem to remember avc2avi being very specific about which extension it accepted. If .h264 doesn't work, rename it as simply .264 and see if that works.

In other words, you need to use the CLI to do this correctly, in which case the correct command is this (assuming the video is the first stream in the file):

Code: Select all

mkvextract tracks "path/to/your/mkv.mkv" --raw 1:"path/to/output/file.264"
If --raw doesn't work, you could also try the --fullraw command.
I used the GUI where can I get the command-line?

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 » Wed Jun 20, 2007 1:27 pm

shinodude wrote:I used the GUI where can I get the command-line?
It comes as part of the MKVToolNix package, and can be found in either the main MKVToolNix folder or whereever the GUI is, since the GUI is just a front-end for the command-line, but for some reason borks things like H.264 extraction up.

The newest version of MKVToolNix can be found here, though:
http://www.bunkus.org/videotools/mkvtoo ... ml#windows

Shinodude
emodude
Joined: Sun Dec 12, 2004 1:36 pm
Location: under your bed
Org Profile

Post by Shinodude » Wed Jun 20, 2007 3:04 pm

Qyot27 wrote:
shinodude wrote:I used the GUI where can I get the command-line?
It comes as part of the MKVToolNix package, and can be found in either the main MKVToolNix folder or whereever the GUI is, since the GUI is just a front-end for the command-line, but for some reason borks things like H.264 extraction up.

The newest version of MKVToolNix can be found here, though:
http://www.bunkus.org/videotools/mkvtoo ... ml#windows

I decided to use directsource instead but thank you for your help.

User avatar
Zero1
Joined: Fri Jan 02, 2004 12:51 pm
Location: Sheffield, United Kingdom
Contact:
Org Profile

Post by Zero1 » Thu Jun 21, 2007 7:20 am

Don't do it.

Seriously, what does putting it in AVI do that you can't do with MP4? If you are thinking of editing it, convert it to lossless.

Directshowsource is not frame accurate, it is ok for transcoding stuff, but editing with it will cause issues.

User avatar
MiyaDV
Joined: Tue Aug 29, 2006 4:36 am
Org Profile

Post by MiyaDV » Thu Jun 21, 2007 8:23 am

Question (to avoid making another topic, lol sry)

I used CMD with MKVToolNix and got the .264 file, but everytime I try to convert to .avi with avc2avi it goes "Not Responding" and CMD opens and nothing happens :S

Am I doing anything wrong, or is there any other way to convert to .avi (need lossless anyway)
. . . . . .

User avatar
Zero1
Joined: Fri Jan 02, 2004 12:51 pm
Location: Sheffield, United Kingdom
Contact:
Org Profile

Post by Zero1 » Thu Jun 21, 2007 4:07 pm

What you are doing wrong, is trying to put H.264 in AVI to begin with (it's no easier to deal with, and is probably more troublesome in the long run).

As for it hanging, it might be that MKVextract didn't extract it right, or somehow storing it in MKV has damaged the file. It might also be the case that the program won't take raw H.264 (I used it once to test something, and never again).

Simply create an AVISynth script with this in it:
directshowsource("video.mkv")

You can then load that AVS script in Virtualdub and encode it to lagarith or huffyuv. H.264 should never be put in AVI. AVI can only handle it with hacks, and some programs don't do it correctly.

I hate to sound repetitive and unhelpful, but it will help you in the long run, think of it as being cruel to be kind.

Shinodude
emodude
Joined: Sun Dec 12, 2004 1:36 pm
Location: under your bed
Org Profile

Post by Shinodude » Fri Jun 22, 2007 12:58 am

Zero1 wrote:Don't do it.

Seriously, what does putting it in AVI do that you can't do with MP4? If you are thinking of editing it, convert it to lossless.

Directshowsource is not frame accurate, it is ok for transcoding stuff, but editing with it will cause issues.
it doesnt matter any more sence my brothers computer isnt working very good and frezes when I open vegas

Locked

Return to “Conversion / Encoding Help”