One API idea:
RVideo.transcode("filename.mp4", "filename.avi",
:resolution => [640,480],
:video_codec => 'xvid',
:audio_codec => 'mp3')
Thanks for the suggestion. I'd like to do something like that at some
point, but I'm not exactly sure how.
I spent quite a bit of time thinking about the best way to define a
command. The problem is that ffmpeg is extremely complex, and a good
quality transcoding job often involves more than just resolution, codec,
format, etc. There are literally hundreds of other options that can be
set that control quality, file size, a/v sync, etc. So I didn't want to
reduce the power of ffmpeg by controlling the options too much.
So I decided for now to just do the simplest thing possible and pass in
a command with variable interpolation. This allows you to store recipes
on your system (in your database, in a yaml config file, etc.), and to
pass in whatever variables you want.
For now, you can certainly build your own RVideo recipe constructor,
which does exactly what you're describing. It should just output a
string, and then pass that string to a RVideo::Transcoder object.
Ilmari Heikkinen wrote:
>
> One API idea:
> RVideo.transcode("filename.mp4", "filename.avi",
> :resolution => [640,480],
> :video_codec => 'xvid',
> :audio_codec => 'mp3')
>
Thanks for the suggestion. I'd like to do something like that at some
point, but I'm not exactly sure how.
I spent quite a bit of time thinking about the best way to define a
command. The problem is that ffmpeg is extremely complex, and a good
quality transcoding job often involves more than just resolution, codec,
format, etc. There are literally hundreds of other options that can be
set that control quality, file size, a/v sync, etc. So I didn't want to
reduce the power of ffmpeg by controlling the options too much.
So I decided for now to just do the simplest thing possible and pass in
a command with variable interpolation. This allows you to store recipes
on your system (in your database, in a yaml config file, etc.), and to
pass in whatever variables you want.
So why not do both? Offer support for a few basic commands, resolution,
codecs, etc, and still provide a field :other_options or something to pass
in anything else you want. Then you're free to add more commands as they
become commonly used, but not reduce the flexibility or power of ffmpeg.
For now, you can certainly build your own RVideo recipe constructor,
···
On 10/3/07, Jon Dahl <jon@slantwisedesign.com> wrote:
which does exactly what you're describing. It should just output a
string, and then pass that string to a RVideo::Transcoder object.
Check VLC (video lan client) it's open source and they use ffmpeg. You might find some ideas in there.
···
On Oct 3, 2007, at 9:38 AM, Jon Dahl wrote:
Ilmari Heikkinen wrote:
One API idea:
RVideo.transcode("filename.mp4", "filename.avi",
:resolution => [640,480],
:video_codec => 'xvid',
:audio_codec => 'mp3')
Thanks for the suggestion. I'd like to do something like that at some
point, but I'm not exactly sure how.
I spent quite a bit of time thinking about the best way to define a
command. The problem is that ffmpeg is extremely complex, and a good
quality transcoding job often involves more than just resolution, codec,
format, etc. There are literally hundreds of other options that can be
set that control quality, file size, a/v sync, etc. So I didn't want to
reduce the power of ffmpeg by controlling the options too much.
So I decided for now to just do the simplest thing possible and pass in
a command with variable interpolation. This allows you to store recipes
on your system (in your database, in a yaml config file, etc.), and to
pass in whatever variables you want.
For now, you can certainly build your own RVideo recipe constructor,
which does exactly what you're describing. It should just output a
string, and then pass that string to a RVideo::Transcoder object.
--
Posted via http://www.ruby-forum.com/\.