[FFmpeg-user] Play from a FileDescriptor

Tom Evans tevans.uk at googlemail.com
Mon Feb 10 10:50:07 CET 2014


On Sat, Feb 8, 2014 at 12:05 PM, Fabian Schuetz
<fabian.m.schuetz at googlemail.com> wrote:
> Hello,
>
> I am using https://github.com/appunite/AndroidFFmpeg in an Android-Project
> and was looking to add a way to the library to play from a Java FileDescriptor.
>
> It is possible to get a low-level fd from a Java FileDescriptor.
> And I know that ffmpeg supports the 'pipe' protocol, to play from stdin, f.e.
>
> So I think it should not be too much effort to write some jni-code that allows playing
> from a FileDescriptor. However I cannot find the write function to start from in ffmpeg.
>
> Any leads would be great.
>
> Thanks,
> Fabian

Why would you need to change anything in ffmpeg?

Simply pass the fd as stdin when you spawn the ffmpeg process - and
how you do that depends on your programming language of choice, not
ffmpeg.

"Java pass file descriptor as stdin" should get you going.

Cheers

Tom


More information about the ffmpeg-user mailing list