Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 23 14:51
    75lb closed #72
  • Oct 23 14:51
    75lb commented #72
  • Oct 23 14:51
    75lb edited #72
  • Oct 22 16:50
    Caligulaa commented #72
  • Oct 22 16:49
    Caligulaa commented #72
  • Oct 22 15:28
    Caligulaa opened #72
  • Oct 21 07:40
    RevillWeb closed #71
  • Oct 21 07:40
    RevillWeb commented #71
  • Oct 20 09:56
    75lb commented #71
  • Oct 20 09:34
    75lb commented #71
  • Oct 20 09:34
    75lb commented #71
  • Oct 20 09:33
    75lb commented #71
  • Oct 20 08:51
    RevillWeb opened #71
  • Oct 09 22:13
    inglesuniversal commented #70
  • Oct 09 20:56
    75lb closed #70
  • Oct 09 20:56
    75lb commented #70
  • Oct 09 19:23
    inglesuniversal edited #70
  • Oct 09 19:22
    inglesuniversal opened #70
  • Oct 09 19:18
    inglesuniversal closed #69
  • Oct 09 19:18
    inglesuniversal commented #69
Janek Rahrt
@janek26
hey, somebody online? :)
Lloyd Brookes
@75lb
@janek26 morning!
Janek Rahrt
@janek26
@75lb morning :) can you tell me how to use ur piece of software? i already installed the handbrake-cli, but if i start he said 'no file/dir like /bin/sh -c handbranke ...'
but '/bin/sh -c handbrake' and 'handbrake' work fine in terminal
Lloyd Brookes
@75lb
sorry, gitter did not notify me you had replied! To get instructions how to use handbrake-js from the terminal, install it (npm install -g handbrake-js) then run handbrake -h to see the options.. which platform are you on? Linux?
Janek Rahrt
@janek26
yeah linux, i know how to use handbrake but handbrake-js said that handbrake is not found
Lloyd Brookes
@75lb
when you installed handbrake-js it should have printed a message explaining that you are required to install the handbrake core package manually (as it requires root access to install).. i will check that message is still printed correctly.. meanwhile, here are the instructions to install handbrake are here: https://launchpad.net/~stebbins/+archive/ubuntu/handbrake-releases
once you have the handbrake-cli package installed on your machine, handbrake-js will work correctly.. Windows and Mac users don't need to install handbrake-cli manually, it is done automatically.
Janek Rahrt
@janek26
i'll try tomorrow, will tell u how it works :) thx
Lloyd Brookes
@75lb
ok, you're welcome.. tbh, the handbrake-js command line tool doesn't offer much over and above HandbrakeCli.. the power of handbrake-js is in your ability to write video encoding scripts in node/Javascript, which to many people is preferable to scripting in bash/dos etc..
Belldandu
@Belldandu_twitter
Hi guys so im trying to burn in some subtitles but for some reason when using handbrake-js as a lib it doesnt work
"use-strict"
var hbjs = require("handbrake-js");

var title = "[HorribleSubs] Dragon Ball Super - 67 [720p]";

let options = {
        input: title+".mkv",
        output: title+".mp4",
        encoder: "x264",
        "encoder-preset": "slow",
        quality: 22,
        audio: 1,
        aencoder: "av_aac",
        subtitle: "1",
        "subtitle-burned": 1,
        optimize: true
};

hbjs.spawn(options)
        .on("error", function(err){
                throw err;
                // invalid user input, no video found etc
        })
        .on("progress", function(progress){
                process.stdout.clearLine();
                process.stdout.cursorTo(0);
                process.stdout.write(`Percent complete: ${progress.percentComplete}, ETA: ${progress.eta}`);
        });
subtitle can be a number which represents an internal track but that doesnt appear to be working when using this library as a lib
Belldandu
@Belldandu_twitter
Nvm
Turns out the file is missing the track
Belldandu
@Belldandu_twitter
Nvm on that too xD
Track is there
Handbrake has a bug
HandBrake/HandBrake#397
Tom Butler
@TRPB
I'm trying to write a mkv container using data from a stream from a program called TVHeadEnd, it gives raw packet data. Can anyone point me in the right direction of feeding this into handbrake to write a mkv file from the stream?
Lloyd Brookes
@75lb
sorry @TomBZombie , i have no idea.. the docs say that --input accepts a device as input but i have no experience using it
 -i, --input <string>    Set input file or device ("source")
Jody Jacobus Geers
@Jody-Geers
@75lb Thanks for helping my email query, you rock! But i fear the --rotate option is for command line and not when using handbrake within a node.js app environ. Im after a way to stop vertical videos being flipped horizontal during convert in the options object thats passed to the hbjs.spawn([options]) function, is that possible?
Lloyd Brookes
@75lb
@Jody-Geers all command-line options can be passed to the .spawn() method, e.g.
hbjs.spawn({ input: 'something.avi', output: 'something.mp4', preset: 'Normal', rotate: 1 })
  .on('error', console.error)
  .on('output', console.log)
Lloyd Brookes
@75lb
the easiest way to use encode video is to use a preset
i always use preset: 'Normal' - have been doing so for years
handbrake-js currently only supports the Lecacy Presets from the page i linked to above
(i.e. Normal, iPhone & iPod touch, Android Tablet etc)
@Jody-Geers
Jody Jacobus Geers
@Jody-Geers
Ahhh - Cool! - Thanks, will play around. (beer)
Jody Jacobus Geers
@Jody-Geers
@75lb Hiya Lloyd, hope your cool. Have you has handlebars-js running in an IISNODE environ?
Jody Jacobus Geers
@Jody-Geers
@75lb The handbrake-js dep 'usage-stats' seems to cause bother with its dep of 'mkdirp2' ( sorry i said handlebars in prev message, busy jumping between computers )
Jody Jacobus Geers
@Jody-Geers
Error: EPERM: operation not permitted, mkdir 'C:\Windows\system32\config\systemprofile.usage-stats' @ my_app\node_modules\handbrake-js\node_modules\usage-stats\node_modules\mkdirp2\index.js:70:9)
Lloyd Brookes
@75lb
hi @Jody-Geers , thanks for letting me know - will have a look now
Lloyd Brookes
@75lb
it’s not an issue with the code, it’s a permissions thing (no permission to create a folder).. should be a simple fix - if the folder fails to create (due to lack of perms) we can skip it and move on
Lloyd Brookes
@75lb
@Jody-Geers this is resolved in usage-stats v0.8.6, please reinstall your handbrake-js module to pick up the fixed deps
the exception is now handled in the case the cache folder cannot be created
Jody Jacobus Geers
@Jody-Geers
@75lb For doing that on a Sunday, you rock!
Lloyd Brookes
@75lb
is everything working for you now @Jody-Geers ?
Jody Jacobus Geers
@Jody-Geers
I will be testing the IISNode environment hopefully later today. I've been playing with PM2 as an alternative production environment. Actually fighting with myself over which route to take.
@75lb Sorry, forgot to tag you in my reply. ^
iisnode seems right for windows server, pm2 for linux server but then, if your node.js app already wrapped in a cluster system and a service, what advantage do either of the above provide. ( Deploy and slowly back away from computer until its safe to run.. )
Jody Jacobus Geers
@Jody-Geers
Works on win 7 - thanks, will try win server 2012 soon. (Y)
Lloyd Brookes
@75lb
ok, that’s good - thanks for letting me know
sudheer5
@sudheer5
Hi, can anyone help in specifying the encoder to convert avi file to webm file?
tarun-koshti
@tarun-koshti
hi, can I use handbrake-js for video compression?
like youtube