FORUMS: list search recent posts

Extracting position from ffplay in real time

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
James d'Authreau
Extracting position from ffplay in real time
on May 18, 2012 at 11:16:15 am

Hope someone can help, I am wanting to make a simple trimmer using ffmpeg / ffplay (in windows), and I am stuck on how to get the position in seconds programmatically in real time whilst the video is running in ffplay, so I can use it to edit later. I know how to send stdout to a file, which can then be parsed, but that can only be done after the play finishes, so I guess i need to be able to send the stdout to a variable. Ideally I would like to do this in a command line, but open to other ideas!


Return to posts index

Reuben Martin
Re: Extracting position from ffplay in real time
on May 20, 2012 at 3:58:51 am

ffplay -vf showinfo myvideo.ext


Return to posts index

James d'Authreau
Re: Extracting position from ffplay in real time
on May 20, 2012 at 1:07:38 pm

Thanks, that shows the necessary info on the command line, however what I am struggling with is how to take the data and do something with it programmatically.


Return to posts index


Reuben Martin
Re: Extracting position from ffplay in real time
on May 21, 2012 at 1:59:02 am

Redirect stderr output to whatever you plan to use to parse the text output. Please note that if you are trying to do this on windows, that A) You must enjoy pain and B) You will need more then the standard DOS tools to implement something like that.

If you were doing this on a *nix machine, you would direct stderr to a named pipe, then assign a file descriptor to the pipe to avoid blocking, and then access the file descriptor with a script of some sort to parse and act upon the stream of text.


Return to posts index

James d'Authreau
Re: Extracting position from ffplay in real time
on May 23, 2012 at 9:35:30 am

Glory be! thanks, unfortunately it has to be windows, I am playing about using autohotkey, a scripting tool which can call dlls, hopefully eventually I will sort it


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]