Updated the batch file and getting close to being happy with it... it's starting to work pretty well now with Roksbox. The update looks at the show name assuming the format "
show name - episode name" and after it's done it's magic, will move all the episode files into a subdirectory named 'show name' (if one exists). Definitely helps with organization.
@echo off
:: bifcreate.cmd v0.1
:: Given an .m4v file, use ffmpeg and biftool to
:: create a bif file for the video, and organize the
:: output if desired
:: Requires python for 'jpgrenamer.py' because I'm lazy
:: Set main directories & files here
set BIFTOOL="C:\Users\Home\Tivo\roku\biftool.exe"
set FFMPEG="C:\Users\Home\Tivo\ffmpeg\ffmpeg.exe"
set JPGRENAMER="C:\Users\Home\Tivo\jpgrenamer.py"
set TIVODATA=C:\Users\Home\Tivo\Data
set TIVOFILE=%1
cd "%TIVODATA%"
:: Extract temporary folder name we'll use
for %%i in (%TIVOFILE%) do set NEWFOLDER=%%~ni
:: Extract the series name so we can place the output into an
:: appropriately named subfolder if necessary
for /f "tokens=1 delims=-" %%a in (%TIVOFILE%) do set SHOWNAME=%%a
:: Extract the name of the BIF file to check and see if it's already been created
for %%i in (%TIVOFILE%) do set BIFFILE=%%~ni.bif
if exist "%BIFFILE%" goto EXIT
echo Processing %TIVOFILE% into %NEWFOLDER%...
mkdir "%TIVODATA%\temp\%NEWFOLDER%"
:: Extract a JPG every 10 seconds and place it in the temp folder we created
%FFMPEG% -v 0 -i %TIVOFILE% -r .1 -s 320x240 "%TIVODATA%\temp\%NEWFOLDER%\%%08d.jpg"
cd "%TIVODATA%\temp\%NEWFOLDER%"
:: FFMPEG duplicates the first file
del 00000001.jpg
:: Now we have to rename all the files to properly align them for BIFTool
%JPGRENAMER%
cd "%TIVODATA%"
:: Run Biftool
%BIFTOOL% -t 10000 "%TIVODATA%\temp\%NEWFOLDER%"
:: Cleanup
del "%TIVODATA%\temp\%NEWFOLDER%\*.jpg"
rmdir "%TIVODATA%\temp\%NEWFOLDER%"
:: Put the episode in a folder for the series if one exists
if exist "%SHOWNAME%" move "%TIVODATA%\%NEWFOLDER%*" "%SHOWNAME%"
:EXIT