How to compress AMV using h.264

If you have questions about compression/encoding/converting look here.
User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Post by Corran » Mon Sep 04, 2006 1:12 pm

Zero1 (or anyone else who may know),

How do you specify the difference between --threads and --threads-input? The usage is listed as being the same and when I try adding --threads-input or --threads-input 2 to my arguements the encoder throws an error.
--threads
Usage: --threads <integer>
Parralell encoding using slices. If you have a multi CPU or multi core CPU, this will allow you a speed gain. Due to how threading and video coding works, using threads will lead to a very slight degredation of quality, but with the extra speed you gain you can just crank up the settings a bit and offset your loss and still have a speed gain. You use 1 thread for each CPU and/or core, so for dual core it would be --threads 2, or for a dual core dual CPU it would be --threads 4.

--threads-input
Usage: --threads <integer>
Parralell encoding using one thread for the encoding, and another thread for the decoding of the AVISynth output. The best of both worlds, faster encoding with no quality loss (since the encoding is still done on one thread and isn't "sliced"), however the speed increase is not as large as you would get with --threads. You might be able to free up 30% extra speed or so.

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 Sep 04, 2006 5:26 pm

Corran wrote:Zero1 (or anyone else who may know),

How do you specify the difference between --threads and --threads-input? The usage is listed as being the same and when I try adding --threads-input or --threads-input 2 to my arguements the encoder throws an error.
The --longhelp readout from x264's commandline shows that the command is just --thread-input, without the 's' or an integer setting.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

User avatar
Corran
Joined: Mon Oct 14, 2002 7:40 pm
Contact:
Org Profile

Post by Corran » Mon Sep 04, 2006 5:29 pm

ah, thanks. I should have known to check for some type of built-in help switch before posting I guess.

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 Sep 06, 2006 9:14 pm

I've finished putting together the first complete draft of the GUI-based illustrated guide. It includes everything I mentioned before, and hopefully it's easy enough to follow. I make it clear that the settings shown in the x264 configuration screens are not what would be suggested by others that do H.264 encoding, but I emphasize that the guide is intended to show the user the concepts of using MeGUI and x264 rather than provide explicit configuration setups and I did my best to be objective, since my opinions on the use of certain features is sometimes at odds with the general consensus.

I also tried to explain the particular configuration options in the easiest-to-understand way I could imagine at the time (and in a few cases I couldn't really find explanations as to what certain features did so I had to just gloss over them and recommend them based on their usage in the various profiles that Sharktooth provided), so if I need to revise the definitions - and I'm sure I'll need to on a couple of them - let me know, or just use what I did up as a template.

Since I don't have a good enough personal hosting space for this thing to be downloaded by even just a handful of people (damn Geocities), I've uploaded it to Rapidshare. Just unzip and open guide.html.

http://rapidshare.de/files/32220176/meg ... e.zip.html
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

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

Post by Zero1 » Mon Sep 18, 2006 5:37 pm

Janzki wrote:Maybe a simple MeGUI guide a la EADFAG with the basic settings and maybe a few tips would make people more willing to try h.264 encoding.
Yeah, that would probably be a better option, or rather more user friendly. I think the easiest way to get people encoding with x264 is to give them something familliar, this is why a lot of people first start off with the VfW codec (familliar program, familliar interface); unfortunately though, VfW sucks for H.264 (and it sucked for ASP too (DivX/XviD), but those have become tolerated hacks).

The first thing that springs to mind is to keep away from Virtualdub completely for encoding (obviously still using it for your lossless stuff and previews), but still provide a GUI that is not too dissimilar to XviD. Then you can use the XviD Read <a href=http://www.a-m-v.org/guides/avtech31/>ErMaC & AbsoluteDestiny's Friendly AMV Guides</a> section as a basis or template for the guide. Again it's providing them with something that is familliar. The only problem here is that there are a number of differences between ASP and H.264 that you need to stress in the guide. The original XviD guide gets the user to output a constant quantizer 2 encode somewhere along the lines; well Q18 in H.264 is roughly similar to Q2 ASP. If your newbie goes putting Q2 in x264, you will get some pretty hugeass files, much larger than XviD at Q1.

As I will have mentioned before, I got a computer in 2000, and command lines aren't something the average end user had to deal with in that sort of time. Everything is heavily GUI based. Fortunately for me I had been using computers in school and stuff since around 1997. I got to be friends with the school computer whizzkid, and he showed me a thing or two about creating boot disks, formatting and generally giving the IT staff a hard time :D, so fortunately for me, I wasn't completely green to DOS or command lines.

I've been using x264 for a long time now, it's certainly going on for 18 months to 2 years, and back then I started off with the VfW (back then MP4 support was pretty niche and MKV didn't support H.264 either). After a few non serious tests (just basically gauging the difference between XviD and x264), I thought to myself, "Well I've been encoding for around 5 years now. Video codecs come and go, they get upgrades, it's always getting better, but the audio has always been MP3, and that hasn't come as far as video coding has. Why don't I look into AAC and see if I can hack it into AVI?" And so it was, I made some truly bastardised (but fully functional) test encodes.

Being in fansubbing I was thinking what effect this would have on Joe Average, the leecher. I thought, "Well this requires them to install 2 codecs" (no CCCP back then, and before I got into a bit of a flame war with a DVD ripper, I hadn't liked or used FFDShow), "For the sake of having to install a third component, I might as well use MP4 and do it the spec compliant way". Unfortunately for me, the only way to encode spec compliant files at that time (as far as I was aware) was to use the x264 CLI. I hated CLI. There had been so many programs that I wanted to use before but couldn't because I was a CLI phobe, but this was it. I had to get to grips with it no matter what.

I remembered batch files from back in the day, so that was my starting point, x264.exe and a batch file in the same directory with my source AVS file. I ran the x264 CLI to get it's help and basically built up a minimal command line in the batch; I then went through the help again and added in any switches or options that I wanted to change. I ran the batch and that was it. It worked perfect. I had output a raw H.264, and then I went on to encode tha audio (can't remember what I first used, might have been FAAC or Nero) and mux with mp4box. So it was that I came to using H.264 + AAC in MP4, and I've never looked back.

And this is why I wrote a guide to the CLI. I could have hassled trythil or Coderjoe to come up with an XviD like GUI and written a Read <a href=http://www.a-m-v.org/guides/avtech31/>ErMaC & AbsoluteDestiny's Friendly AMV Guides</a> style walkthrough, but learning CLI widened my options. There are a lot more programs that I can now use; some or most of which don't have GUIs, or of those that do have GUIs, they tend not to have all the features (the design is another complication, ie grouping of options and how you will represent something for example multiple choice, or user entry).

It means that I can use the latest versions of x264 and mp4box and make use of any new features, because obviously, they appear in the CLI before someone's GUI. Since there are some programs that are CLI only, for example the reference MPEG-4 ALS (a lossless MPEG-4 audio codec, which can also be stored in .mp4), I found that learning CLI really opened my options, and really, it's barely any more difficult that making an AVISynth script.

That is why I wrote the CLI guide, because I could see that it would be beneficial in more ways that one (add to that, due to it's format, it's easier to list the options and explain them, rather than littering them throughout a guide when you come to a GUI screen that has those certain options). Also by providing all the relevant information, it means that people can make an informed decision rather than entering random numbers that may be suboptimal. There are a few tips and hints littered in the guide, but I purposely try not to tell them what is best, what I think is best, or what to use. I do this in the hopes that people looking for a great encode will try things of their own accord, and perhaps if they find anything interesting, they will share.

Reading a post or two down, I see Corran's batch. Very nice little batch it is too. However I did this once before. I wrote a basic batch to automate encoding the video, audio and muxing to mp4. If I recall correctly, it also checked for an existing audio file (IF EXIST, IF NOT EXIST etc), and if an AAC or MP3 already existed, then it would mux that file (assuming the file is there because you encoded it before hand). I handed the batch file with the programs and such round to a few people to kick them off encoding with x264; unfortunately it seems from the few encodes I had seen, that they didn't change the default values.

For instance you would have a few AMVs encoded at 1000kbps (which is obviously a number I picked out of thin air for the sake of putting a number in the batch file). The thing with that is that 1000kbps may look awesome for one video, and absolute shite for another. It's a basic concept, but a lot of people just assume that more bitrate = higher quality. While this is true, people often fall into the trap of treating bitrate as a sort of measure of quality. Eg you would assume 500kbps would look crap, but for easily compressible sources it may look great, on the other hand an action AMV would look ass at 500kbps, you can't judge quality by bitrate.

An easy way to visualise this is by getting two different images. Something like 640x480 will be good and save them in photoshop at 100% JPG quality. You will see that the filesizes can vary a lot. Now think of 24 of these images in a row, each slightly different. That difference between the two images becomes more apparent as you increase the number of images. While it's true that temporal compression will get rid of a lot of the filesize, the point of interest is that these two sequences can be very different, and the filesize can be a lot different, which is why you shouldn't measure quality by filesize.

Say you have two images again, one is 350KB, the other is 100KB. This could represent one high quality keyframe in a video, or two JPG images. Now what a lot of people might do is encode all of their AMVs at a set bitrate, say they use 1500kbps. Now encoding all your videos at the same filesize, is like saying you will save all your images at the same filesize. Now if you take the two JPG images, and at the same quality level (lets say Q70 in photoshop) one is 350KB and one is 100KB, but you always "encode your stuff at the same filesize", say 150KB; the 350KB image has to drop a lot of quality to reach the target, but the 100KB image will look fantastic (since you would up the quality level to reach the filesize).

Same applies for video. You do a Q2 encode on two AMVs (lossless sources preferable) and see how much the filesize can vary. You have encoded these at the same quality. One video might have came out at 2500kbps, the other at 900kbps. Say if you always go for the same filesize, something like 10MB per minute, which seems to be popular; that is around 1235kbps (including 128kbps audio). Now the 900kbps video has already attained very good quality (Q2 at that bitrate), so to meet that target of 1235kbps you have to uncap the quantizers. That would mean using Q1 in places, which is considered wastage because it does not bring a worthwhile visual improvement. You may as well just keep it at 900kbps; it's already high quality.

Now as for the 2500kbps AMV, you have to lose a lot of quality to bring it back down to 1235kbps. This means using higher quantizers which is basically dropping the quality level (similar to how you had to drop the quality level in photoshop to make the 350KB image to 150KB). Using higher quantizers means more course rounding, which causes visual errors, such as blocking and ringing. It's almost impossible to guess at it, but it may end up using an average of Q4 or Q5 to bring the 2500kbps source down to 1235, and let me tell you, that is pretty ugly.

Also, contrary to what you might assume, quality does not rise proportionately with bitrate. You can encode a video at 500kbps, and it will look pretty bad, but encoding it at 1000kbps will look a lot better (certainly not "twice" as good). Similarly, going up to 1500kbps may not look a whole lot different to the 1000kbps (and definitely not "three times better", than the 500kbps). You see the reason this is, because the most noticable details are stored early on in the codec, the low frequency co-efficients don't use a lot of bitrate anyway. It's the fine details that eat up all the bitrate. That is why the difference between 1000kbps and 1500kbps may not be a lot; at 1000kbps you may already be retaining the bulk of the image quality, any additional bitrate on top of that will be used for storing the high frequency co-efficients (which the eye does not notice easily, and additionally they require a lot of space to store).

High frequency co-efficiencts basically transliate to "fine detail", ie really thin lines. This is why sharpening a video decreases compression, because you increas the number of high frequency co-efficients. The most common form of this rule is seen in limiting XviD at Q2 for encoding. Most details are retained at Q2; Q1 retains even more, but they are higher frequency, require more bits and they eye does not notice them easily. This is why a Q1 encode is much larger than Q2, but looks barely any better. It is better, just your eyes can't see the "additional quality" that well. And so, I have completely gone off on a tangent once again...

The reason in giving the batch file out was so that they have some kind of template so they can manipulate and try higher quality settings if they had a good CPU, or were prepared for a wait. What Corran has done is very helpful, no doubt. But I do worry that people will simply just use the default values, rather than getting the most from the codec.

Well enough of my encoding life story; but that gives you a little insight as to why I use MP4, and why I wrote the x264 CLI guide. I know that some people are working on guides and such; and I think it would be a shame for my guide never to make it to the org, but I just have so little time these days. It would probably be nice to have it up there as an alternative guide for people willing to stray from GUIs.
Corran wrote:Cool, I knew you've been working on that for some time. Glad to finally see it. I agree with Janzki though. It is rather advanced for most editors to bother with.
I agree there is a lot to read, but the way I designed it means you can skip straight to the batch, or go skip to the relevant set of switches you want to check out. It's hard for us to understand because we take video editing and encoding for granted having done this for so long, but looking from the outside in, the whole process of ripping DVDs, IVTC, filtering and even editing is something Joe Average would probably struggle with at first (I mean just look at the newbies putting out interlaced videos, or stuff with subtitles, they start somewhere).

The Read <a href=http://www.a-m-v.org/guides/avtech31/>ErMaC & AbsoluteDestiny's Friendly AMV Guides</a> itself isn't exactly dumbed down enough for Joe Average to follow either; you need a bit of an idea of what you are doing, the process you follow and so on, allowing you to find which section of the guide you need, because the Read <a href=http://www.a-m-v.org/guides/avtech31/>ErMaC & AbsoluteDestiny's Friendly AMV Guides</a> isn't like:
1. Rip DVD: Go here and see the DVD ripping walkthrough
2. Use Virtualdubmod to import .vob and save as AVI
3. Import to Windows movie maker and make AMV
4. Save as 2060kbps WMV.

It covers a manner of things that are essential, and not so essential (but still are pretty important quality wise, stuff like colourspaces which I bet most people don't think twice about). Bearing this in mind, I didn't think my guide was beyond the scope of the Read <a href=http://www.a-m-v.org/guides/avtech31/>ErMaC & AbsoluteDestiny's Friendly AMV Guides</a>, after all, the Read <a href=http://www.a-m-v.org/guides/avtech31/>ErMaC & AbsoluteDestiny's Friendly AMV Guides</a> goes on to explain temporal compression, B-frames and the like. If you are telling me it is, then I am flattered, because the Read <a href=http://www.a-m-v.org/guides/avtech31/>ErMaC & AbsoluteDestiny's Friendly AMV Guides</a> is awesome, but really, it's as simple as reading through how to create a batch file, add switches, and there is a description of the switches there too if you want to find out what one does.

I don't think the guide is too advanced for people, it's just long and looks that way. Of course it's easy for me to say what with having an interest in encoding, I already understand this stuff (and as such it's not easy to see it from someone elses point of view).

I appreciate your comments, but I don't think I'll be changing the guide in such a way that it loses it's format. I hope that not handing it on a plate to people will get them to come up with their own command lines and so on, similarly like with AVISynth; instead of giving them pre-made scripts (which can be great for one source and damn useless for the next), give them the knowledge to create their own. Just like the proverb, "If you give a man a fish, he will have a single meal. If you teach him how to fish, he will eat all his life".

Perhaps I am too wrapped up in encoding, but I don't think it's something that should be dumbed down indefinately. Just things like why videos should have a resolution divisible by 16 is a good start, then you go on to explain that the reason is because macroblocks are 16x16, and using a non mod 16 resolution means inefficient use of macroblocks, and also that they get displayed "offscreen" and can cause display errors or tearing with some decoders that don't work around such things. Or why lanczos resizing shouldn't be used for downscaling, because it sharpens, which a) causes ringing or haloing in a source, and b) creates more high frequency coefficients and therefore does not compress as well as it should.

The rule of thumb is lanczos/bicubic for upscaling (which you should try to avoid anyway since it's just wastage; use anamorphic where possible), and bilinear for downscaling. If it's too soft for you then there are always sharpening filters which you have finer control of compared to just a lanczos scale. I see so many mistakes. Sure I'm not perfect, but I see basic mistakes in encodes from supposedly the best fansub groups. A little knowledge helps everyone, I want to spread the information and help people get better quality.

Most times you only release an AMV or fansub once, so in my opinion, it needs to be at it's best, so you can come back to it in 3 or 4 years time and think, "Damn that still looks good". I mean look at all the awesome AMVs in the top 10% list. Quite a few of them are good old constrained paramater bitstream MPEG-1 encodes (you know, the 352x240 @ 1150kbps stuff, with 224kbps audio). They don't cut it in today's world, and it's a shame.

But you know, having said that, I kind of wonder if that old .mpg encode adds something to the video, a sort of retro or nostalgic feel. I'm very fond of my SNES and MegaDrive games. If someone were to re-release the same games but with better graphics and audio, it just wouldn't be the same. One thing is sure, if you do an exceptional job in the first place, you can look back on it and think, "That was pretty fucking good for it's time". One particular SNES game that has that effect for me is Donkey Kong Country. You play Super Mario World, or one of the Sonic series on the MegaDrive, then compare it to Donkey Kong. They are all awesome games, but Donkey Kong is worlds apart, and despite it's age; the high quality it was at it's time still shows now.
.oO(I'm going off at a tangent again -_-)

Dumbing down encoding has already had bad effects on the industry what with DivX. In case anyone reading didn't know, storing DivX or XviD encodes using B-frames in AVI is bad. AVI isn't properly capable of B-frames, and the VfW framework has certain limitations which mean frames literally get packed together (pretty ugly really, they do this so two frames get forced through the decoder at once). Now we have the .divx file format, which is basically .avi but hacked up more to support menus, dual audio and so on. Wouldn't it have been great if these people spent their time implementing some better MP4 menu makers, splitters and so on, instead of hacking old formats?
Melanchthon wrote:Useful guide, Zero1. For some reason parts of it make more sense than the EADFAG-style walkthroughs I've read.
Thanks, it's kind of weird seeing as I used the XviD guide as a template (the formatting and quicklinks part) that my guide would be easier to follow than the thing it was based on (lol), but it means what I was trying to achieve has worked. I know a few people have found this useful, it's really nice that I can share something I know with the rest of the AMV community. In the long run it ought to ease the distro costs for the site (smaller files = less data to transfer = less cost to run), also make downloads faster in general, even for those on slower broadband, and perhaps make it a little more accessible for dial up users, and increase quality at the same time. It really is a great thing to be part of.
Qyot27 wrote:It's just that I really don't agree with the push toward one container or the other, no matter what the reason is, especially since they both handle H.264 properly (MKV's only downside is that it's almost 100% likely not to have any hardware support, but for the vast majority of AMV viewing that's going to be irrelevant, as it already is).
What is so bad about "pushing" MP4? It already has a lot of favour in the AMV scene, so it's not like we are trying to twist people's arms. It's the ISO spec container from MPEG, for MPEG. Storing H.264 in .mp4 is only natural, as is storing MPEG-1 in .mpg, or are you suggesting we store MPEG-1 encodes or any other type that has it's own specific container in MKV now "just because"?

In my opinion it's silly to use MKV if you aren't using any of it's features that make it useful. You might as well use MP4 and benefit from better 3rd party and commercial software support (the leechers benefit from this too). If you are using features like softsubs, then fair enough, but if you are using plain H.264 + AAC, MKV offers no benefits whatsoever. If people feel like working around some limitations Quicktime's H.264 decoder has (in as much as not using 8x8 DCT or custom quant matrices), then that MP4 is playable on Quicktime, making it accessible for people with Macs (and noobs too, because not everyone likes or knows about VLC). If people are smart enough to softsub, then I think that they are probably smart enough to goolge mkvmergegui and throw 3 files into it and press mux ;)

As we all know PSP and iPod play H.264 and AAC in MP4, who's to say in a year or so these devices won't be updated enough to have the CPU power to play our AMVs off the bat? That's another potential goody with MP4. Also whilst on subject, Apple unveiled it's "iTV", which will play H.264+AAC in MP4 too (but the spec is unknown at the moment, so don't get excited just yet).
Qyot27 wrote:How so? If this is being aimed at the audience that uses the CCCP, then there's only the same two pieces of software involved - Haali's Media Splitter and ffdshow - and it doesn't matter whether it's H.264 and AAC in MP4, H.264 and AAC in MKV, or H.264 and Vorbis in MKV. If they use VLC or mplayer, they have everything already built-in, and if they want to use CoreAVC, CoreAAC, and CoreVorbis instead of ffdshow then they probably already know how to deal with that.
There are still some people around who have an irrational fear of FFDShow, which probably stems back to when OGM and MKV were in development, stuff was crashing and people were blaming MKV/OGM/FFDShow or whatever. Whose compile you get matters too, some work, some don't (properly). At the moment I use CoreAVC and CoreAAC with Haali for my MP4 encodes; but someone who has never heard of, or wants to install these or CCCP can still watch my stuff if they have Nero installed, or if the file doesn't use high profile, they can watch it in Quicktime too.

This is where interoperability comes into play, and is a nice thing for the newbs (depending on whether or not you care if people can see your video or not, I simply have written a guide on H.264+AAC in MP4 playback a long time ago, so it's a non issue for me). One thing about VLC, is that it has some oddities with MKV. Perhaps not of much concern to the AMV scene, but it tends to crash VLC when storing native ASP in it (ie non hacky XviD encodes). IMO that's pretty poor. A few encoders I know have been using native ASP in MKV on purpose to give VLC users a hardtime and getting them to migrate to CCCP >.> The poor Mac users; heh.
Willen wrote:Using MP4 gets people thinking "hey, it's an audio file" ala. MP3, especially since Winamp assumes that MP4 is audio-only (like they do for MP2).
Winamp should be shot. Well at least my registry entries will be of use to some people. Even though they may think WMP is evil, it's a hell of a lot better than Winamp for video.
Qyot27 wrote:The --longhelp readout from x264's commandline shows that the command is just --thread-input, without the 's' or an integer setting.
You guys found an error, thanks. That's just the kind of feedback I want. I know where this came from, I've been copy pasting sections to retain the formatting and use it like a template, I obviously forgot to change the usage part of it (and the "s" on the end of it).

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

replying to legendary post

Post by trythil » Mon Sep 18, 2006 6:26 pm

Zero1 wrote:
Janzki wrote:Maybe a simple MeGUI guide a la EADFAG with the basic settings and maybe a few tips would make people more willing to try h.264 encoding.
Yeah, that would probably be a better option, or rather more user friendly. I think the easiest way to get people encoding with x264 is to give them something familliar, this is why a lot of people first start off with the VfW codec (familliar program, familliar interface); unfortunately though, VfW sucks for H.264 (and it sucked for ASP too (DivX/XviD), but those have become tolerated hacks).
Yeah, Zarxrax has come up with a neat, simple GUI; I assume you've heard about it?
I got a computer in 2000, and command lines aren't something the average end user had to deal with in that sort of time. Everything is heavily GUI based.
Heh. With Microsoft's Monad shell, OS X, and the growing adoption of the libre systems, the command line is growing in popularity again :) How the tables turn.

That's a nice thing, though; command lines can be immensely useful.
And this is why I wrote a guide to the CLI. I could have hassled trythil or Coderjoe to come up with an XviD like GUI
No, you couldn't have. Ask Zarxrax about the non-progress I made :P
One thing about VLC, is that it has some oddities with MKV. Perhaps not of much concern to the AMV scene, but it tends to crash VLC when storing native ASP in it (ie non hacky XviD encodes). IMO that's pretty poor. A few encoders I know have been using native ASP in MKV on purpose to give VLC users a hardtime and getting them to migrate to CCCP >.> The poor Mac users; heh.
Can you point me to some example files? I'd like to try them out on multiple versions of VLC and see what I can find out.

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 Sep 18, 2006 11:09 pm

Zero1 wrote:
Qyot27 wrote:It's just that I really don't agree with the push toward one container or the other, no matter what the reason is, especially since they both handle H.264 properly (MKV's only downside is that it's almost 100% likely not to have any hardware support, but for the vast majority of AMV viewing that's going to be irrelevant, as it already is).
What is so bad about "pushing" MP4? It already has a lot of favour in the AMV scene, so it's not like we are trying to twist people's arms. It's the ISO spec container from MPEG, for MPEG. Storing H.264 in .mp4 is only natural, as is storing MPEG-1 in .mpg, or are you suggesting we store MPEG-1 encodes or any other type that has it's own specific container in MKV now "just because"?

In my opinion it's silly to use MKV if you aren't using any of it's features that make it useful. You might as well use MP4 and benefit from better 3rd party and commercial software support (the leechers benefit from this too). If you are using features like softsubs, then fair enough, but if you are using plain H.264 + AAC, MKV offers no benefits whatsoever. If people feel like working around some limitations Quicktime's H.264 decoder has (in as much as not using 8x8 DCT or custom quant matrices), then that MP4 is playable on Quicktime, making it accessible for people with Macs (and noobs too, because not everyone likes or knows about VLC). If people are smart enough to softsub, then I think that they are probably smart enough to goolge mkvmergegui and throw 3 files into it and press mux ;)
The point I was making is that some people prefer one container to the other for differing reasons that might have nothing to do with the container's featureset, and not to exclude a description just for the sake that 'this one's caught on more'; admittedly, there is a lack of MKV usage for AMVs, but fansubs are still a mixed bag and people are pretty familiar with both by now. I use both MP4 and MKV, maybe not for all the same things, but I do use both, and because I do use MKV for video files by default, it's only logical that I'd address using it for such (even so, it doesn't take up nearly the amount of room that explaining MP4-centric tools does, so even in the guide I wrote up MP4 gets far more attention).

I don't neglect MP4, but when the time comes that authoring discs with H.264 content is an affordable solution, just because MKV may be used for distribution of some files isn't going to hinder anything. By the same logic, those interested and knowledgable enough to want to preserve the quality of an encode by simply transmuxing the video content probably know what to do or could easily find how they could repack the video for use with their hardware/authoring program. If MPEG-1 video streams are encoded the right way, they meet DVD spec, and it's only a matter of demuxing the audio and video, fixing the audio if required (whether converting to 48kHz or using AC3 or both), and remuxing into an MPEG-2 program stream - that's still required, and for H.264 content the same could be said of MKV and MP4 whenever the ability to author discs and the players to use them with become affordable.

As to the point about MPEG-1: I wouldn't see any harm in it if it was supported by more than just VLC or mplayer, but I wouldn't do it myself since when I encode in MPEG-1/2 I do it for my own VCDs, SVCDs, and DVDs, and like I said - when the time comes that H.264-inclusive disc authoring becomes the norm then I'll produce MP4 files for my own hardware to use, but that doesn't mean I'll use that for distribution. My hardware-specific files have a very short timespan that they stay on my harddrive before being written to their respective media. I view the MP4 vs. MKV issue to be mainly restricted to H.264 use as it is, so bringing other formats into it is moot. If it's properly supported by DirectShow-based solutions (since standalone players have greater chance of supporting non-common combinations anyway) and doesn't require nasty hacks to store the video or audio streams, I don't see any harm in using whatever container you want; as of right now, there's a lot of other compression formats that aren't readily supported when stored in MKV - but H.264 isn't one of them.

There is always the example of RealVideo 10 or whatever RealVideo version it was getting more adoption in MKV for some reason for a while there, although I don't see that too much anymore. I really didn't care about that either because it's properly supported by the software.

Me liking and regularly using MKV has nothing to do with me fighting some imaginary tide - it's as simple as it's what works best for me, and since it stores H.264 the way that it's supposed to be stored, there's nothing inherently 'wrong' with it the way that storing any type of MPEG-4 content in AVI is.
Zero1 wrote:
Qyot27 wrote:How so? If this is being aimed at the audience that uses the CCCP, then there's only the same two pieces of software involved - Haali's Media Splitter and ffdshow - and it doesn't matter whether it's H.264 and AAC in MP4, H.264 and AAC in MKV, or H.264 and Vorbis in MKV. If they use VLC or mplayer, they have everything already built-in, and if they want to use CoreAVC, CoreAAC, and CoreVorbis instead of ffdshow then they probably already know how to deal with that.
There are still some people around who have an irrational fear of FFDShow, which probably stems back to when OGM and MKV were in development, stuff was crashing and people were blaming MKV/OGM/FFDShow or whatever. Whose compile you get matters too, some work, some don't (properly). At the moment I use CoreAVC and CoreAAC with Haali for my MP4 encodes; but someone who has never heard of, or wants to install these or CCCP can still watch my stuff if they have Nero installed, or if the file doesn't use high profile, they can watch it in Quicktime too.
I use ffdshow for relatively few things (MS MPEG-4 codecs, HuffYUV, Sorenson1 & 3, Other MPEG4, MJPEG, DV, H.263, FLV1, and native ffdshow formats - I only enable H.264 decoding when I'm working with 1080p stuff from the Quicktime trailer site), and do stick with CoreAVC and CoreAAC as well - for matters of speed as far as the video is concerned and then just because I've always liked the way CoreAAC was put together - I like seeing statistical readouts from my decoding software.

I'm also all-too-familiar with the complaints as I've gotten quick comments that amounted to simply "I hate MKV" and I remember how much of a bitch it was to get either of those containers working right back 3 years ago. On the same token, though, I also remember when trying to get MP4 with ASP to work right was just as much of a bitch - back when 3ivx's and dicas' splitters/whatnot were all there was that was easy to get ahold of. Or then trying to get Nero's splitter and decoder to play nicely with stuff 6 months to a year after that.

I go back to the common stance here - we don't support or go to great lengths to fix computer problems that arise with people that use x popular codec packs aside from telling them to not do that, uninstall the damn things, and use the CCCP instead, but if they can't do the little bit of easy research to find out that whatever solution they're considering will screw over their computer and to try something that's highly lauded I have no pity for them. This plays into the whole ffdshow thing because it's the same thought process - it's just as easy to see that MKV & OGM are stable (at least when using Haali's splitter - OggDS needs to die if it hasn't already, which I only mention because I actually saw it suggested recently), as is ffdshow.
One thing about VLC, is that it has some oddities with MKV. Perhaps not of much concern to the AMV scene, but it tends to crash VLC when storing native ASP in it (ie non hacky XviD encodes). IMO that's pretty poor. A few encoders I know have been using native ASP in MKV on purpose to give VLC users a hardtime and getting them to migrate to CCCP >.>
Subtitle support is also piss-poor, along with other things; I only use VLC as an absolute last resort as it is - I rely on mplayer for my built-in needs (or when using Linux). If I remember correctly, VLC also didn't really like MP4s with ASP, or I was just imagining the SR 2nd Term releases crashing it too.

I've noticed that using native ASP in MKV also isn't without its share of eccentric behaviour, though. For whatever reason, MKVMerge will re-order the frames if it has to remux a native ASP encode (even if its in MKV), and convert it back to VFW, unless the --native-mpeg4 option (or whatever it is) is consistently set. In fact, I think when it does that it also uses packed bitstream too, since in the days when Koepi's XviD builds still printed the text warning on the first frame when using AVI, running the video through MKVMerge and then MKVExtract to get it back to AVI eliminated that warning - and this was on solely VFW content.
Zero1 wrote:
Willen wrote:Using MP4 gets people thinking "hey, it's an audio file" ala. MP3, especially since Winamp assumes that MP4 is audio-only (like they do for MP2).
Winamp should be shot. Well at least my registry entries will be of use to some people. Even though they may think WMP is evil, it's a hell of a lot better than Winamp for video.
Speaking of that, ever since I used the other reg file to remove those settings (the preview was crashing Windows Explorer), WMP won't show up in the Open With... dialog at all, even after forcibly going in and telling it to use it; if it was WMP7/8/9/10/11/crap I could understand, but by default I use 6.4 and it won't show up either. It's a non-issue as MPC was there even before using the reg entries, but it's rather frustrating because there are certain circumstances where MPC isn't particularly well-suited without fiddling with internal settings (its MP4 splitter, namely; Haali's doesn't shut that off like it does with MPC's internal MKV Splitter - but 6.4.9.0 doesn't recognize AR flags in MP4 and the user has to specifically go in and shut that off if they want to see their anamorphic files displayed correctly).
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

Locked

Return to “Conversion / Encoding Help”