Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got a broken webm file #43

Open
wlo1844651 opened this issue Aug 5, 2016 · 1 comment
Open

Got a broken webm file #43

wlo1844651 opened this issue Aug 5, 2016 · 1 comment

Comments

@wlo1844651
Copy link

wlo1844651 commented Aug 5, 2016

I add almost 300 frames to make a 21 sec video.
There was no error message, however it return a webm with correct width, height and time length but the scene is whole black, and it can't be played.

The following is where I called whammy:
var whammy = new Whammy.Video();
whammy.add(webpDataURL, time);
var output = whammy.compile();

Is there any suggestion or limit I missed it?

@conundrumer
Copy link

here's the fix:

chrahunt/TagProReplays@0468714#diff-e86e17cf209c8a7f8d42905e3990ce2cR157

I'm gonna fork and submit a PR

conundrumer added a commit to conundrumer/whammy that referenced this issue Aug 21, 2016
A Chrome update added metadata to generated WebP, which caused videos generated by Whammy to be invalid.

@chrahunt [describes the fix](chrahunt/TagProReplays#78 (comment)):

> Okay, I figured out the issue. In Whammy [here](https://github.com/antimatter15/whammy/blob/a1c8e861a3269387ffac519fe6e96c645efb6686/whammy.js#L192) it skips the first 4 bytes of the VP8* chunk, assuming there's no additional metadata. Well now there is, but it isn't what the webp format is expecting. Replacing `4` with `webp.data.indexOf('\x9d\x01\x2a') - 3` did the trick (get to the `start_code` then back up 3 bytes for the `frame_tag` as detailed [here](https://tools.ietf.org/html/rfc6386#section-19.1). I did a local test and was able to generate a webm that ffmpeg approved of.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants