Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9119133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:19:19+00:00 2026-06-17T05:19:19+00:00

I installed rvideo . gem install rvideo aptitude install ffmpeg I wrote the following

  • 0

I installed rvideo.

gem install rvideo
aptitude install ffmpeg

I wrote the following using rvideo while reading a manual.

#!/usr/bin/env ruby

file = RVideo::Inspector.new(:file => "/home/user/r/input.mp4")
file.fps        # => "29.97" 
file.duration   # => "00:40:23.4" 

transcoder = RVideo::Transcoder.new

recipe = "ffmpeg -i $input_file$ -ar 22050 -ab 64 -f flv -r 29.97 -s"
recipe += " $resolution$ -y $output_file$"
recipe += "\nflvtool2 -U $output_file$"
begin
transcoder.execute(recipe, {:input_file => "/home/user/r/input.mp4",
:output_file => "/home/user/r/output.flv", :resolution => "640x360"})
rescue TranscoderError => e
puts "Unable to transcode file: #{e.class} - #{e.message}"
end

transcoder.original     # RVideo::Inspector object
transcoder.processed    # RVideo::Inspector object

When I do:

$ ruby hw.rb

I get:

first.rb:3: uninitialized constant RVideo (NameError)

In the manual, I found this code:

require 'test/unit/assertions'
include Test::Unit::Assertions
puts assert_equal nil == nil, nil.nil?

How do I include rvideo library in my case? How do I know the path to the library?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:19:20+00:00Added an answer on June 17, 2026 at 5:19 am
    #!/usr/bin/env ruby
    
    require 'rubygems'
    require 'rvideo'
    
    file = RVideo::Inspector.new(:file => "/home/user/r/input.mp4")
    file.fps        # => "29.97" 
    file.duration   # => "00:40:23.4" 
    
    # rest of the code follows
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Installed rubyinstaller-1.8.7-p358.exe, then tried to install jammit , but the config.gem command isn't being
I installed FFMPEG using apt-get. It comes by default compiled with some options: configuration:
Installed rvm gem installed passenger when I try to install passenger-install-apache2-module it gives? root@c2h2crawler:~#
Installed rubyinstaller-1.9.2-p136 and ran the the following commands in the cmd prompt. gem update
I installed ruby 1.9.3 on Mountain Lion using: rvm install 1.9.3 This all worked
I installed redis and resque in Rails 2.3.8 by gem install redis and gem
I installed clojure-mode and slime using the emacs starter kit and I get this
Installed node-inspector via npm install -g nodeinspector. I can get to the dashboard but
Installed PEAR and followed the directions on http://www.phpunit.de/manual/current/en/installation.html : pear config-set auto_discover 1 pear
I installed Tomcat using the Windows installer ages ago and it runs fine as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.