Skip to content

brianmario/handbrake.rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notes

NOTE: This doesn't work yet as a gem, the gemspec is there for Bundler at the moment.

I'll probably end up bundling libhandbrake.dylib, but FYI it's ~17MB.

If you want encrypted DVD support, you'll need to either install libdvdcss (it's in homebrew) or you can set the DYLD_FALLBACK_LIBRARY_PATH environment variable before starting the Ruby process.

The DYLD_FALLBACK_LIBRARY_PATH variable should be a path (or set) to look for the libdvdcss library. If you have VLC installed, you can try setting it to /Applications/VLC.app/Contents/MacOS/lib

Compiling

To compile first run rake vendor:compile - this will clone/checkout the handbrake sources into vendor/handbrake, compile them then finally build a static libhandbrake.dylib from the object files and place it into ext/handbrake.

From there, you can use the standard rake-compiler tasks to compile the gem.

Using it a project

For now I'd suggest just cloning this into vendor/gems and run the compile stuff up there ^^

Usage

# source can be anything HandBrake supports
# could be an mp4, an mkv or a DVD or even BlueRay disk folder/iso
source = "/path/to/source"

titles = HandBrake.scan source

# See HandBrake::Title for some basic docs
puts titles.first.width

TODO

  • Metadata
  • Chapter
  • AudioTrack
  • Subtitle
  • Attachment

About

Ruby bindings to libhb

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published