Down and dirty (foss) video compression software?
It's not that difficult. First of all MP4, MKV, AVI, WebM, VOB[...] are container formats that stores the video und audio streams, subtitles etc.
Different containers support different video codecs such as AVC/h.264, HEVC/h.265, VP8, VP9, AV1, MPEG-2, XviD.
For example x264 is an software encoder for h.264 and x265 is an software endcoder for h.265.
To check whats inside a container simply user the tool called Mediainfo. It will give you all important information about bitrate, framerate, resolution, codec etc.
sudo eopkg install mediainfo
Just open a video file with the GUI and switch to text view or use it with the terminal
mediainfo [path videofile]
The reason your output video got a bigger size then your source video is because it was already encoded with a pretty high quantizer. A high quantizer means high compression. So to shrink it even more you need an unusal high quantization. x264 and x265 control this with the constant(quality) rate factor(CRF) in Handbrake. A higher CRF will shrink the video more and of course decreases the quality. The Bitrate is the only thing that affects the size of an video.
If your video is 50Mb and has a duration of 5 minutes it's bitrate will be ~ 1300kbps(minus bitrate for the audio stream) which is already pretty low. For example DVDs usually have an average video bitrate of ~ 6000kbps. (but use a very very outdated codec)
With a modern codec like h.265 or VP9 or AV1 it could be possible to reduce the size about 50% (depents on the source and it's amount of grain, noise and motion) but shrinking it to 10Mb will definitely destroy the picture quality way too hard.
To shrink an video to a preferred file size I would recommend to use one or better multipass encoding with an fixed average bitrate. (can be done in Handbrake too).
Another very good video editing and transcoding tool is Avidemux.
User_007 The reason your output video got a bigger size then your source video is because it was already encoded with a pretty high quantizer. A high quantizer means high compression. So to shrink it even more you need an unusal high quantization. x264 and x265 control this with the constant(quality) rate factor(CRF) in Handbrake. A higher CRF will shrink the video more and of course decreases the quality. The Bitrate is the only thing that affects the size of an video.
If your video is 50Mb and has a duration of 5 minutes it's bitrate will be ~ 1300kbps(minus bitrate for the audio stream) which is already pretty low. For example DVDs usually have an average video bitrate of ~ 6000kbps. (but use a very very outdated codec)
With a modern codec like h.265 or VP9 or AV1 it could be possible to reduce the size about 50% (depents on the source and it's amount of grain, noise and motion) but shrinking it to 10Mb will definitely destroy the picture quality way too hard.To shrink an video to a preferred file size I would recommend to use one or better multipass encoding with an fixed average bitrate. (can be done in Handbrake too).
Another very good video editing and transcoding tool is Avidemux.
d-a-a-a-a-a-a-amn.
" one or better multipass encoding with an fixed average bitrate. (can be done in Handbrake too)." let me figure this part out (I will) and take another run at it later. I love the days when I get an education or a flashlight shined better on what I think I know.
- Edited
User_007 98-2004 was my video period with final cut pro did not do anything with it
after that (And everything now is alot different) We did cd and vcr and for our outdoor channel
(I was always working with raw camera footage tho)
Makes me realize how much I forgot tho heck 25yrs older to..
That was my point earlier was not sure how much was left to shrink.
I was doing that with a youtube clip I saved early this morning it was H.264 already was ending up bigger..lol
I was trying different fixed bitrates but was ending up larger file size never tried the 2pass.
If I had my windows machine going I would have taken a different clip and tried it.
(I think youtube clip is bad example as they appear pretty streamlined already)
But I cant handle doing it on linux so I gave up.
Note: That was a good write up.
Harvey I guess my question would be why attach it? You could just share it on google drive, via a unlisted youtube link etc
MODS: I was unable to set Harvey's response as solved/or set as Best Response^^. Please mark Solved, thank you.
Against my better judgment I just shared the DVD clip via MS OneDrive on a work account. I don't use google or MS in my personal life. It was a fragment of a German chamber orchestra doing an obscure rock piece in 2004, nothing piratey or weird. But there's a reason (internet hygiene) I keep my personal and professional life separate. I was very disappointed to have to cross that line.
---nothing I did would get that 50% reduction rate anyway although I will say I did spend about 90 minutes total trying as much as I could. Thank you everyone who responded.
- Edited
Off-topic threads do not have the option for selecting a best answer. Marking as solved manually.
EDIT:
If the "How do I" tag is set, select best answer is available.
brent My last comment on the subject
I spent alot of the afternoon messing around my conclusion alot of the modern formats like
H.264,H.265 and others your not going shrink even if you did dont think it would be much.
But I did take a 7meg webcam video and shrink it down to just under 1meg without any issues
which was interesting.
And some just kept coming up the same size.
(just info)
- Edited
brent It was cheese I used and it saved in VP8 webm format (which I know nothing about at this point)
and I went to H.264 but adjusted the CQ (constant quality).
But if I tried that with the youtube clip which is H.264 avc1 it did not work.
So I would say its something about the source file.
I used shutter Encoder Appimage. (you can adjust the CQ,Cbr,Vbr)
Note: Reading up on Webm it says you can compress it so maybe thats the difference got read more.
HaHa I am so out of tune with the modern video stuff.