Add support for webm video format.
|Status:||New||Start date:||27 Mar 2015|
Google have proposed new image and movie file formats to address various deficiencies in the existing 2000+ known formats. We believe that the video format webm is already supported by our Matrovska implementation.
Gilles has been asking on behalf of Digicam for Exiv2 to support webp.
I’ve looked at libwebp from Google. I’ve built it and run some examples. This looks like a straight-forward task.
621 rmills@rmillsmbp:~ $ cp ~/Pictures/2015/WinterTrip/Austin/DSC_5900.jpg test.jpg; ls -alt test.jpg -rw-r--r-- 1 rmills staff 7167602 22 Mar 22:23 test.jpg 622 rmills@rmillsmbp:~ $ exiv2 -pv test.jpg | wc # nice new test JPEG with 156 lines of metadata 156 1091 10978 623 rmills@rmillsmbp:~ $ cwebp -metadata exif test.jpg -o test.webp # convert the JPEG to WEBP while keeping the exif data in test.web Saving file 'test.webp' File: test.jpg Dimension: 6000 x 4000 Output: 420072 bytes Y-U-V-All-PSNR 42.59 47.79 47.70 43.73 dB block count: intra4: 45949 intra16: 47801 (-> 50.99%) skipped block: 12523 (13.36%) bytes used: header: 281 (0.1%) mode-partition: 125371 (29.8%) Residuals bytes |segment 1|segment 2|segment 3|segment 4| total macroblocks: | 2%| 6%| 13%| 76%| 93750 quantizer: | 36 | 36 | 30 | 23 | filter level: | 15 | 31 | 32 | 20 | Metadata: * EXIF data: 14854 bytes 624 rmills@rmillsmbp:~ $ ls -alt test.webp # a little smaller, eh? -rw-r--r-- 1 rmills staff 434952 22 Mar 22:24 test.webp 626 rmills@rmillsmbp:~ $ webpmux -get exif test.webp -o - | exiv2 -pv - # extract the metadata and pipe it through exiv2 Saved file - (14854 bytes) 0x010f Image Make Ascii 18 NIKON CORPORATION 0x0110 Image Model Ascii 12 NIKON D5300 ... 0x0202 Thumbnail JPEGInterchangeFormatLength Long 1 10670 0x0213 Thumbnail YCbCrPositioning Short 1 1 627 rmills@rmillsmbp:~ $ webpmux -get exif test.webp -o - | exiv2 -pv - | wc Saved file - (14854 bytes) 156 1091 10978 # we still have 156 lines of metadata 628 rmills@rmillsmbp:~ $
Please don’t think that because I have been able to extract the meta data with a pipe, this project’s trivial. It’s not. I’d like us to use Exiv2’s basicio module to perform I/O within libwebp. This is because basicio supports web protocols to randomly seek data on the web (we don’t copy the whole file).
I'll take a look at the webp/webpmux libraries and make an assessment of the effort required to get basicio to perform I/O.
#5 Updated by Robin Mills 7 months ago
- Subject changed from Add support for webp image and webm video formats. to Add support for webm video format.
- Status changed from Assigned to New
- Assignee deleted (
Thanks to splendid work by Ben, we have WebP support added to v0.26. webm is Matrovska and may already be working. The video code needs attention and #992 should address this matter in v0.27.
I'm going to change the title of this to only include webm. I'm also going to set Status = New and unassign myself from this task. Our video code and image tests will be serviced in v0.27.