If so, please let me know I'm totally up for having a crack at it as
we need (want!) this for a startup project I'm working on.
Being able to grab the current FPS should be sufficient for a *good
enough* estimate.
Otherwise, potentially adding some optional benchmarking functionality
to RVideo (coupled with some storage and logic at the application
level, could help provide this)
Thoughts?
Best,
Dave
If you haven't seen it already, here is a blog post by Dmytro
Shteflyuk that discusses how to implement this in Ruby.
Cheers,
Jon
Maybe if the tool execution job yielded every time a progress update
occurs. Should be simple enough to do.
</2cents>
On Oct 24, 2:15 pm, Jon Dahl <jond...@gmail.com> wrote:
> Hi Dave. Job progress (e.g. 38% complete, 14 frames per second, etc.)
> would be a fantastic addition. I haven't done any work on this, but
> I'd love to see it added to RVideo. Let me know if you're still
> interested in working on this.
>
> If you haven't seen it already, here is a blog post by Dmytro
> Shteflyuk that discusses how to implement this in Ruby.
>
> http://kpumuk.info/ruby-on-rails/encoding-media-files-in-ruby-using-f...
On Nov 6, 4:04 pm, "Jon Dahl" <jond...@gmail.com> wrote:
> I'd say that a web app could be the GUI you mention, Andre. :)
> Done properly, encoding progress could be great. Imagine you are using DRb
> to encode a job in the background. DRb could communicate with your database
> every n seconds to notify your system of the job's progress. This could be
> used to update a visual progress bar on the screen.
>
> David, have you gotten a chance to work on this yet?
>
Later tonight I'm going to give a shot to a execute_with_progress
method that will yield every time progress changes and see how it
goes. I'll let you know tomorrow.
On Nov 6, 4:04 pm, "Jon Dahl" <jond...@gmail.com> wrote:
> I'd say that a web app could be the GUI you mention, Andre. :)
> Done properly, encoding progress could be great. Imagine you are using DRb
> to encode a job in the background. DRb could communicate with your database
> every n seconds to notify your system of the job's progress. This could be
> used to update a visual progress bar on the screen.
>
> David, have you gotten a chance to work on this yet?
>
Uploading patch to the files area.
Mencoder works with a different Regexp (don't know why, the other one
wouldn't work), and I can't tell if ffmpeg is working because I don't
get the duration: part on the status lines. Perhaps you can test it?
The code I used for testing was:
--------------------------------------------------------------8<--------------------------------------------------------------
require 'rubygems'
require 'rvideo/lib/rvideo'
FILE_PATH = "/home/changelog/Development/ruby"
command = "mencoder $input_file$ -o $output_file$ -oac lavc -ovc lavc -
lavcopts vcodec=xvid:acodec=mp3"
# command = "ffmpeg -y -i $input_file$ -vcodec mpeg2video -s 640x480
$output_file$"
options = {
:input_file => "#{FILE_PATH}/input_file.avi",
:output_file => "#{FILE_PATH}/processed_file.avi",
:progress => true
}
RVideo::Transcoder.logger = Logger.new(STDOUT)
transcoder = RVideo::Transcoder.new
transcoder.execute(command, "#{FILE_PATH}/input_file.avi",
"#{FILE_PATH}/processed_file.avi", options) do |progress|
puts "Progress: #{progress}"
end
--------------------------------------------------------------8<--------------------------------------------------------------