Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Want to add tooltip thumbnails to your JWPlayer? You're welcome!
JWthumbs is a Ruby gem to create a .VTT file and a sprite of thumbnails of a given video file (mp4, mpg, avi, mov and so on...). You can't create timeline thumnails easier than this. Heavily inspired by vlanard's great Python script.
In order to use JWthumbs, you must have ffmpeg and imagemagick installed.
Installation of JWthumbs is pretty straigt forward. Add this to your Gemfile:
gem 'jwthumbs'
And then:
$ bundle install
Or install it yourself as:
$ gem install jwthumbs
Instantiate your video file:
movie = Jwthumbs::Movie.new("YOUR_VIDEO.mp4")
Jwthumbs::Movie.new
accepts second parameter as a options
hash. You can configure several stuff at the same time you instantiate your video like this:
movie = Jwthumbs::Movie.new("YOUR_VIDEO.mp4", seconds_between: 60, sprite_name: "my_sprite_name.jpg")
or after you instentiated your video, you can use Jwthumbs::Movie
file to configure things:
movie = Jwthumbs::Movie.new("YOUR_VIDEO.mp4")
movie.seconds_between = 60
movie.sprite_name = "my_sprite_name.jpg"
and then to create your thumbnails and .VTT file just run this command.
movie.create_thumbs!
If you haven't changed defaults, your _sprite.jpg
and _thumbs.vtt
file will be exportes to output
directory of your root path.
"What will I do now?"
If you're using JWPlayer, there is a cool tutorial on their web site, see Adding Tooltip Thumbnails
:outdir
(string): The path you want your files to be exported. Example: /this/is/my/path
:seconds_between
(integer): Time in seconds between each of snapshots to be taken. Default is video duration / 10.
:thumb_width
(integer): Width of thumbnails that will be placed in the sprite of images. Bigger thumb width size means bigger sprite and bigger file size. Default is 100 which is also recommended.
:vttfile
(string): Name of your .VTT file. Default is file_name_thumbs.vtt
:spritefile
(string): Name of your sprite file. Default is file_name_sprite.jpg
:clear_files
(true / false): Thumbnails should be deleted or not? Before creating sprite, number of snapshots will be taken from the video in respect of :seconds_between
parameter. Sprite is created by montage
ing those thumbnails into one file. So you may need to use thumbnails or you may not. Your choice. Default is true
.
Any kind of participation is welcomed.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)scaryguy - 2014 - MIT
CAUTION: YOU CAN NOT USE THIS GEM IN APPLICATIONS HAVING ANY KIND OF INAPPROPRIATE CONTENT (see YouTube's [policy](http://www.youtube.com/yt/policyandsafety/policy.html) that I support).
FAQs
Unknown package
We found that jwthumbs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.