My answer to this question: How can I maximum compress video files? may be helpful for your case. In this answer I talk about Miksoft's Mobile Media Converter, but there are a few alternatives to this task which can easily be reached over the net.
Anyway, Mobile Media Converter will only work for 32 bit version OS's. And for both 32/64 bit version I suggest you to give a chance to
And there are some other useful Transcoding Software, which includes Non Linear Editing Systems like those mentioned on the answers to this question: What is an easy video editor? and command line using ffmpeg.
Nevertheless, the trick isn't in the software itself but the way you make your videos.
You must pay special attention to the Audio and Video Bitrates, which determines both the quality and file size for the resulting transcoded videos and remember that the higher bitrate will result in a higher quality but it will also drop "heavy" file sizes.
You should run as many tests as you need in order to feel comfortable with both the resulting quality and file size.
There is no a pre-defined set of parameters which will do always the same for your videos when you are trying to save something, let's say: quality and file size, or in the worst case: both them.
There is no such "magic codec" that will result in a better quality with small file sizes. Take in consideration that you could have a mpeg1 video file (VCD) with a high bitrate looking better than an mp4 video file with a lower bitrate.
The FileInfo.com webpage related to "Video Formats" provides an extensive and really comprehensive list of video formats, its available software which can be used to play each one and the "popularity".
You may also wish to take a look to the "Digital Container format" and the table of "Comparison of container formats".
Good luck!
Softsubs
MP4 supports streaming text format subtitles, but playback support for this among players and devices is not universal.
Basic example using default stream selection behavior while stream copying the audio:
ffmpeg -i input.mkv -c copy -c:s mov_text output.mp4
Example to stream copy all of the video and audio streams, convert the all text based subtitle input streams (SRT, ASS, VTT, etc) to the streaming text format, and set the language for the first two subtitle streams.
ffmpeg -i input.mkv -map 0 -c copy -c:s mov_text -metadata:s:s:0 language=eng -metadata:s:s:1 language=ipk output.mp4
Same as above but re-encode the video and audio to formats compatible with the MP4 container (H.264 video:
ffmpeg -i input.mkv -map 0 -c:v libx264 -c:a aac -c:s mov_text -metadata:s:s:0 language=eng -metadata:s:s:1 language=ipk output.mp4
Same as above but use the -map
option to choose the first video stream, second audio stream, and third subtitle stream:
ffmpeg -i input.mkv -map 0:v:0 -map 0:a:1 -map 0:s:2 -c:v libx264 -c:a aac -c:s mov_text -metadata:s:s:0 language=eng output.mp4
Hardsubs
Text based subtitle format inputs
Use the subtitles filter to "burn-in" text based subtitle formats (SRT, ASS, VTT, etc). Note that this requires re-encoding, so it will by much slower than using softsubs.
Basic example using default stream selection behavior while stream copying the audio:
ffmpeg -i input.mkv -filter_complex "subtitles=input.mkv" -c:a copy output.mp4
Example to use the third video stream, fifth subtitle stream, and first audio stream:
ffmpeg -i input.mkv -filter_complex "[0:v:2]subtitles=input.mkv:si=4[v]" -map "[v]" -map 0:a:0 -c:a copy output.mp4
Example for a separate subtitle input file (your-subtitles-file.srt
):
ffmpeg -i input.mp4 -filter_complex "subtitles=your-subtitles-file.srt" -c:a copy output.mp4
Image based subtitle format inputs
Use the overlay filter. This example will overlay the fourth subtitle stream over the second video stream, and stream copy the seventh audio stream:
ffmpeg -i input.mkv -filter_complex "[0:v:2][0:s:3]overlay[v]" -map "[v]" -map 0:a:6 -c:a copy output.mp4
Also see
Best Answer
Going from 100mb to 10mb is a slightly unrealistic 90% drop in size but I will give an example of reducing to 50mb creating an H.264 video, which is a more reasonable 50% reduction in size as well as reducing to 40mb using HEVC.
I am using the following sample file:
You can use this sample file to confirm the following results that I have given and perhaps experiment a little further yourself. MediaInfo reveals the following for this downloaded file:
The arrows of course are my own! You then perhaps have 2 really good choices:
1. Re-Encode to H.264 (50mb)
H.264 is widely accepted now and would be an excellent choice for your output video file. The formula to calculate the output bitrate for the desired 50mb would then be:
To accomplish this use the following FFmpeg 2 pass command:
The resulting file size is 49.4MiB with quite reasonable, but not amazing, viewing quality. Pretty good for a 50% reduction in file size and a huge drop in video bitrate actually!
2. Re-encode to HEVC (40mb)
Another choice (as suggested by emk2203) is to re-encode the existing HEVC stream with a lower bitrate, this time aiming for 40mb as HEVC claims better quality at a lower bitrate.
This time the formula would be:
and the FFmpeg 2 pass command line is:
And this provides a 40mb file with quite reasonable quality.
In conclusion:
From these example you can experiment further by decreasing the required MiB in the formula and observing the subsequent viewing quality. Have Fun!!
References: