I'm trying to convert a video using handbrake-js for node. At first I tried specifying the bitrate, video size, codecs, etc. The goal is to generate several html5 compatible streams to be used as a source on a canvas video for webGL. Everything seems to work fine, it outputs the video, and when I open it using Quicktime or VLC it looks fine, however, when I use it on a tag, there is no video, just audio.
The following code is called whithin a function which receives an "ops" JSON, with the width and height.
hb.spawn({ input: new_location + "original" + ext, output: new_location + ops.name, optimize: true, vb: ops.vb, "width": ops.width, "height": ops.height, "rate": 30 })
The console shows the video being converted, and a clean exit. but webGL reports:
[.Offscreen-For-WebGL-0x7fbf21074c00]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
Note: The video IS a power of 2 (1024x512). Also when I play the original file it doesen't show the error.
To debug, I have even attached the video to the HTML, and changed the CSS to show it. but there is no video. just audio.
I have even tried:
hb.spawn({ input: "input.mp4", output: "output.m4v" })
and a simple Well... input.mp4 displays fine. output.m4v always fails to show video on HTML (Chrome, safari seems to work just fine).
Any ideas?
If you say
preset: Normal
works, then you can runhandbrake --preset-list
(using handbrake-js installed as a command-line app) to see which encoder options the "normal" preset uses:So, try running
hb.spawn
using the options above and remove any options you don't need.