OptimalBits / navcodec

nodejs extension for libavcodec
151 stars 19 forks source link

Support for input time offset (-itsoffset) option #16

Closed danscan closed 10 years ago

danscan commented 11 years ago

Looking through the readme and the source I'm unclear on whether it's possible to use the itsoffset option or do something of the same effect.

This is the one blocking thing keeping this library from being absolutely perfect for my application. Do you have any insight or recommendations?

Thanks so much :)

manast commented 11 years ago

ok. That option is not supported, but the good news is that it should be quite easy to add. Since it is an input option, it should be implemented in navcodec##open method. Right now we do not support options for that method, the best would be to have an optional options parameter after the filename, and one of the options should be offset. I can add this feature, but not sure when. If it really is a hurry I would recommend you to clone and implement yourself, and I can help you if you need help. check in https://github.com/OptimalBits/navcodec/blob/master/lib/avconv.js as you can see, it is already implemented to add input arguments, so you only need to modify the open method saving the optional opts object: https://github.com/OptimalBits/navcodec/blob/master/lib/navcodec.js#L16 and then passing this to avconv for the input file: https://github.com/OptimalBits/navcodec/blob/master/lib/navcodec.js#L253-L256

manast commented 10 years ago

This is resolved as input option in version 0.3.8.