forum

[Guide] How to create High Quality/Size Videos

posted
Total Posts
60
show more
Topic Starter
blissfulyoshi
Well if your computer can't process the amount of data the video is giving it, the video will stutter (also osu!'s video playback is not very optimized)
xxdeathx
i don't think this works anymore, avidemux always crashes when i try to save video. i've used combinations of different settings but none of them work.
Topic Starter
blissfulyoshi
I know I had newer versions of avidemux crash on me, so I stayed on 2.6.3 which has been working for me. I'll probably try upgrading again soon, but it is not a high priority for me.
xxdeathx
Now I use Freemake Video Converter to grab both mp3 and video from the original episode. It's a lot user friendlier than Avidemux, it never crashes, and I can't tell the video quality difference.
Rizumu Tenshi
I've got a YTPMV and I could mute all audio in 2.6.1 but then...

Video Output is H.264 but the configuration puush is no longer available it seems, can you repuush it or tell me how to configure it myself? I don't get bored when configuring the settings myself.
Topic Starter
blissfulyoshi
The puush link only has the manual configuration for 2.5. If you want the configuration for 2.6. It is much easier for you download the scripts in step 2, run it, and then save the H.264 configuration. (I need to update this guide someday, but I am not exactly feeling motivated)
Rizumu Tenshi
Oh my. This saved me time, even though I had to keep it 720p and at a size of 13 MB (quality slider at 26). Thank you very much~ :)
Alians

blissfulyoshi wrote:

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.
Special Thanks
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
Why should you use this guide?
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
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 http://puu.sh/ZePP . 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)
5. Save Video:
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
Topic Starter
blissfulyoshi
I just made a minor update to the guide to tell people how handle 10-bit content. I hope in the future that AVIdemux will be able to handle it, but for now, I included a ffmpeg script to be throw in a .bat file to solve the issue.

Also, as the filesize limit increases, I added a bit to the faq to tell you how to use that new file space.
BeatofIke
Cool 8-)
happy30
just rename the extension from mp4 to avi and it will work in osu
Redon
Topic Starter
blissfulyoshi
Sorry about that, I'll fix up the guide soon, but I probably need to do some rewriting for h.265 (admittedly I couldn't get decent results with it on my side, so I need to find time to play around some more).
Phoenix7474
Does this method work for videos on youtube? :D
Phoenix7474
"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)"


I have a question, I couldn't find the file, "AnimationSimple.txt" in my 2.6, can you help me out on this?
Topic Starter
blissfulyoshi
At the moment, the script links are down. I need to motivate myself to actually make them again and rewrite parts of the guide. Sorry about that.
Phoenix7474
That's OK, can you tell me when you will rewrite the parts of the guide? Because I need the video for my beatmap. :/, and I would like to get my beatmap ranked or at least bubbled ASAP.
Topic Starter
blissfulyoshi
I don't know when, so for now, send me a pm with a link to your video, and I'll take care of it.
Phoenix7474
Alright. Here it is! https://www.youtube.com/watch?v=goj15DnQNTw

Sorry I didn't send it earlier, I didn't notice there was a new page and I was still on page 3.
Phoenix7474
I need help with encoding another video for my latest beatmap, if you haven't updated your guide yet, could you please help me? Much appreciated! :D
Topic Starter
blissfulyoshi
Well the scripts are all working, so feel free to try it yourself. I personally have no motivation to update this guide for now or the forseeable future.
Phoenix7474
Wait, I forgot how you're supposed to do it with youtube videos, it's been so long since I tried downloading a youtube video. How to you make different difficulties for a song? No one even spends 2 seconds looking at my latest song unless it has 2 difficulties, and I don't know how to go about making different difficulties while still keeping the rhythm, could you help me out?
Topic Starter
blissfulyoshi

Phoenix7474 wrote:

Wait, I forgot how you're supposed to do it with youtube videos, it's been so long since I tried downloading a youtube video. How to you make different difficulties for a song? No one even spends 2 seconds looking at my latest song unless it has 2 difficulties, and I don't know how to go about making different difficulties while still keeping the rhythm, could you help me out?
This thread is not for mapping help, if you need help, read a guide (t/122533) or ask in #modhelp
[OMG] WebCideR
Hey thanks for the guide

i am wondering would it be possible to add like Scanlines in your videos, because of low Resolution in osu it would look much prettier if you put in scanlines
like they have done in DJ Max Trilogy on new patched Videos.

Cheers

Some examples:

Without Scanlines:




Yes i know steam compression is horrible...
Topic Starter
blissfulyoshi
Well anyone with the software can add scanlines themselves, but I'll do some research into it later when I feel like it (not really in the mood to do video stuff these days)
[OMG] WebCideR
Thanks for keeping it in mind,
I am interested in this because I would like to start creating my own beat maps soon :D
JapanYoshiTheGamer
Hey, can you rewrite this guide? You know, so that it actually works.

EDIT: Please add a tutorial that uses Handbrake. Avidemux is a piece of shit.
JapanYoshiTheGamer
What are the configuration settings for "Quality 5"? Your configuration files return a 404, and some people may want to configure by hand regardless.
Poivila_qwq
um...

I can't download the script...
It said it had been moved or deleted qwq

can someone give me a link that's available? ;w;
DiceSA
All of the necessary resources in this guide are no longer available, making even the manual process useless. Would anyone be able to update this guide?
Atari-2600
I've made my own setting presets for the Mpeg4 AVC (x264) encoder. To use them, save each file as text files named "Animation 14mb.json" and "Live Footage 14mb.json" respectively. Copy these into "C:\Users\[your user name]\AppData\Roaming\avidemux\pluginSettings\x264\3".

