
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
media_trim
Trims an audio or video file using ffmpeg
.
ffmpeg
, including mp3
, mp4
, mkv
, and many more.trim
command.You need a working Ruby environment to install this program. I describe how to set that up here.
The trim
command is provided by the media_trim
Ruby gem.
Install it like this:
$ gem install media_trim
Add this line to your application’s Gemfile
:
gem 'media_trim'
Then execute:
$ bundle
Add the following to your application’s .gemspec
:
spec.add_dependency 'media_trim'
Then execute:
$ bundle
trim [OPTIONS] dir/file.ext start [[to|for] end]
start
and end
timecodes have the format [HH:[MM:]]SS[.XXX]
.
Note that decimal seconds may be specified, but frames may not;
this is consistent with how ffmpeg
parses timecodes.end
defaults to the end of the audio/video fileWhen run as a command, output files are named by adding a trim.
prefix to the media file name,
e.g. dir/trim.file.ext
.
By default, the trim
command does not overwrite pre-existing output files.
When trimming is complete, the trim
command displays the trimmed file,
unless the -q
option is specified.
OPTIONS
are:
-d
Enable debug output.-h
Display help information.-f
Overwrite output file if present.-v
Verbose output.-V
Do not view the trimmed file when complete.Crop dir/file.mp4
from 15.0 seconds to the end of the video, save to demo/trim.demo.mp4
:
$ trim demo/demo.mp4 15
Crop dir/file.mkv from 3 minutes, 25 seconds to 9 minutes, 35 seconds, save to demo/trim.demo.mp4
:
$ trim demo/demo.mp4 3:25 9:35
Same as the previous example, using optional to
syntax:
$ trim demo/demo.mp4 3:25 to 9:35
Save as the previous example, but specify the duration instead of the end time by using the for
keyword:
$ trim demo/demo.mp4 3:25 for 6:10
Need a way to figure out the start and stop times to trim a video? DJV is an excellent video viewer.
After checking out this git repository, install dependencies by typing:
$ bin/setup
You should do the above before running Visual Studio Code.
$ bundle exec rake test
The following will allow you to experiment:
$ bin/console
To install this gem onto your local machine, type:
$ bundle exec rake install
To create a git tag for the new version, push git commits and tags, and push the new version of the gem to https://rubygems.org, type:
$ bundle exec rake release
Bug reports and pull requests are welcome at https://github.com/mslinn/trim.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that media_trim 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.