Select and move files were video codec is x264

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
NapoleonAG
Posts: 5
Joined: 03 Feb 2018, 21:40

Select and move files were video codec is x264

Post by NapoleonAG »

hello—
I'm new to scripting for FileBot, so I'm sorry. I have been trying to find a way to have FileBot use its function of -mediainfo to move media files that aren't x264, live XVID to a separate folder to be Converted.

I'm using this to scan my folder:

Code: Select all

Filebot -mediainfo "Z:\videos\" -r --format "{fn} {ext} {resolution} {vc} {af}" 
I was trying to use --filter "resolution<>x264 no good.

I only want to keep the MPG4 and x264 (for Roku). I'm trying to keep everything direct play; no transcoding. If it’s not directly compatible with Roku I'd like to convert it.

I'd speculate if I could output a list (txt) of just the undesired files (AVC, XVID, DIVX, etc..), I could write another script to process that list for video conversion.

I can't find the information I'm searching for in the forum; can someone please provide me a reference link?
Thanks in advance...
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Using the -mediainfo option / sort for conversion

Post by rednoah »

I think you're looking to examples on how to rename generic files (without matching them to online databases):
viewtopic.php?f=4&t=4788

e.g. try this:

Code: Select all

filebot -rename -r /path/to/files --db xattr -non-strict --filter "vf =~ /x264/" --output "/path/to/output/folder" --format "{fn} [{resolution} {vc} {af}]" --action test
-rename ... move files (you can change --action copy to copy files or perform other actions)
--db xattr -non-strict ... match files to local metadata instead of online metadata (-non-strict enables processing of files that have not been tagged with xattr metadata)
--filter "vc =~ /x264/" ... select only files were video codec is x264

:idea: Add --action test the first time around for a dry-run to see what happens. ;)
NapoleonAG
Posts: 5
Joined: 03 Feb 2018, 21:40

Re: Select and move files were video codec is x264

Post by NapoleonAG »

Thanks for your reply.
I was not actually looking to rename the files. I just wanted to use the '-medainfo' option to identify and then move the files that were not x264 into a folder where those videos could be converted to a standard h.264/MP4 format.

But with the information you provided, I was able to make it work.

This is what I did:

Code: Select all

filebot -rename "Z:\SourcePath" --db xattr -non-strict --filter "vc =~ /AVC/" --output "Z:\Reconvert" --format "{fn}" --action move
This will allow me to scan my video folder, weed out the non-standard video formats (e.g. AVC) to a staging folder for reconversion with HandBrake. As I find other video formats, I'll do another cmd line to look for that format (e.g. XVID).

Thank you very much.
I appreciate it…
Post Reply