Purpose:
This is a guide to teach people how to reencode videos to acheive the highest quality possible while keeping the filesize low, regardless of the scenario.
This guide is simple and will give you better results than many other encoding methods. For samples of what this encoding method can do, check out http://osu.ppy.sh/s/41379 http://osu.ppy.sh/s/69992 and http://osu.ppy.sh/s/68504 (this map is very long so quality took a hit)
Required Items:
Avidemux 2.5 or 2.6 32bit (Avidemux 2.5 and 2.6 require slightly different steps, so I have notes for both 2.5 and 2.6)
A high quality source
A fast computer or a lot of time (Please do not underestimate the amount of processing power this will take.)
Steps:
1. Select the section of the video you want to encode:
To do this, there is an A and a B at the bottom of the screen. Navigate to the first frame you want to start the video from and press the A. Then go to the last frame and press the B. Since it is difficult to get to the exact frame, use the arrow keys on your keyboard to go travel frame by frame. (Reference: http://www.avidemux.org/admWiki/doku.ph ... ng:cutting)
From here, you can keep on following the easy way, or skip down to the spoilerbox to do things the long way.
2. Save the scripts (2.5 2.6) and unzip them somewhere.
3. Run the Scripts
2.5: Press File->Load/Run Project
2.6: Press File->Tinypy Project->Run Project
Regardless of which avidemux you have, select the file you are told to use by the following questionaire.
Are you dealing with real life footage or animated material?
If real life footage, use RealLife.txt
If animated, is the video of decent quality , or do you want the edges of sprites to be shaper?
If the video is of decent quality, use AnimationSimple.txt
(2.5 only) If the video has slightly fuzzy edges, use AnimationFilter1.txt or AnimationFilter2.txt (Beware, these filters will increase your video encoding time a lot and can introduce artifacts) (Also, due to missing filters in Avidemux 2.6, these are not available in the 2.6 package)
4. Resize to correct dimensions for osu!
Wait 30s and then press filters in the top leftish area, and select the Resize filter from the rightmost list. From there, click on the Configure button on the bottom right of the window and then configure the resolution to your hearts content (480p is the usual one). (Pictures are in Step 4 in the spoilerbox below)
*If filesize is too large or quality is too low then adjust quality slider as talked about in step 3 in the spoilerbox below
File->Save->Save Video... or Ctrl+S, and then name your video as whatever_you_want.avi
6. Check video over:
Open your reencoded video file. Does it meet all of your demands? Are there random artifacts, oversmoothing, oversharpening, or something else that bothers you? If have those symptoms please start over and use AnimationSimple.txt or play around with the filters till you get your desired look.
Conclusion:
There you have it. At this point you should have a high quality video that fits all the specifications for osu!. If you want to experiment more on your own feel free to do so. I know this set of filters is not perfect for every scenario, but I am sure you get something decent out of this. If you want to suggest something better, feel free to do so. If for some reason you are not satisfied with the filters available in Avidemux, research ffmpeg and use that to encode.
FAQ:
My output video is longer/shorter than my original. What do I do to fix it?
This is what happens when the frame rate of your video is not 23.97 FPS. To fix this, go to video->frame rate... and uncheck "Use custom value." Now change the standard frame rate to the frame rate of your video. Usually the answer is NTSC - 30FPS
My video is 10-bit (creating a green screen in Avidemux), how do I make Avidemux to be able to play it?
For this, you need ffmpeg, so install that, and in the bin folder make a .bat file with the following code.
I want a higher CRF, but my filesize won't permit it. What can I do?
In this case, I advise you apply a softening/blur filter , these will decrease fileize in exchange forchanging the image itself, allowing you to increase the crf.
How do I make details in my video pop be cleaner, be more evident?
In this case, use a sharpening filter like Msharpen to make everything that much more defined. I noticed that this helps a lot of TV broadcasted versions look better. (Beware this does increase filesize).
This is a guide to teach people how to reencode videos to acheive the highest quality possible while keeping the filesize low, regardless of the scenario.
Special Thanks
Why should you use this guide?Before I begin, I want to express special thanks to 3 people:
ziin: He kicked off the Avidemux guides and created a lot of the basis which I will work off today. I copied over quite a few of his pictures without asking for permission, so (Guide: http://osu.ppy.sh/forum/viewtopic.php?f=56&t=58235)
ampzz: He taught me a lot on filters and helped me constantly test out filter combinations. I am probably forgetting a lot of other things he did for me, but at least, let me say thanks for everything.
Miya: Tested the various revisions of the guide for me, and forced me to continue to improve ths guide. I don't think this guide would have been updated it is wasn't for him/her
ziin: He kicked off the Avidemux guides and created a lot of the basis which I will work off today. I copied over quite a few of his pictures without asking for permission, so (Guide: http://osu.ppy.sh/forum/viewtopic.php?f=56&t=58235)
ampzz: He taught me a lot on filters and helped me constantly test out filter combinations. I am probably forgetting a lot of other things he did for me, but at least, let me say thanks for everything.
Miya: Tested the various revisions of the guide for me, and forced me to continue to improve ths guide. I don't think this guide would have been updated it is wasn't for him/her
This guide is simple and will give you better results than many other encoding methods. For samples of what this encoding method can do, check out http://osu.ppy.sh/s/41379 http://osu.ppy.sh/s/69992 and http://osu.ppy.sh/s/68504 (this map is very long so quality took a hit)
Required Items:
Avidemux 2.5 or 2.6 32bit (Avidemux 2.5 and 2.6 require slightly different steps, so I have notes for both 2.5 and 2.6)
A high quality source
A fast computer or a lot of time (Please do not underestimate the amount of processing power this will take.)
Steps:
1. Select the section of the video you want to encode:
To do this, there is an A and a B at the bottom of the screen. Navigate to the first frame you want to start the video from and press the A. Then go to the last frame and press the B. Since it is difficult to get to the exact frame, use the arrow keys on your keyboard to go travel frame by frame. (Reference: http://www.avidemux.org/admWiki/doku.ph ... ng:cutting)
From here, you can keep on following the easy way, or skip down to the spoilerbox to do things the long way.
2. Save the scripts (2.5 2.6) and unzip them somewhere.
3. Run the Scripts
2.5: Press File->Load/Run Project
2.6: Press File->Tinypy Project->Run Project
Regardless of which avidemux you have, select the file you are told to use by the following questionaire.
Are you dealing with real life footage or animated material?
If real life footage, use RealLife.txt
If animated, is the video of decent quality , or do you want the edges of sprites to be shaper?
If the video is of decent quality, use AnimationSimple.txt
(2.5 only) If the video has slightly fuzzy edges, use AnimationFilter1.txt or AnimationFilter2.txt (Beware, these filters will increase your video encoding time a lot and can introduce artifacts) (Also, due to missing filters in Avidemux 2.6, these are not available in the 2.6 package)
4. Resize to correct dimensions for osu!
Wait 30s and then press filters in the top leftish area, and select the Resize filter from the rightmost list. From there, click on the Configure button on the bottom right of the window and then configure the resolution to your hearts content (480p is the usual one). (Pictures are in Step 4 in the spoilerbox below)
*If filesize is too large or quality is too low then adjust quality slider as talked about in step 3 in the spoilerbox below
For those that want to do things manually
5. Save Video:Below are the steps to do things manually in 2.5, but the steps in 2.6 are very similar, so you should be able to follow along fairly easily.
2. Remove the Audio from the video:
ziin's guide (http://osu.ppy.sh/forum/viewtopic.php?f=56&t=58235) outlines this very well, so I advise you just follow his instructions.
3. Select the Video encoder to be MPEG-4 AVC and configure it:
2.5 2.6
As stated, click on the pull down menu and change it to " MPEG-4 AVC." Afterward, press on the "Configure" button below. You will be greeted with a screen that has bunches of tabs, options and what not.
I know none of you want to deal with configuring this, so here are some preconfigured settings 2.6. Place this file in C:\Users\<username>\AppData\Roaming\avidemux\x264 . If for some reason you cannot save the file from that page as a .xml file. Create a .xml file in the location specified and copy the lines in.
With the file in place, click on the top of the page and scroll down to select the name of the .xml file added (if you used mine, it is "quality 5"). With that we are done with configuration (that was easy), but if the filesize is too big or you want to push out more quality, feel free to adjust the quality slider on that page to your hearts desire. Afterward, just make sure to press "Ok."
4. Applying filters:
There are plenty of filters to choose from, so here is the set of filters I used for one of anime filter sets. Feel free to adjust the filters to suit your needs.
To start off this process, press the "Filter" button under Video as shown above.
Now apply the following filters in the order listed:
(Format: Category > Filter)
Sharpness > MSmooth by Donald Graft: High Quality, Threshold: 15, Strength: 3
Noise > MPlayer hqdn3d: stock settings (settings it starts with)
Sharpness > asharp: Threshold: 2.00, Strength: 2.00, Block Adaptive: -1.00, Do not check High Quality Block Filtering
Sharpness > MSmooth by Donald Graft: High Quality, Threshold: 15, Strength: 1 (to clean up oversharpening)
Noise > Cnr2: stock settings
Noise > FluxSmooth: Temporal Threshold: 8, Spatial Threshold: 8
Noise > Temporal Cleaner: Luna Temporal Threshold: 5, Chroma Temporal Threshold: 0
Transform > Resize: Whatever resolution you want that fits osu! standards, but I do recommend Lanzcos3 as your "Resize Method" (If you want a slight speed boost, switch to MPlayer resize)
2. Remove the Audio from the video:
ziin's guide (http://osu.ppy.sh/forum/viewtopic.php?f=56&t=58235) outlines this very well, so I advise you just follow his instructions.
3. Select the Video encoder to be MPEG-4 AVC and configure it:
2.5 2.6
As stated, click on the pull down menu and change it to " MPEG-4 AVC." Afterward, press on the "Configure" button below. You will be greeted with a screen that has bunches of tabs, options and what not.
I know none of you want to deal with configuring this, so here are some preconfigured settings 2.6. Place this file in C:\Users\<username>\AppData\Roaming\avidemux\x264 . If for some reason you cannot save the file from that page as a .xml file. Create a .xml file in the location specified and copy the lines in.
With the file in place, click on the top of the page and scroll down to select the name of the .xml file added (if you used mine, it is "quality 5"). With that we are done with configuration (that was easy), but if the filesize is too big or you want to push out more quality, feel free to adjust the quality slider on that page to your hearts desire. Afterward, just make sure to press "Ok."
4. Applying filters:
There are plenty of filters to choose from, so here is the set of filters I used for one of anime filter sets. Feel free to adjust the filters to suit your needs.
To start off this process, press the "Filter" button under Video as shown above.
Now apply the following filters in the order listed:
(Format: Category > Filter)
Sharpness > MSmooth by Donald Graft: High Quality, Threshold: 15, Strength: 3
Noise > MPlayer hqdn3d: stock settings (settings it starts with)
Sharpness > asharp: Threshold: 2.00, Strength: 2.00, Block Adaptive: -1.00, Do not check High Quality Block Filtering
Sharpness > MSmooth by Donald Graft: High Quality, Threshold: 15, Strength: 1 (to clean up oversharpening)
Noise > Cnr2: stock settings
Noise > FluxSmooth: Temporal Threshold: 8, Spatial Threshold: 8
Noise > Temporal Cleaner: Luna Temporal Threshold: 5, Chroma Temporal Threshold: 0
Transform > Resize: Whatever resolution you want that fits osu! standards, but I do recommend Lanzcos3 as your "Resize Method" (If you want a slight speed boost, switch to MPlayer resize)
File->Save->Save Video... or Ctrl+S, and then name your video as whatever_you_want.avi
6. Check video over:
Open your reencoded video file. Does it meet all of your demands? Are there random artifacts, oversmoothing, oversharpening, or something else that bothers you? If have those symptoms please start over and use AnimationSimple.txt or play around with the filters till you get your desired look.
Conclusion:
There you have it. At this point you should have a high quality video that fits all the specifications for osu!. If you want to experiment more on your own feel free to do so. I know this set of filters is not perfect for every scenario, but I am sure you get something decent out of this. If you want to suggest something better, feel free to do so. If for some reason you are not satisfied with the filters available in Avidemux, research ffmpeg and use that to encode.
FAQ:
My output video is longer/shorter than my original. What do I do to fix it?
This is what happens when the frame rate of your video is not 23.97 FPS. To fix this, go to video->frame rate... and uncheck "Use custom value." Now change the standard frame rate to the frame rate of your video. Usually the answer is NTSC - 30FPS
My video is 10-bit (creating a green screen in Avidemux), how do I make Avidemux to be able to play it?
For this, you need ffmpeg, so install that, and in the bin folder make a .bat file with the following code.
FOR %%A IN (*.mkv) Do (ffmpeg -i "%%A" -sn -vcodec libx264 -crf 13 -acodec copy "8bit_%%A")Now, move the mkv file to bing folder, and press the .bat file. This will convert your file to a 8-bit file that can be read by Avidemux. (I know crf 13 is a bit overkill, but I wanted it to be as close to lossless in comparison to the source file.)
I want a higher CRF, but my filesize won't permit it. What can I do?
In this case, I advise you apply a softening/blur filter , these will decrease fileize in exchange forchanging the image itself, allowing you to increase the crf.
How do I make details in my video pop be cleaner, be more evident?
In this case, use a sharpening filter like Msharpen to make everything that much more defined. I noticed that this helps a lot of TV broadcasted versions look better. (Beware this does increase filesize).