Hi, i was looking for a good solution for possibly shrinking my HuffYUV .avi videos to a smaller filesize without any real detriment to quality.
I know that its not possible to convert from a lossless codec to a lossy one without some detriment, but what would be the best options?
At the moment the files are around 25GB per hour of video, so even shrinking them to say half that would be good. Space isn't greatly an issue as i have a 6TB external drive, but every GB saved would help as i have quite a lot of these files to store and i have concerns they may not all fit on in their current sizes.
The video files in question are VHS captures.
I am open to any/all ideas.
Thanks.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 12 of 12
Thread
-
-
It really depends on the purpose. For example, are you looking to build a streaming library? Or, are you looking for a more compact format for archiving? For building a library I would look into h.264 encodes. If looking for archive, DV-AVI is about 50% smaller and for that reason is great for archiving. Lastly, if you ever envision yourself doing serious editing on the video, then you probably want to keep the lossless captures or, at a minimum, the tapes and capture equipment for when you are ready to edit. So bottomline, all formats have their uses, and there is no OSFA codec.
-
Its for archiving purposes.
I am already in the process of editing/restoring them, but i just wanted to keep a master file for the future incase of any better restoration methods, but the huffyuvs are just so big, i wondered if there was a way of just making them slightly smaller with maybe a more modern codec for easier storage (the most important tapes will remain huffyuv though). -
You can use long gop lossless compression like FFV1 , or x264 in lossless mode. Expect maybe 10-20% better compression in long gop mode for something like VHS source (for "clean" source expect even higher compression). For I-frame modes, maybe only 5-10% better compression. The negatives are terrible editing performance in long gop mode (navigation / seeks are exceptionally slow), and perhaps less compatibility with some programs
You won't hit the 50% goal unless you use lossy compression -
To compress it even lower than above recommendation like lossless H.264 (--qp 0 --profile high444), I-frame compression (--keyint 1) or to avoid long GOP (default is about 250 so lower it to say --keyint 50):
You can try x264 encoder to squeeze it encoding to 4:2:0, watch for banding, you can lower CRF to improve quality, banding should not be that much of a problem, with all that noise kept in (--tune grain), except of course computer graphic gradients,animation, where there is no noise etc.:
x264.exe --crf 18 --preset medium --tune grain --keyint 50 --vbv-bufsize 70000 --vbv-maxrate 70000
or try 4:2:2, you'd get a higher bitrates a bit:
x264.exe --crf 18 --preset medium --tune grain --keyint 50--output-csp i422 --vbv-bufsize 90000 --vbv-maxrate 90000
or 10bit H.264 it is even better, but your NLE might not load it at all :
x264.10bit.exe --crf 18 --preset medium --tune grain --keyint 50 --vbv-bufsize 80000 --vbv-maxrate 80000
or you can also try to add --output-csp i422 as well to get 4:2:2 videoLast edited by _Al_; 17th Feb 2017 at 15:43.
-
Ok, thanks for the suggestions, i will give these a go and check the results.
-
lagarith is I-frame only too. It will typically give about 0-5% better compression than huffyuv, but it will always be more compressed. It's also slower to decode and encode. The cases where it will be substantially better is with null frames - frames that are repeated. Typically not very many of those with VHS source.
Realistically, you're looking at long gop lossless codecs if your main priority is compression. Any I-frame format will be substantially worse. The trade off is decoding speed because they are so compressed. Very sluggish to navigate and edit
Or maybe negligible quality loss is acceptable. If that's the case, you can venture into highly compressed lossy encoding modes with x264, even x265 . You should be able to cut the filesizes in half or more quite easily -
Yeah, i was leaning more towards x264 as i don't want issues with decoding, plus it seems a more future proof option.
I was thinking of trying _AI_'s recommendation:
x264.exe --crf 18 --preset medium --tune grain --keyint 50 --vbv-bufsize 70000 --vbv-maxrate 70000
or
x264.exe --crf 18 --preset medium --tune grain --keyint 50--output-csp i422 --vbv-bufsize 90000 --vbv-maxrate 90000
But what would the best --crf be to use for near lossless?
Or would i be better off with --qp 0 as full lossless, or would i not benefit in filesize? -
You can do some tests and see what is suitable for your goals
At --crf 0, it's lossless. The higher you go, the more lossy, the smaller the filesize . IMO crf 18 is probably too low quality since you were coming from "lossless" and expect something close to lossless. Try something like 6-12
The larger the keyframe interval, the higher the compression (with diminishing returns) , also higher latency (poor seek performance)
The more b-frames, the higher the compression (again diminishing returns)
Codecs like ffv1, x264 will always be decodable and future proof (because they are open source, so with programs like ffmpeg, vlc, blender etc...), just not necessarily in other programs like professional NLE's . For 4:2:2, x264 will be decodable as intra in profressional programs (there is a setting that emulates Panasonic's professional AVC-Intra format e.g. --avcintra-class 100) , but you don't want to use intra if you want higher compression
ffv1 (in intra format) was actually chosen by several institutes as the official archival format for digital preservation -
For completeness, I would add the field order for MBAFF (you can think of it as interlaced) encoding and metadata for colormatrix, transfer and color primaries to the commandline . The metadata doesn't affect the actual decoded video, it's just suggestions to the receiving player/application as to how to handle the stream.
If you were BFF
Code:--bff
or if you had a TFF stream
Code:--tff
Code:--colorprim bt470bg --transfer bt470bg --colormatrix bt470bg
Also if it was VHS, you want to signal 4:3 DAR. 12:11 uses the innermost 704 width pixels, and is slightly wider than 4:3. For most analog sources it's correct. If you wanted exactly 4:3 you would use --sar 16:15 for PAL framesize
Code:--sar 12:11
Similar Threads
-
MediaCoder - converts down to 30FPS but still same filesize?
By CursedLemon in forum Video ConversionReplies: 2Last Post: 26th Aug 2016, 14:11 -
Handbrake filesize too big (17 GB) for Home Alone 2
By jakobscafe in forum Video ConversionReplies: 10Last Post: 14th Dec 2014, 17:02 -
obtaining the correct filesize as seen in explorer
By vhelp in forum ComputerReplies: 12Last Post: 14th Sep 2014, 03:44 -
Converting AVCHD video to smaller size
By recordrecorder in forum Video ConversionReplies: 4Last Post: 7th Nov 2013, 16:08 -
Is anything faster than Handbrake for converting to smaller size?
By OM2 in forum Video ConversionReplies: 16Last Post: 29th May 2013, 00:51