mardi 20 septembre 2016

Using ffmpeg with AIR

Does anyone have experience using ffmpeg with AIR? I have been able to load and play a video but I have not been able to communicate with ffmpeg through stdin in order to control the stream – to seek, pause, etc.

Apparently I need to use filters to communicate with a running instance of ffmpeg but I am struggling with the syntax (or else am misinformed 🙄 ).

Based on a few things gleaned from the web I am trying this but it doesn't do anything:

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");


Any tips would be most welcome!


Loading code (set up of the NetStream, etc. done elsewhere). This works.

ffmpegArgs = new Vector.<String>();
ffmpegArgs.push("-re", "-i",videoPath,"-c:a", "copy", "-c:v", "copy","-f", "flv", "-");

var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = ffmpegFile;
nativeProcessStartupInfo.arguments = ffmpegArgs;
ffmpegProcess.start(nativeProcessStartupInfo);

Aucun commentaire:

Enregistrer un commentaire