What you need is:
1. Handbrake (download it here) Download and install
2. Bitrate calculator (You can google it) I used the website here.
First, what we need to encode the video is the length and the audio bit rate. Just right click the video you want to encode and click properties. Go to Details tab and find length and audio bit rate
As shown in the picture, my length is 2 hours 04 minutes and 56 seconds or it shown as 2:04:56. My audio bit rate is 381kbps.
Then, go to the online bitrate calculator or any bitrate calculator you are using and fill the required infos.
I filled hours, minutes, seconds and audio bitrate with the info I get from just now. Then, 'MB required' is how big the video you want it to be. My video that I want to encode now is around 1.4Gb and I want to encode it to 500Mb size, so I put 500 there. Press 'Calculate' and take note of 'DivX 5/x264' avg bitrate which is stated there after calculation is 59
Then open your Handbrake software. Press 'Source' and click the video you want to encode
Then, go to 'Video' tab, click Avg Bitrate and filled it with the calculation bitrate which in my case is 159. Tick both '2-pass Encoding' and 'Turbo fist Pass' because I found out the video quality is better when you do 2-Pass Encoding (or is it just my opinion? XD XD)
Next, go to 'Audio' tab and depending on your choices but I prefer the audio rate to 128kbps, so I change it to 128kbps.
Then, press 'Start' and wait for it to finish encoding. Usually, I will do all of the above step but I didn't press start but I 'Add to Queue' and after I done about 5 - 10 videos, I will start encoding when I go to sleep or work.
You can see the progress down there. Anyway, I didn't really take note how long it take to encoding one video but I think as usual, it is depending on your computer.
I am not a professional and I am so noob regarding computer hardware and performances but I just wanna help.
And I make this tutorial to help my loveable junior. Atiqah, learn it well, learn it well.... XD XD
Sometimes you might be failed because the audio rate is like 1224kbps
And your video length is like 43 minutes
And you can't count the bitrate because it says it is not possible to count the bitrate if you want to encode it to 300Mb
That, when it happen, it might happen to you, I can't help you because I can't figure it out either... >.<