[FFmpeg-user] Controlling an ffmpeg stream?

Roy Pardi lists at roypardi.com
Wed Sep 21 00:45:16 EEST 2016

> On Sep 8, 2016, at 12:23 AM, Reuben Martin <reuben.m at gmail.com> wrote:
> You can send commands to ffmpeg via stdin, however be aware that you have to 
> use filters rather than regular ffmpeg arguments to do so. For example, the 
> command you gave would be modified to this:
> ffmpeg -f lavfi -i movie=filename=’test.mp4’:streams=0+1[out0][out1]  -c:a 
> copy -c:v copy -f flv -
> And the command would be the “seek” command. You can read about it here under 
> the “commands” sub-section:
> http://www.ffmpeg.org/ffmpeg-filters.html#movie-1

I posted a couple of weeks ago but I am still struggling with this.

To recap. . . I am using Adobe AIR and Actionscript to launch ffmpeg using AIR’s NativeProcess <http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/NativeProcess.html>
I can successfully load a video using this:

	ffmpeg -re -i  test.mp4  -c:a copy -c:v copy -f flv -

but I want to be able to communicate with ffmeg after the stream starts in order to seek. I’ve tried the suggestion about about using filters but I don’t have the syntax right (I guess). I don’t get an error but nothing happens. I realize that probably no one here is familiar with Actionscript, etc. but maybe that doesn’t matter as much as the syntax I am using in my command

Based on the suggestion above I am building a string and then writing it to stdin

var cmd:String = "-f lavfi -i movie=filename='" + videoPath + "':streams=0+1[out0][out1]  -c:a copy -c:v copy -f flv -"

ffmpegProcess.standardInput.writeUTF(cmd + "\n");

Can someone give me a nudge in the right direction? What I am trying to do is build a video player using ffmpeg so I can use video formats which are not supported by AIR.



More information about the ffmpeg-user mailing list