[Libav-user] use of ffmpeg on Web server to encode user submissions

Robert Krüger krueger at lesspain.de
Wed May 23 14:31:51 CEST 2012

On Tue, May 22, 2012 at 3:40 PM, Slava Paperno <sp27 at cornell.edu> wrote:
> I know that ffmpeg is used on Web servers to encode files submitted by
> users.
> I wonder if it is invoked by launching a process with a command-line call or
> by using an API.
whatever you want or find more suitable for your needs.

launching a process with a command line: much safer, because you
cannot shoot yourself in the leg with memory management stuff etc,
clumsy from a software integration perspective (but get's the job done
also for people running pretty complex, high-volume applications)
launching via API: much steeper learning curve, more flexible (but you
might not need that extra flexibility) but more dangerous (see above)

> I've heard an opinion that API is better/safer/more efficient than
> command-line calls. Any data on that?
depends of what kind of encoding you do but for any but the smallest
transcoding processes, I would guess that the command line startup
overhead is negligible compared to decoding, encoding.

> Is there an API-enabled Java encoder for ogg to mp3 conversion? I'll be
> calling it on the Web server from ColdFusion scripts.
Do you know Xuggler? If you don't check it out. However, there maybe
other audio-only converters if ogg to mp3 is all you want to do.

> Any advice will be appreciated.
My 2c: Look at your requirements and check if they can be satisfied
with simple command line invocation. If not and you are working in a
Java-based environment Xuggler is the way to check next because a
native integration using JNI or another mapping technique is doing it
the hard way and you don't want to do that without a good reason. YMMV



More information about the Libav-user mailing list