Atamido
13th December 2003, 07:24
This is the result of a question posted on another board, and I thought that it might be relevant here.
The question was essentially if Matroska could be used to store comics.
After some fiddling around I got it to work pretty well and here is how. Link to a file at the bottom.
1. Resize all images so that they are the same dimensions.
2. Use an AVISynth script to make each image 2 duplicate frames.
3. Open the .AVS with VirtualDubMod.
4. Choose a codec.
5. Save as MKV.
6. Create a chapters file.
7. Use MKVMerge to merge the MKV, chapters, an NFO and add titles.
Now, I can open the file in Media Player Classic or TCMP and go from page to page using the Next Chapter key. If you have the thumbnails turned on, then you see the front cover as the thumbnail. Attached is the .NFO that I recieved with these files so you can see where it came from.
Some things to note:
In my case, WMV9 was the only lossy codec that I could get to actually compress with the dimensions that I was using. All others would return an error code when trying to compress.
I used a smoothing filter in the AVISynth to reduce random fluctuations in what should be a mostly constant color. These were caused by printing and compression artifacts.
Even though I resized the images, the alterations to AR are far to small to see. But, it would be better to fill in the extra space with a background color rather than resize.
I had to use 2 frames per image because of some bugginess in DirectShow. It would skip frames when seeking otherwise. Because the second image is identical to the first, it takes almost no space to encode.
I used 50fps for this sample. You should be able to use 0.04fps to give you 50 seconds per page while still allowing you to skip to the next page using the next chapter button.
If you have the original image, it would give you the best quality to save the image using CorePNG in RGB. For lossless YV12 CorePNG or FFV1 would probably be best.
Using some simple filtering not only increases the compressibility of the image, but it also makes the image look better by removing artifacts from the printing. If it is from a compressed image, it will also help with this. The idea is that if there is a pixel that is surrounded by pixels that are within a few degrees of the same color, then that pixel should also be that color. This is almost always true in comics, manga, and anime. Perhaps mfToon would work well here?
Here are the files that I used and the resulting file.
BitTorrent Link (http://headhunterstracker.no-ip.com:6969/torrent.html?info_hash=2b1db55a92fab1d65640632b1ef1af3bced7e849 )
You may have to refresh a couple of times because the tracker isn't very good. And if you are nice, please help with the bandwidth for a day or two...
Edit: Direct Link now. (http://insipid.us/comic/)
The question was essentially if Matroska could be used to store comics.
After some fiddling around I got it to work pretty well and here is how. Link to a file at the bottom.
1. Resize all images so that they are the same dimensions.
2. Use an AVISynth script to make each image 2 duplicate frames.
3. Open the .AVS with VirtualDubMod.
4. Choose a codec.
5. Save as MKV.
6. Create a chapters file.
7. Use MKVMerge to merge the MKV, chapters, an NFO and add titles.
Now, I can open the file in Media Player Classic or TCMP and go from page to page using the Next Chapter key. If you have the thumbnails turned on, then you see the front cover as the thumbnail. Attached is the .NFO that I recieved with these files so you can see where it came from.
Some things to note:
In my case, WMV9 was the only lossy codec that I could get to actually compress with the dimensions that I was using. All others would return an error code when trying to compress.
I used a smoothing filter in the AVISynth to reduce random fluctuations in what should be a mostly constant color. These were caused by printing and compression artifacts.
Even though I resized the images, the alterations to AR are far to small to see. But, it would be better to fill in the extra space with a background color rather than resize.
I had to use 2 frames per image because of some bugginess in DirectShow. It would skip frames when seeking otherwise. Because the second image is identical to the first, it takes almost no space to encode.
I used 50fps for this sample. You should be able to use 0.04fps to give you 50 seconds per page while still allowing you to skip to the next page using the next chapter button.
If you have the original image, it would give you the best quality to save the image using CorePNG in RGB. For lossless YV12 CorePNG or FFV1 would probably be best.
Using some simple filtering not only increases the compressibility of the image, but it also makes the image look better by removing artifacts from the printing. If it is from a compressed image, it will also help with this. The idea is that if there is a pixel that is surrounded by pixels that are within a few degrees of the same color, then that pixel should also be that color. This is almost always true in comics, manga, and anime. Perhaps mfToon would work well here?
Here are the files that I used and the resulting file.
BitTorrent Link (http://headhunterstracker.no-ip.com:6969/torrent.html?info_hash=2b1db55a92fab1d65640632b1ef1af3bced7e849 )
You may have to refresh a couple of times because the tracker isn't very good. And if you are nice, please help with the bandwidth for a day or two...
Edit: Direct Link now. (http://insipid.us/comic/)