2010-03-04, 06:19 AM
I created a new batch file to call CopyImageFile. I added a call to it to the <CustomFFmpegConversions> section of config.xml. Now you can select you video file in Video Library and use Transform to copy your image to the location that BurnDVD2 will look for it.
The line in config.xml:
The new batch file:
It assumes that CopyImageFile.exe is in the Third Party directory. You need to have a file with a name like: C:\Recordings\Burn Notice\Burn Notice_20100218_22002300.mpg. The key thing is that the directory is the show name.
It will first look for folder.jpg in the same directory as the mpg file. If it doesn't find that, it will look for ..\media\art\{show name}.jpg. If that doesn't work, it will create a snap shot from the current resume point in the show. (I copied the last part from snap.bat. I forget who wrote that.)
See my post above for CopyImageFile.exe.
The line in config.xml:
Code:
<Conversion name="Copy show image." exe="CopyImage.bat" cmd=" {SOURCE_FILE} " targetExtension=".mpg" />
The new batch file:
Code:
@echo off
cls
cd "third party"
if exist "%~dpn1.jpg" goto :eof
:tryFolder
if not exist "%~dp1folder.jpg" goto :tryMediaArt
copy "%~dp1folder.jpg" "%~dpn1.jpg"
goto :eof
:tryMediaArt
rem need to get from %1 to just single dir ("....\Recordings\White Collar\White Collar_20100302_22002300.mpg" ==> "White Collar")
CopyImageFile %1 "%~dpn1.jpg"
if not errorlevel 1 goto :eof
rem CopyImageFile sets errorlevel if it can't do the copy, but doesn't set it if it can do the copy
:create
rem Copied from snap.bat
set db=..\GBPVR.DB3
for /f "usebackq tokens=1,2 delims=, " %%v in (`..\sqlite3 -separator ": " "%db%" "SELECT last_position FROM PLAYBACK_POSITION where filename like '%%%~n1%%'; " `) do if "%%v" NEQ "" @set seconds=%%v
ffmpeg\ffmpeg -aspect 4:3 -y -an -ss %seconds% -aspect 4:3 -vframes 1 -i "%~1" -f image2 -aspect 4:3 -an -s 720x480 "%~dpn1.jpg"
:eof
It assumes that CopyImageFile.exe is in the Third Party directory. You need to have a file with a name like: C:\Recordings\Burn Notice\Burn Notice_20100218_22002300.mpg. The key thing is that the directory is the show name.
It will first look for folder.jpg in the same directory as the mpg file. If it doesn't find that, it will look for ..\media\art\{show name}.jpg. If that doesn't work, it will create a snap shot from the current resume point in the show. (I copied the last part from snap.bat. I forget who wrote that.)
See my post above for CopyImageFile.exe.