[FFmpeg-user] Controlling an ffmpeg stream?
Roy Pardi
lists at roypardi.com
Thu Sep 8 00:00:27 EEST 2016
Hi, I am new to the list and also to ffmpeg so this is likely to be a naive question.
My question concerns the command line version of ffmpeg. I am developing a cross-platform app in Adobe AIR and the problem I am trying to solve is being able to seek to an arbitrary point in a video file without having to render the video with a keyframe every frame. I am able to launch ffmpeg in the background and pipe a stream of an existing video file to my client app. Here are my questions:
1. Am I wrong in my understanding that ffmpeg will seek to a requested time, rendering from the nearest keyframe?
2. Using Actionscript I can successfully launch ffmpeg with:
ffmpeg -re -i test.mp4 -c:a copy -c:v copy -f flv -
and subscribe to the stream and display it. I am also able to seek using:
ffmpeg -ss 300 -re -i test.mp4 -c:a copy -c:v copy -f flv -
What I am not able to do is to communicate with or control ffmpeg through stdin once it has started streaming, either to tell it to seek or to pause the stream. I can’t tell if my code is bad or if I misunderstanding the ffmpeg command line tool. Is the tool only designed for a "set up/run/exit” usage scenario.
I can provide more details if needed.
Thanks,
–Roy
More information about the ffmpeg-user
mailing list