In Avidemux, select Mpeg4 AVC (x264) as your encoder and click Configure. At the top you can select your Configuration, choose Live Footage or Animation depending on your content. Click OK.

Then click Filters and find the resolution scaler (probably swsResize if you've got Avidemux 2.7.0). I like to go around 800x450 so the video is a bit smoother, but 845x480 for a native 16:9 aspect video also works fine. 640x360 if you really want to save some space.

It's already set to use File Size to determine bitrate so it shouldn't go over 14mb however this can usually be put down way lower without noticeable artifacts. I've been able to compress some live footage content down to just 7mb and have it look identical to a 14mb version (to me at least).

Live Footage 14mb.json
{
"useAdvancedConfiguration" : true,
"general" : {
"params" : "2PASS=13",
"threads" : 0,
"preset" : "ultrafast",
"tuning" : "none",
"profile" : "baseline",
"fast_decode" : false,
"zero_latency" : false,
"fast_first_pass" : true,
"blueray_compatibility" : false,
"fake_interlaced" : false
},
"level" : -1,
"vui" : {
"sar_height" : 1,
"sar_width" : 1
},
"MaxRefFrames" : 3,
"MinIdr" : 25,
"MaxIdr" : 250,
"i_scenecut_threshold" : 38,
"intra_refresh" : false,
"MaxBFrame" : 5,
"i_bframe_adaptive" : 2,
"i_bframe_bias" : 0,
"i_bframe_pyramid" : 2,
"b_deblocking_filter" : true,
"i_deblocking_filter_alphac0" : 0,
"i_deblocking_filter_beta" : 0,
"cabac" : true,
"interlaced" : false,
"constrained_intra" : false,
"tff" : true,
"fake_interlaced" : false,
"analyze" : {
"b_8x8" : true,
"b_i4x4" : true,
"b_i8x8" : true,
"b_p8x8" : false,
"b_p16x16" : true,
"b_b16x16" : true,
"weighted_pred" : 2,
"weighted_bipred" : true,
"direct_mv_pred" : 3,
"chroma_offset" : 0,
"me_method" : 2,
"me_range" : 24,
"mv_range" : -1,
"mv_range_thread" : -1,
"subpel_refine" : 7,
"chroma_me" : true,
"mixed_references" : true,
"trellis" : 2,
"psy_rd" : 1,
"psy_trellis" : 0.1,
"fast_pskip" : false,
"dct_decimate" : true,
"noise_reduction" : 0,
"psy" : true,
"intra_luma" : 11,
"inter_luma" : 21
},
"ratecontrol" : {
"rc_method" : 0,
"qp_constant" : 0,
"qp_min" : 10,
"qp_max" : 51,
"qp_step" : 4,
"bitrate" : 0,
"rate_tolerance" : 1,
"vbv_max_bitrate" : 0,
"vbv_buffer_size" : 0,
"vbv_buffer_init" : 1,
"ip_factor" : 1.4,
"pb_factor" : 1.3,
"aq_mode" : 1,
"aq_strength" : 1,
"mb_tree" : true,
"lookahead" : 50
}
}

Animation 14mb.json
{
"useAdvancedConfiguration" : true,
"general" : {
"params" : "2PASS=13",
"threads" : 0,
"preset" : "ultrafast",
"tuning" : "none",
"profile" : "baseline",
"fast_decode" : false,
"zero_latency" : false,
"fast_first_pass" : true,
"blueray_compatibility" : false,
"fake_interlaced" : false
},
"level" : -1,
"vui" : {
"sar_height" : 1,
"sar_width" : 1
},
"MaxRefFrames" : 16,
"MinIdr" : 25,
"MaxIdr" : 250,
"i_scenecut_threshold" : 38,
"intra_refresh" : false,
"MaxBFrame" : 8,
"i_bframe_adaptive" : 2,
"i_bframe_bias" : 0,
"i_bframe_pyramid" : 2,
"b_deblocking_filter" : true,
"i_deblocking_filter_alphac0" : 1,
"i_deblocking_filter_beta" : 2,
"cabac" : true,
"interlaced" : false,
"constrained_intra" : false,
"tff" : true,
"fake_interlaced" : false,
"analyze" : {
"b_8x8" : true,
"b_i4x4" : true,
"b_i8x8" : true,
"b_p8x8" : false,
"b_p16x16" : true,
"b_b16x16" : true,
"weighted_pred" : 2,
"weighted_bipred" : true,
"direct_mv_pred" : 3,
"chroma_offset" : 0,
"me_method" : 2,
"me_range" : 24,
"mv_range" : -1,
"mv_range_thread" : -1,
"subpel_refine" : 7,
"chroma_me" : true,
"mixed_references" : true,
"trellis" : 2,
"psy_rd" : 0.4,
"psy_trellis" : 0,
"fast_pskip" : false,
"dct_decimate" : true,
"noise_reduction" : 0,
"psy" : true,
"intra_luma" : 11,
"inter_luma" : 21
},
"ratecontrol" : {
"rc_method" : 0,
"qp_constant" : 0,
"qp_min" : 10,
"qp_max" : 51,
"qp_step" : 4,
"bitrate" : 0,
"rate_tolerance" : 1,
"vbv_max_bitrate" : 0,
"vbv_buffer_size" : 0,
"vbv_buffer_init" : 1,
"ip_factor" : 1.4,
"pb_factor" : 1.3,
"aq_mode" : 1,
"aq_strength" : 0.6,
"mb_tree" : true,
"lookahead" : 50
}
}
Kittylila
Everything was okay for me, (I did it manually) but when I read the file it came out bigger than my original file (and I had already taken out the audio, original mp4 file was 25MB and the encoded was almost 80MB
Please sign in to reply.

New reply