Hey,
I’m using ffmpeg to convert a GIF to a WEBM file, like so:
This works pretty well. The produced file is playable in both Firefox and Chrome, and has a decent enough quality for its very small size (compared to the source GIF).Code:ffmpeg -i test.gif -r 25 -an -c:v libvpx -crf 23 test.webm
However, when trying to play this file in Media Player Classic Home Cinema (from CCCP—don’t judge me), the video is not displayed correctly. The first frame seems to be fine, but all subsequent ones are mostly white with just a few artifacts appearing where movement is in the video. You can see what it looks like for me in this GIF screencapture (that’s a bit ironic). Also, the file is not rendered with a preview in Windows Explorer (unlike every other video).
Now I don’t really know why this happens, especially as other’s WEBM files—for example those from YouTube—play just fine in MPC-HC. I’ve checked the output file using MediaInfo, and this is what I get:
I’ve compared this with the WEBMs, YouTube uses, and the only difference (apart from the obvious things that make out the video) is that those are missing the “Unique ID”, have just the format version “Version 2” (instead of 4 and 2) and list the “overall bit rate mode” explicitely as “variable”.Code:General Unique ID : 109982964302111834666886362827577618438 (0x52BDF2CC73BAA4B055C86773E647F006) Complete name : C:\path\to\test.webm Format : WebM Format version : Version 4 / Version 2 File size : 143 KiB Duration : 5s 160ms Overall bit rate : 228 Kbps Writing application : Lavf55.22.100 Writing library : Lavf55.22.100 Video ID : 1 Format : VP8 Codec ID : V_VP8 Duration : 5s 160ms Bit rate : 212 Kbps Width : 480 pixels Height : 360 pixels Display aspect ratio : 4:3 Frame rate mode : Constant Frame rate : 25.000 fps Compression mode : Lossy Bits/(Pixel*Frame) : 0.049 Stream size : 133 KiB (93%) Default : Yes Forced : No
So I could imagine that the format version ffmpeg creates, 4/2, is somewhat too new or special. Is there a way to generate just a “version 2” file with ffmpeg? Or is the reason for this problem something completely different?
Thanks a lot in advance!
+ Reply to Thread
Results 1 to 9 of 9
-
-
Another possibility: remux with MKVtoolnix
(tick the "Create WebM compliant file" checkbox in the Global tab)Last edited by El Heggunte; 16th Dec 2013 at 11:30. Reason: .....
-
Yet another possibility is to run it through:
http://www.pazera-software.com/products/webm-converter/ -
VLC works, but so do Firefox and Chrome; the odd thing is that all other webm files that I have do work with MPC-HC… Remuxing it using MKVtoolnix unfortunately did not change anything.
I tried encoding it to an AVI first and then to WEBM and that interestingly works. So I guess that the extraction of the GIF frames is actually somewhat broken. Any ideas?
Also, out of interest, does it work for you? -
Interesting, that really works! I was under the impression that the conversion from RGB to YUV420p would involve some serious color-loss or washed-out colors. At least that’s what I am used to from encoding with x264. And that’s actually also why I chose to try webm for this, as it seemed to support RGB just fine.
But now, even converted as YUV420p, it matches the original colors really well. Thanks a lot, I can live with this result! -
GIF files aren't RGB. They're 8 bit palettized files. Each pixel is represented by an single byte (8 bits, 256 possible values). That byte is used as an index to a table of RGB values the determine the color of the pixel. Ie, it's a paint by number scheme: color 0 is black, color 1 is red, color 2 is green... color 255 is white. I suspect ffmpeg used a similar palettized color scheme to make the VP8 video. Or maybe it used some other direct color format but subsampling that MPCHC's VP8 decoder doesn't understand.
Similar Threads
-
Link broken video download.. FFMPEG?
By warkiller in forum Video Streaming DownloadingReplies: 4Last Post: 8th Aug 2013, 15:49 -
Always +125% video/Frame/Zoom size MPC-HC/MPC-BE?
By tigerb in forum Newbie / General discussionsReplies: 6Last Post: 8th Mar 2013, 15:57 -
all youtube video now being trancoded to WebM
By aedipuss in forum Latest Video NewsReplies: 12Last Post: 31st Oct 2012, 14:26 -
FFmpeg Webm Error
By carrau in forum Video ConversionReplies: 2Last Post: 28th Jan 2011, 03:34 -
some ffmpeg help with webm/vp8
By loldmanjenkins in forum DVD RippingReplies: 8Last Post: 3rd Nov 2010, 14:04