[FFmpeg-user] Runtime conversion from byte array
Tom Evans
tevans.uk at googlemail.com
Wed Mar 14 18:19:35 CET 2012
On Wed, Mar 14, 2012 at 3:48 PM, Jeff Mihalik <jeff.mihalik at gmail.com> wrote:
> Hello,
>
> I am creating a java project where the goal is to receive byte arrays of
> mpeg-2 videos from the database and convert them at runtime to mpeg-4
> videos (also as byte arrays, to pass to another application for display).
> ffmpeg seems like the right tool for the conversion, but every command line
> example I have seen takes a file as an input and saves off the output as a
> file. I do not have the option of storing the videos on the file
> structure, hence I have an input of a byte array mpeg-2, and an output of a
> byte array mpeg-4. Is it possible to convert from a byte array of an
> MPEG-2 to a byte array of an MPEG-4 (using java) through ffmpeg, or are
> real files necessary? I would try this out for myself, but my company
> takes weeks to approve new software so I want to determine if it is
> possible before requesting the software. Thank you.
>
> -Jeff
ffmpeg can read from stdin and write to stdout*, so can be inserted
into any application trivially. Embedding it into your application is
not necessary.
Cheers
Tom
* Assuming containers that can be read/written in that manner, eg mpeg-ts
More information about the ffmpeg-user
mailing list