Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
25th August 2012, 15:24 | #1 | Link |
Registered User
Join Date: Aug 2012
Posts: 11
|
Want to make an image archival format using x264
Summary in one sentence: I want to make an image archival format which supports random access. How can I achieve this using x264?
Long ver.: I was looking for a format to archive a set of BMP images. The set contains many subset of very similar images. So I am looking for an archiving format which takes advantage of differential storage, but also have a good random access rate. I was using 7z (solid mode) which compress great but does not support random access. My conceptual format works like this. Say there are 10 similar images , A0, A1 to A9. The archive will store the whole of A0, and the difference A0-A1, A0-A2 and so on. When accessing A4, it will access A0, and then access the difference A0-A4. It will output the A4 by merging the difference. I asked this in the compression board and they told me to investigate in modern video formats. I have self-studied a few days. Here are my questions, grouped in theory/practical /grand level. Theoretical level: I learned basic theory of video encoding. I learned that x264 supports RGB and lossless. But can h264 allow having one I-frame and have subsequent P-frames referencing to that I frame. So I won't need to read several frame before decoding one frame. If I have several subsets, can x264 detect that and make something like IPPPPPIPPIPPP? If not what are the possible peusdo steps to achieve that(a wrapper to preprocess then feed to x264?) On the practical level(of making such a file by hand): I also learned that avisynth is used to have bmp source converted to raw video, and feed it to MeGUI. Is this the right path? On the grand level(making programs to automate decoding/encoding): I want to make a C# compression program for users. I guess this program has to generate avisynth script and pass it to megui library? I also want to make a C# decompression program, decompressing the format to bmp or jpeg. Do I just use any h264 decoder to do that? Is is easy to use all of these under C#? I know the questions are a mixture of different areas/difficulties, and may not be written as clear as it can be. Sorry about that and thanks for reading this. |
25th August 2012, 17:57 | #2 | Link |
Registered User
Join Date: Jul 2004
Posts: 41
|
I'm somewhat surprised by the "great" comment.
My experience in lossless compression of image files gives an average of < 10% and in individual cases can actually result in a larger output file. A scan of the net shows that solid mode can do slightly better than basic PkZip, but personally I don't think the difference is worth writing home about. Feel free to hold a different opinion. Just some thought on lossless. Is your original source digital? Even if it was a digital source some of the following still applies. Digitization is inherently lossy. The major issue is the Nyquist limit, but there are others involving the physical hardware employed in the processing (or capture). Basically, If you do 10 successive scans of the same image you will get 10 different files. If may be possible to improve compression just by averaging successive scans, but I have not tried this. Lossless in terms of video processing only applies to how much degradation subsequent processing will cause. If this is a one off archive then only the losses for the decoding step apply. The display device will introduce some loss. If multiple decoding and then recoding steps apply then lossless increases in importance. In these days of multi terabyte storage units and Blueray, do you have a need for compression at all? Part of your research should include just how much loss you can have and still retain the level of detail required. None is not one of your options. Good luck with your project. |
26th August 2012, 03:33 | #4 | Link | ||||
Registered User
Join Date: Aug 2012
Posts: 11
|
Quote:
Quote:
Quote:
Quote:
Thanks. Is it okay if I move this to the x264 board? The theory questions may be answered over there? |
||||
26th August 2012, 03:40 | #5 | Link | |
Registered User
Join Date: Aug 2012
Posts: 11
|
Quote:
FFV1 development activity seems to be stopped since 6 years ago. I'll give it a shot if x264 really didn't work out. Since you are a developer, may I ask if you know the answer to my theory part of the questions? Thanks |
|
26th August 2012, 11:40 | #9 | Link | |
Registered User
Join Date: Aug 2012
Posts: 11
|
Quote:
Take the 200mb BMP files as example, I converted them to 25mb PNG files, and those will compress to an 18mb 7zip file. |
|
26th August 2012, 12:48 | #10 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Compressing PNG files is silly, and I'd be shocked if you could get 25MB PNGs to compress to 18MB, let alone 24MB. Compressing an already-compressed file will almost never give any gain (unless the compressor has a special mode that internally decompresses and recompresses it).
|
26th August 2012, 15:23 | #12 | Link | |
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,769
|
Quote:
__________________
Born in the USB (not USA) |
|
Tags |
avisynth, h264, x264 |
Thread Tools | Search this Thread |
Display Modes | |
|
|