.mkv -> .h264 -> avi

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

.mkv -> .h264 -> avi

Postby 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)
Shinodude
emodude
 
Joined: 12 Dec 2004
Location: under your bed

Postby 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
Tab.
 
Joined: 13 May 2003
Location: gayville
Status: SLP

Postby 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.
User avatar
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs

Postby 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?
Shinodude
emodude
 
Joined: 12 Dec 2004
Location: under your bed

Postby 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
User avatar
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs

Postby 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.
Shinodude
emodude
 
Joined: 12 Dec 2004
Location: under your bed

Postby 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
Zero1
 
Joined: 02 Jan 2004
Location: Sheffield, United Kingdom

Postby 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
MiyaDV
 
Joined: 29 Aug 2006

Postby 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.
User avatar
Zero1
 
Joined: 02 Jan 2004
Location: Sheffield, United Kingdom

Postby 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
Shinodude
emodude
 
Joined: 12 Dec 2004
Location: under your bed


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 1 guest