有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Android和JNI,将数据传输到FFmpeg

我正在尝试创建一个基于FFmpeg的元数据检索器。由于原始Android应用程序资源通常只能使用文件描述符访问,因此我需要一种通过JNI将这些数据传输到FFmpeg的方法。我知道FFmpeg支持“管道”协议:

UNIX pipe access protocol.

Allow to read and write from UNIX pipes.

The accepted syntax is: 

    pipe:[number]

number is the number corresponding to the file descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If number is not specified, by default the stdout file descriptor will be used for writing, stdin for reading.

For example: cat test.wav | ffmpeg -i pipe:0

我的问题是,如何使用JNI以编程方式模拟cat test.wav | ffmpeg -i pipe:0,如何使用FileDescriptor以编程方式模拟avformat_open_input?这可能吗


共 (1) 个答案