How to compress AMV using h.264
- rubyeye
- Joined: Wed Sep 05, 2001 1:45 pm
How to compress AMV using h.264
Even though it is still a relatively new codec, many folks seem to be taking advantage of it. I'm interested in playing with this myself and see if it is a viable option I can & should start using.
However, I know the "Tech Guide" and AMVapp has not been updated in years and some are working on that. So, could someone direct me to where I can learn how to compress my video using the h.264 codec - what programs I may need, the proper settings I should use, and other stats.
Some creators here have had sucess in making h.264 videos so I'd just like to know where they went to learn how to do it.
However, I know the "Tech Guide" and AMVapp has not been updated in years and some are working on that. So, could someone direct me to where I can learn how to compress my video using the h.264 codec - what programs I may need, the proper settings I should use, and other stats.
Some creators here have had sucess in making h.264 videos so I'd just like to know where they went to learn how to do it.
-
- is
- Joined: Tue Jul 23, 2002 5:54 am
- Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
- Location: N????????????????
mplayer manual page, doom9 forum, and #AMV @ irc.zirc.org worked / still works for me.
- Purge
- Joined: Mon Oct 10, 2005 9:18 am
- Location: Under Aus
-
- is
- Joined: Tue Jul 23, 2002 5:54 am
- Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
- Location: N????????????????
...then it doesn't really let you do "anything and everything".Purge wrote:i found a gui that does anyhting and everything to h264 in two clicks easy but it only lets you alter the bitrate and framerate.
Oh, and because I missed this the first time:
There's several implementations of the H.264 standard around. The one that gets the most press around here is x264, but that's not by any means the only one out there.
- Purge
- Joined: Mon Oct 10, 2005 9:18 am
- Location: Under Aus
- Zarxrax
- Joined: Sun Apr 01, 2001 6:37 pm
- Contact:
http://x264.nl/ is a good starting point.
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
I read about the features on both doom9 and Wikipedia, followed cues within MeGUI itself, and fiddled around with the settings myself to see what I was comfortable with. Even though the settings don't always correspond to the features in XviD, the concept behind some of them is fairly similar, and just take some extrapolation and factoring in of the differences to deal with.
Although I've not released too much as of current that uses H.264 (and out of the four videos I've released that use it, only two of them have been since I stopped using the VFW, although I have gone back and 'fixed' those early ones on my end by running them through MP4Box - I just haven't made them available anywhere, because when I get the time I'll probably redo the encode entirely), but that's more because my computer is downright ancient and takes forever to encode, most of the videos I've been editing lately are shorts that I intend to put into a larger compilation, and my editing pace is at a crawl anyway.
Although I've not released too much as of current that uses H.264 (and out of the four videos I've released that use it, only two of them have been since I stopped using the VFW, although I have gone back and 'fixed' those early ones on my end by running them through MP4Box - I just haven't made them available anywhere, because when I get the time I'll probably redo the encode entirely), but that's more because my computer is downright ancient and takes forever to encode, most of the videos I've been editing lately are shorts that I intend to put into a larger compilation, and my editing pace is at a crawl anyway.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
- Zero1
- Joined: Fri Jan 02, 2004 12:51 pm
- Location: Sheffield, United Kingdom
- Contact:
http://aflux.deltaanime.net/Zero1/MP4/x264.html
Mostly complete but not polished up. I basically need to check that I haven't said anything misleading (I started writing this guide in something like November 2005) and that what I say makes sense (haven't even proof read it yet).
It covers encoding of video to H.264 using x264. You will have to check out audio encoding yourself, but I advise you use LC-AAC, and for that, iTunes is one of the best encoders (believe it or not). If you have the Nero burning ROM suite, that also has an AAC encoder, but do not use high efficiency. It's sort of false economy. It leads you to think it uses some advanced compression features, but it basically cuts the audio at 22.05KHz or 24KHz (depending on whether the source is 44.1 or 48KHz) and interpolates/reconstructs on playback. Often it sounds like the midrange is missing to me.
So when you have your audio and x264 script/batch, you will need to mux using mp4box. The most simple command line is:
Remember to change the FPS to what suits your video. You can also do stuff like name the tracks by adding:
Similarly, if you are adventurous enough to try anamorphic editing/encoding, here you can specify the aspect ratio too. It works in a similar way to adding the name to the track:
Also you can define the language of the tracks, say for instance you have Japanese audio, or for a multi track video, you can give each track it's own language. This is done in a similar way:
To add multiple tracks, it's simple. Just put an "-add" line in for the track you want to include, for example;
Now we can put these together. Just like in my guide, it's as simple as building something with Lego. The final product can be huge and complex, but if you handle it a brick at a time and build it up in steps, it's easy. These commands for naming tracks etc, essentially stack up on eachother. If we put the whole command line together now, it might look like this:
Now a couple of tips. If you followed my guide and put your files to be encoded/muxed in the same folder as mp4box and x264, then you can use short filenames, otherwise you need to specify the full path when muxing, for example:
Also if you did store the files in the same place as mp4box, but do not have spaces in the filenames, you can refer to the files without the "":
I use batches a lot, but for muxing I tend to type the mp4box command by hand. Another tip is that in your command shell you can begin to type the first few letters of the filename and press tab for completion (just like in IRC for peoples nicknames). If you get the wrong file, just tab again to cycle through the matches.
Any problems contact me in the #AMV IRC channel. Any comments, complaints, suggestions are greatly appreciated. Either way, should you do this, I'd like to hear how you went on.
If however you use some of the examples I wrote here and you find they don't work, don't be too surprised, I wrote this off the top of my head without referring to mp4box, but it should be accurate. To view all the options in mp4box, type:
Mostly complete but not polished up. I basically need to check that I haven't said anything misleading (I started writing this guide in something like November 2005) and that what I say makes sense (haven't even proof read it yet).
It covers encoding of video to H.264 using x264. You will have to check out audio encoding yourself, but I advise you use LC-AAC, and for that, iTunes is one of the best encoders (believe it or not). If you have the Nero burning ROM suite, that also has an AAC encoder, but do not use high efficiency. It's sort of false economy. It leads you to think it uses some advanced compression features, but it basically cuts the audio at 22.05KHz or 24KHz (depending on whether the source is 44.1 or 48KHz) and interpolates/reconstructs on playback. Often it sounds like the midrange is missing to me.
So when you have your audio and x264 script/batch, you will need to mux using mp4box. The most simple command line is:
Code: Select all
mp4box -add "video.264" -add "audio.aac" -fps 23.976 "output.mp4"
Code: Select all
:name="Name of track"
Code: Select all
:sar=40:33
Code: Select all
:lang=eng or :lang=jpn
Code: Select all
mp4box -add "video.264" -add "audioeng.aac" -add "audiojpn.aac" -fps 23.976 "output.mp4"
Code: Select all
mp4box -add video.264:par=40:33:lang=jpn:name="H.264 High Profile - 16/9" -add audioeng.aac:lang=eng:name="LC-AAC Stereo" -add audiojpn.aac:lang=jpn:name="LC-AAC Stereo"-fps 23.976 output.mp4
Now a couple of tips. If you followed my guide and put your files to be encoded/muxed in the same folder as mp4box and x264, then you can use short filenames, otherwise you need to specify the full path when muxing, for example:
Code: Select all
mp4box -add "E:\AMV\encodes\video.264" -add "E:\AMV\encodes\audio.aac" -fps 23.976 "E:\AMV\encodes\output.mp4"
Code: Select all
mp4box -add video.264 -add audio.aac -fps 23.976 output.mp4
Any problems contact me in the #AMV IRC channel. Any comments, complaints, suggestions are greatly appreciated. Either way, should you do this, I'd like to hear how you went on.
If however you use some of the examples I wrote here and you find they don't work, don't be too surprised, I wrote this off the top of my head without referring to mp4box, but it should be accurate. To view all the options in mp4box, type:
Code: Select all
mp4box -h all
7-zip // x264 (Sharktooth's builds) // XviD (Koepi's builds) // MP4box (celtic_druid's builds) // Firefox // CCCP
- Jnzk
- Artsy Bastid
- Joined: Tue Jan 28, 2003 5:30 pm
- Location: Finland