I m recording full HD video in 1080p /30p format with my Nikon D5200 but i find the size of video is to high i.e. 10 GB for an hour. Now i want to compress it to lesser size in the range of 1-2 GB without affecting even a bit of quality so that i can archive it without exhausting my storage drive. I want it in 1080p format with lesser size after compression. As i have recorded 200hr video and still keeping RAW video with my storage which has exhausted it. Is there any software or any solution so that i can convert it to lesser size? Pl help as i havnt found any full proof solution for this. Ur suggestions will heartly be welcomed. I have to use these videos on my large screen tv for teaching purpose.
-
This question will be closed because it is not about photography. But you want to compress it at 20% without affecting even a bit of quality? You can not do that. Every re-compression has a quality cost. Take a look at some free video converters. This one is pretty stable: dvdvideosoft.com/es/products/dvd/Free-MP4-Video-Converter.htm make some tests with Mp4 format.– RafaelNov 8, 2016 at 18:06
-
Some pointers here: Wikipedia: List of Codecs: Lossless video compression.– MickNov 8, 2016 at 18:11
-
2Your video is already compressed, it would take 672 GB if it weren't. Another 5:1 compression without affecting quality is simply impossible.– Mark RansomNov 8, 2016 at 18:23
-
I STRONGLY suggest you make a coy of my answer. It's MTBF may be very low.– Russell McMahonNov 9, 2016 at 6:22
-
10GB/hr with audio translates to roughly 22 mbps. If it's simple visuals i.e. little movement, plain surfaces, little noise, you may be able to achieve 1/3rd of the source.– GyanNov 9, 2016 at 18:57
4 Answers
Theoretically
Current DSLRs use H.264 compression for their video. Optimizing an already compressed image without losing quality is something commonly done for GIF, PNG or JPEG still images, and while it's theoretically possible to optimise compression in existing video files, currently no one bothered to develop the software to do so. The only solution left for you is to recompress your video with your codec of choice.
Don't try lossless codecs
While you won't lose any quality, lossless is only useful if your source material has a very high datarate. You will probably not gain anything compared to your DLSR files. (Your files seem to be about 25Mbit/s. Lossless x265/x264 will give you at least 100-200Mbit/s)
Try almost-lossless
Still, it's good to know that the internal (hardware) codecs of DSLRs are inferior to what your current CPU can do with recent software. But you should also know that any lossy recompression will result in an image that is slightly worse than the original, even if you encode in a higher quality than the original. That being said, here is a list of modern codecs that can compress your files with minimal loss: x264, x265, vp9 and av1 (to be released in 2017).
x264/x265 Settings for recompression with minimal loss
- Encoding mode: constant quality. It will encode in one pass and output the lowest file size for a given quality setting. Your new file will contain variable bitrate video — your original DSLRs files are probably constant bitrate files
- CRF quality setting: Choose a value between 12 and 20 (quality difference will be between indistinguishable and fine-for-the-less-discerning), if the source material is compressed in low quality, you can sometimes go higher than a CRF of 20 without noticing any difference. Incrementing CRF by +6 means about doubling the file size.
- Codec: Compared to x264, x265 compression produces about half the datarate at the same CRF, but it is a lot slower.
- Speed/Compression ratio: Use the
veryslow
setting to get the smallest file. Warning: this might be very slow ;-)
Depending on the above choices and on the complexity of the image and on the efficiency of the codec of your DSLR, your recompressed file will be up to 10 times smaller (probably less).
Handbrake is a nice app that will help you achieve all this. If you prefer the command line you should definitely go with ffmpeg
:
ffmpeg -i DSLR.MOV -c:v libx265 -preset veryslow -crf 18 -c:a copy recompress.mp4
Without affecting quality, and presuming your CPU and GPU are fast enough, utilizing the x265 / HVEC encoding library may be the best option. This can be done with Handbrake or FFmpeg, it can be a lossless encode, however takes more time to decode and encode on a slow CPU, sometimes causing frame drops while viewing. See Handbrake for more. Also, this question on the UNIX fourm may be of use.
ffmpeg -i INPUT.mkv -c:v libx265 -preset veryslow -x265-params lossless=1 -c:a copy OUTPUT.mkv
Is the command I use. It hasn't been a problem, and is working quite well as I am teaching students Premiere in classes. However, for speed, the raw format or the x264 codec is the best. x265 is the newest and most compressed video format, it works reliably, but not quickly with old CPUs.
-
I heard that x265 is better than x264 in terms of quality to time ratio. You sure its slower than x264? I'm new to all this that's why. Jul 9, 2017 at 15:08
-
It took 4 hours to encode a full BluRay rip from AVCHD to x264 on ultraslow, and almost 8 from AVCHD with the ultrafast libx265, using Plex Optimization Tools and transcoder. No streams were running, and a bandwidth of 25 MB/S per drive over 2 separate drives certified for USB 3.0 using a USB 2.0 bus. Tests completed Nov. 8th 2016, using Plex. Media length was 2.5hrs. System used: Mid-2010 iMac 12 GB RAM, 3.06 GHz on 4 cores.– bret7600Jul 10, 2017 at 0:51
without affecting even a bit of quality
Use lossless codecs like Lagarith (implemented by FFMpeg
, not widely supported) or lossless H.264 (implemented in x264
, widely supported as generic H.264 codec).
Try both and see what works better for you.
There are a range of free or lowish cost compression programs available online. I asked a similar question on [PICList](http://www.piclist.com] recently. The following is an extract or portions of some replies. This thread was migrated from SE Photography where it was "OT". Despite the downvotes there or here for whatever reason this is liable to be of significant use to some people with similar needs.
Actual thread here on the 'Nabble' webscraper
I wish to upload a number of videos to Facebook & You tube (the shame!).
Any suggestions re free or for money WIN10 compatible programs that meet the following need would be welcome. In many cases these are usually of higher resolution / quality / size than is generally required.
The files are 1080p MP4 format, usually "Out of Camera".
A web search for converters produced several zillion promising leads and nothing as yet attractive enough. "Free" would be nice (and there are various claims re fully free) but 'sensibly priced' is acceptable if useful enough.*
Windows Moviemaker allegedly runs on WIN10 but attempting to download the allegedly relevant 'essentials' package produced discouraging messages.
Allen Mulvey.
I think WinX HD Video Converter Deluxe will do what you
want. Not free but reasonable. Their DVD ripper is also very
good.
https://www.winxdvd.com/specialoffer/index.htm#a3
Ashampoo also has a large variety of high quality but inexpensive software. I'm not sure if they have exactly what you want. You can find some of their stuff here: https://www.ashampoo.com/
James Burkart:
Try Handbrake. https://handbrake.fr/
David VanHorn
I use vsdc free video editor.
Ross McMillan
I use WMM. It is pretty smart when it comes to uploading - you can fine tune the parameters or use one of the "canned" ones - and it tells you how much storage (and presumably upload bandwidth) per minute of video is used by whatever you have selected.
Richard Prosser
I've used "Format Factory" although it's been a while since I needed
it. Not sure aout Win10 compatability - I'm on Win7 & linux.
Russell
https://www.winxdvd.com/specialoffer/index.htm#a3
Looks reasonable and far more capable than the core task I wanted it for.
Nicola Perotto
from SourceForge there is TEncoder
https://sourceforge.net/projects/tencoder/?source=directory
very good, simple and fast. Good for batch conversions.
For fine tuning the conversion use ffmpeg http://www.ffmpeg.org/
Russell.
As a first attempt "Handbrake" has made a useful difference and I'll try to check all the free recommendations and maybe the so far single for $ one to see what other capabilities are available.
I am an 'obsessive' still photo taker but 'videos happen' along the way and being able to easily put them on the internet is highly desirable.
Justin Richards
VLC does a good job at everything to do with media it seems.
Ken
I have used Handbrake several times to make backup copies of commercial DVD's.
https://handbrake.fr/
The user interface is pretty clunky and it took me a while to figure out how to use it and what the best settings were, but once that was sorted out it works as advertised. I have never used it for video file format conversion but I believe it can do that too. It's probably been updated since I last used it a couple of years ago.
I have also heard good things said of Free HD Video Converter - but have not used it myself. http://www.videoconverterfactory.com/free-hd-video-converter/
-
1I'm very much supportive of trying to help people, but this is a quintessentially un-StackExchange-like answer. It's basically a repost of some discussion thread at piclist.com (which is very difficult to find; you didn't link to the thread, just the top-level site). This is also categorically off-topic. I would much rather see a recommendation to migrate to video.se– scottbbNov 9, 2016 at 6:35
-
@scottbb The question was on another SE site where I knew it would have a short lifetime. I wrote the 'answer' to help the OP. Minimum time to market was vital :-). I had no hand in where it was migrated to and will be happy if it can find some green bay to peacefully lie at anchor in and be suitably attended to by others who can answer it well. Nov 10, 2016 at 1:09
-
I recommend that you delete this answer. You'll get back your lost points and badge. Jul 9, 2017 at 15:10
-
@Macindows Thanks for the concern. I had a look through the answer and despite the downvotes (partially from having started off in another group, I think) it seems liable to be immensely useful to some people. So I've edited it to include a link to a copy of the original thread. I can stand the points and badge loss :-) - I have an excess of them elsewhere on SE and my hope is to be useful to people - which I think this achieves. A shame the downvoters don't think so too :-). Jul 9, 2017 at 15:41