Originally Posted by
sohlinux
Hi,
I have a folder full of videos, I want to use ffmpeg to get the video info from all the videos in the folder and its sub_folders recursively and sent to a file.txt but it must show the folder name and the video info under it.
at the moment I can only get the video info by going in to each directory and typing ffmpeg -i
[...]
Using ffmpeg in this manner, you'd be processing std error stream instead of the normal std output, it'd be slower and the output would be limited, (I've done that too before).
In this case one tool I'd recommend is mediainfo (it's in the repos) - it has a cleaner output and more info:
Code:
cd /path/to/videos
find "$(pwd)" -type f -print0 | xargs -0 mediainfo > video_media_info
Anyway if no other option is available ffmpeg slower option is:
Code:
find "$(pwd)" -type f -exec ffmpeg -i {} \; 2> video_ffmpeg_output
Then you can parse the files' output for each video individually. If needed use find's -name (or its other options) to refine its output.
Bookmarks