3

Is there any way that I can see frames for multiple videos at same time in one file?

I know how to do that for one video -

ffprobe -show_frames http://myvirtualdirectory/myvideo.mp4 > output.txt

I have so many videos in my virtual directory - so I want to see all the videos frames at one file.

And is there any way that I can see frames from my local directory - and not from virtual directory like (http://.... )

Ben
  • 91
  • 1
  • 2
  • 9

1 Answers1

6

Learn to use shell scripts.

Identify your local directory and make a simple script to append (>>) to the output file:

#!/bin/bash

for file in /path/to/files/*.mp4; do
  ffprobe -show_frames $file >> output.txt
done

Make the script executable using chmod +x show_frames.sh and run it with ./show_frames.sh.

aergistal
  • 29,947
  • 5
  • 70
  • 92
  • Thanks for your help, but I am new to this so really not sure how do I make script executable using chomd +x show_frames.sh ? Will really appreciate if you could explain step by step. I am using Ubuntu. Many thanks in advance :) – Ben May 03 '15 at 21:23
  • Here's a very basic step by step tutorial: http://linuxconfig.org/bash-scripting-tutorial – aergistal May 03 '15 at 21:36
  • Oh my God - Thanks Million aergistal - It totally worked for me - I spent so many days on this. Just a little problem - As I have so many videos in folder and your suggested command make one output.txt file - Is it possible in scripting to create individual file for each video in the folder? – Ben May 03 '15 at 23:07
  • Just replace the command with `ffprobe -show_frames $file > ${file}.txt`. It will create a file for each mp4, like `some_video.mp4.txt`. – aergistal May 04 '15 at 08:11
  • Yes certainly I will do - but where is that option to mark as solved ? – Ben May 05 '15 at 08:03
  • You click on the check mark to the left of the answer. – aergistal May 05 '15 at 08:42
  • Dear aergistal, Once again I really appreciate your help - it was alot to me. I am running this statement in shell; for file in /path/to/files/*.mp4; do ffprobe -show_frames $file | grep "data" > ${file}.txt It would be great if I could get this information too; a)When I grep data row with numbers then I want script to - divide that data numbers with 100, b) then calculate(sum) data row number every after 50 rows. – Ben May 07 '15 at 12:45