# Encoding .mkv with FFMPEG



## Kuntz

http://www.doom9.org

You should be using VirtualDUB for all your movie needs. Also, install all the extension plugins for it, which will let you do what you are trying to do.

Any reason you are converting it to lossless? That's a waste of space and time!

edit-Also, MKV is a container, not a codec or format, as is AVI. So you need to find out what the source video codec is, and the source audio codec, and rip both from the MKV into AVI and WAV containers. Then when you've got your video converted to the codec you want, and possibly audio as well, then just put them back together using VDUB as a final step. I personally split my A/V right off the bat, work on each individually, then when they're both done, put them back together into the same container (AVI).


----------



## superon

Quote:


Originally Posted by *Kuntz* 
http://www.doom9.org

You should be using VirtualDUB for all your movie needs. Also, install all the extension plugins for it, which will let you do what you are trying to do.

Any reason you are converting it to lossless? That's is a waste of space and time!

true dat.


----------



## error10

Looks like h264 video and a52 5.1ch audio. Why bother converting it? Just keep it as is and put it in a new container. Anyway, the problem with the audio is you specified to not HAVE any audio in the output file.

e.g. ffmpeg -i in.mkv -vcodec copy -acodec copy out.avi

And, VirtualDUB doesn't work very well on Linux.


----------



## Blameless

Also, any lossless format is going to be HUGE.


----------



## GodofGrunts

Thanks for the answers! I was just playing around with the lossless format. I want to make a Mythbuntu box for my tv recordings (when I get enough money anyway) so I was just really playing with it.

Also, the lossless file was like 6.28 GBs and the input file was 353 MBs so yeah. :]


----------



## Coma

The reason you aren't getting any audio is you didn't tell FFMPEG what to do with the audio.

Quote:


Originally Posted by *Kuntz* 
http://www.doom9.org

You should be using VirtualDUB for all your movie needs. Also, install all the extension plugins for it, which will let you do what you are trying to do.

No. VirtualDub is old and uses VFW. Wake up, this isn't 2003. If you're following the doom9 guides, that explains why you're doing this. They are EXTREMELY outdated. Go to the forums.

Quote:

Any reason you are converting it to lossless? That's a waste of space and time!
He probably wants to do something to it and has trouble doing it to the H.264 stream or whatever's in the MKV.

Quote:

edit-Also, MKV is a container, not a codec or format, as is AVI. So you need to find out what the source video codec is, and the source audio codec, and rip both from the MKV into AVI and WAV containers. Then when you've got your video converted to the codec you want, and possibly audio as well, then just put them back together using VDUB as a final step. I personally split my A/V right off the bat, work on each individually, then when they're both done, put them back together into the same container (AVI).
You don't have to do that. The entire idea behind FFMPEG is that it can take almost anything and encode it into almost anything. You can extract from MKV using a tool that comes with mkvtoolnix, mkvextract.

Your way is a very roundabout way. Avisynth is a lot more easy to work with... it has plugins that use ffmpeg to load video and audio, or specialized plugins for MPEG-1/2 and AVC (which gets around the fact their containers - .mpg, .vob, .mkv and .mp4 don't have frame indexes, unlike AVI), you can treat the video and audio as streams or clips instead of files, and so on...


----------



## Kuntz

Quote:


Originally Posted by *Coma* 
No. VirtualDub is old and uses VFW. Wake up, this isn't 2003. If you're following the doom9 guides, that explains why you're doing this. They are EXTREMELY outdated. Go to the forums.

I do go to their forums, and I've also been encoding since 2002, so I'm pretty sure I know what I am doing.


----------



## Coma

Well then you haven't been going to the right subforums. If you use Virtualdub, then you must only be doing XviD or god forbid x264vfw... so you're either outdated or doing it wrong.

Just because you've been doing it for a while doesn't mean you know what you're doing. Look at the messed up DVDs that supposed professionals produce...


----------



## Kuntz

The only codec I use is XviD, and just because you have your own methods doesn't mean mine are wrong or outdated. XviD is still the #1 codec to use, it's the #1 used codec in the scene, and so is VDub. But I guess we could all be doing it wrong..


----------



## Coma

The scene is full of idiots who like feeling like they have proper standards.

Just because a lot of people do something doesn't mean it's good...

XviD is old, so yes, it's outdated. If you're using x264vfw, then you're doing it wrong. Both of these are facts


----------



## Kuntz

Quote:


Originally Posted by *Coma* 
XviD is old, so yes, it's outdated. If you're using x264vfw, then you're doing it wrong. Both of these are facts









XviD has a high compatibility rate, my encodes work on my DVD player, 360, and PS3. I believe XviD is still the fastest encoder around where speed:quality ratio was benchmarked. And I also like that VDUB and XviD can use all 4 of my cores at 100% to speed up encodes.


----------



## GodofGrunts

0.0 *grabs some popcorn and sits down*

Seriously though if VDub works for him does it really matter if he's doing it wrong or not?


----------



## Coma

GodofGrunts: He can encode whichever way he likes, but just because he likes doing it like in 2003 (with formats that VirtualDub can't even handle) doesn't mean he should tell you to take his broken route as well.

Quote:


Originally Posted by *Kuntz* 
XviD has a high compatibility rate, my encodes work on my DVD player, 360, and PS3. I believe XviD is still the fastest encoder around where speed:quality ratio was benchmarked. And I also like that VDUB and XviD can use all 4 of my cores at 100% to speed up encodes.

XviD at max settings is faster than x264 at max settings, but x264 at settings which yield speed similar to XviD's max settings is better quality than XviD. (if only because of the deblocking filter)

Most quality:speed benchmarks are irrelevant because:
a) the people who did them have no clue how to work either encoder
b) they are outdated - x264 goes through about 100 revisions every month. In 2008, there were 3 new features added which had a major impact on quality. Over the course of a year, x264 becomes approximately 20% faster through revisions.

You have a 360 *and* a PS3, both of which can play full-featured H.264, and yet you still want compatibility with your DVD player? Honestly, I don't see why you even have a DVD player considering both can play DVDs. Since you have both, the only reason I can see you might want to use XviD is you encode for the scene.

Not only can x264 use all 4 of your cores at 100%, it can encode on farms of computers, all at max utilization - that just goes to show how scalable it is.


----------



## error10

x264 rocks all 8 threads of my Core i7. The only reason to continue using xvid is for backward compatibility with antique players.


----------

