I often find myself needing to perform simple actions on large amounts of videos. I've used ffmpeg with batch files, but that's rather limited -- I need something more. I'm just not sure what. Do I learn to write AVIsynth scripts? Something more involved, like Python, incorporating ffmpeg? No idea. I'd appreciate it if someone could give me some tips as to what to study/look into.
For examples, here are some tasks I've needed to do;
- Assess every file within a folder (4,500 video files). If the resolution is 1 megapixel or greater, move to "Large" subfolder. If it's less, move to "Small" subfolder.
- Assess every file within a folder, and if its audio bitrate is over 192 Kbit, transcode it using LAME.
- Assess every file within a folder, and if its video bitrate is over 3 Mbit, transcode it using x264.
- Take 8 screenshots from even intervals within each video, and write the filename of that video into the image as a text overlay; ideally, put these 8 screenshots together in a grid and save as one low-quality JPEG file rather than 8 separate ones.
- Transcode all 1280x720 videos within a folder to a specific setting (say, DNxHD 80) and all 1920x1080 videos within a folder to a different setting (DNxHD 36).
- Transcode all videos that are currently MPEG-2.
And so on and so on, you get the idea. Not terribly complex things, but things beyond the reach of a batch file.
What's my best course of action here?
+ Reply to Thread
Results 1 to 4 of 4
You can use ffmpeg or mediainfo to identify the resolutions,bitrates, etc and then adjust reconvert settings. Probably easiest to write "batch" code in python,php or perl. If you have no idea how to code in them it will be terribly complex.
The screenshot with text overlay is probably the hardest thing. You can hardcode with ffmpeg now but I haven't tried it. Or try something like movie thumbnailer.
also, to add.. you might be able to configure mediainfo to only show the details you want to review (pixel dimensions, bitrate, etc) and then open a group of files in it (in sheet view) and export that into csv or excel and review from that view to analize, then decide what to group and process. if you configure it to show only a few details, it may run quicker, specially for those 4500 files you mentioned.
also, there is this discussion --> http://forum.videohelp.com/threads/352952-Batch-validate-large-number-of-video-files?p=2218328
What I do is write large scripts for myself.
Here's an example:
i do it in autoit scripting Language ..
But I do not know how long it will take you to learn it.
You can write entire programs in that language
Last edited by gil900; 5th Apr 2013 at 18:28.