Created
September 8, 2015 10:06
-
-
Save rasheedamir/79c390fe21884666fe44 to your computer and use it in GitHub Desktop.
find fps - frames per second
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String query = "ffmpeg -i foo.avi 2>&1 | sed -n 's/.*, \\(.*\\) fp.*/\\1/p' > fps.txt"; | |
| String[] command = {"gnome-terminal", "-x", "/bin/sh", "-c", query}; | |
| Process process = Runtime.getRuntime().exec(command); | |
| process.waitFor(); | |
| Thread.sleep(2000); | |
| try { | |
| BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("fps.txt"))); | |
| output = br.readLine(); | |
| } catch (IOException ioe) { | |
| ioe.printStackTrace(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment