home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
TV Thumbnailer - Custom Rec TV Thumbs / Better h264 support
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="gonzo90017" data-source="post: 926686" data-attributes="member: 129471"><p>I can't get it working. I followed the instructions in the wiki. But when I click on Test I only see the cmd window very briefly. I checked the log files but they are empty.</p><p>[CODE]timeout 780 /nobreak</p><p>@echo off</p><p> </p><p>echo ______________________________________________________________________________________________ >> Thumbs_TVServerGenerated.log</p><p>echo. >> Thumbs_TVServerGenerated.log</p><p>echo Started: %time% %date% >> Thumbs_TVServerGenerated.log</p><p>echo. >> Thumbs_TVServerGenerated.log</p><p> </p><p>REM ######################################</p><p>REM # Turn the command line arguments into a</p><p>REM # single string called path_and_filename</p><p>REM ######################################</p><p> </p><p>SET AA=%~1</p><p>SET AB=%~2</p><p>SET AC=%~3</p><p>SET AD=%~4</p><p>SET AE=%~5</p><p>SET AF=%~6</p><p>SET AG=%~7</p><p>SET AH=%~8</p><p>SET AI=%~9</p><p>SHIFT</p><p>SHIFT</p><p>SHIFT</p><p>SHIFT</p><p>SHIFT</p><p>SHIFT</p><p>SHIFT</p><p>SHIFT</p><p>SHIFT</p><p>SET AJ=%~1</p><p>SET AK=%~2</p><p>SET AL=%~3</p><p>SET AM=%~4</p><p>SET AN=%~5</p><p>SET AO=%~6</p><p>SET AP=%~7</p><p>SET AQ=%~8</p><p>SET AR=%~9</p><p>set "path_and_filename=%AA% %AB% %AC% %AD% %AE% %AF% %AG% %AH% %AI% %AJ% %AK% %AL% %AM% %AN% %AO% %AP% %AQ% %AR%"</p><p> </p><p> </p><p>REM ######################################</p><p>REM # Split path_and_filename into the following variables</p><p>REM # filepath, filename, showname, channelname</p><p>REM ######################################</p><p> </p><p>for %%F in ("%path_and_filename%") do (</p><p> set "fileName=%%~nF"</p><p> set "filePath=%%~dpF"</p><p>)</p><p> </p><p>for %%F in ("%filePath%..") do set "fileGrandparentFolder=%%~nF"</p><p> </p><p>for /f "tokens=1,2 delims=-" %%a in ("%filename%") do set showname=%%a&set channelname=%%b</p><p> </p><p>set showname=%showname:~0,-1%</p><p>set channelname=%channelname:~1,-1%</p><p> </p><p>REM If the recordings are not in the main rec folder then the channel name is incorrectly</p><p>REM parsed as the first 3 digits of the year and it needs to be taken</p><p>REM from the grandparent_folder name of the .ts file</p><p> </p><p>set ThreeDigitYear=%date%</p><p>set ThreeDigitYear=%ThreeDigitYear:~-4%</p><p>set ThreeDigitYear=%ThreeDigitYear:~0,-1%</p><p> </p><p>if "%channelname%"=="%ThreeDigitYear%" (</p><p> set channelname=%filegrandparentfolder%</p><p> ) ELSE (</p><p> rem do nothing</p><p> )</p><p> </p><p> </p><p>REM ######################################</p><p>REM # WRITE SOME INFORMATION TO THE LOG FILE</p><p>REM ######################################</p><p> </p><p>echo Arguments : %path_and_filename% >> Thumbs_TVServerGenerated.log</p><p>echo Path : %filepath% >> Thumbs_TVServerGenerated.log</p><p>echo Filename : %filename% >> Thumbs_TVServerGenerated.log</p><p>echo TV Channel : %channelname% >> Thumbs_TVServerGenerated.log</p><p>echo Showname : %showname% >> Thumbs_TVServerGenerated.log</p><p>echo MP TV Rec Thumbs : %ALLUSERSPROFILE%\Team Mediaportal\Mediaportal\Thumbs\TV\Recorded\ >> Thumbs_TVServerGenerated.log</p><p>echo. >> Thumbs_TVServerGenerated.log</p><p> </p><p>echo Arguments : %path_and_filename%</p><p>echo Path : %filepath%</p><p>echo Filename : %filename%</p><p>echo TV Channel : %channelname%</p><p>echo Showname : %showname%</p><p>echo MP TV Thumbs : %ALLUSERSPROFILE%\Team Mediaportal\Mediaportal\Thumbs\TV\Recorded\</p><p>echo.</p><p> </p><p>echo TV SHOW THUMBS >> Thumbs_TVServerGenerated.log</p><p>dir /b .\show_thumbs\*.jpg >> Thumbs_TVServerGenerated.log</p><p>echo. >> Thumbs_TVServerGenerated.log</p><p>echo CHANNEL THUMBS >> Thumbs_TVServerGenerated.log</p><p>dir /b .\channel_thumbs\*.jpg >> Thumbs_TVServerGenerated.log</p><p>echo. >> Thumbs_TVServerGenerated.log</p><p> </p><p> </p><p>REM ######################################</p><p>REM # CHECK THE TV RECORDING EXISTS</p><p>REM ######################################</p><p> </p><p>if EXIST "%path_and_filename%" (</p><p> rem file exists</p><p> ) ELSE (</p><p> echo. ERROR %path_and_filename% - FILE DOES NOT EXIST!!>> Thumbs_TVServerGenerated.log</p><p> echo. >> Thumbs_TVServerGenerated.log</p><p> echo ABORTING... >> Thumbs_TVServerGenerated.log</p><p> echo. >> Thumbs_TVServerGenerated.log</p><p> echo ERROR - %path_and_filename% - No such file!</p><p> echo.</p><p> goto endofbatfile</p><p> )</p><p> </p><p> </p><p>REM ######################################</p><p>REM # Use a predefined tvshow thumbnail</p><p>REM # If available</p><p>REM ######################################</p><p> </p><p>if EXIST ".\show_thumbs\%showname%.jpg" (</p><p> echo Creating thumbnail using %showname%.jpg >> Thumbs_TVServerGenerated.log</p><p> copy /y ".\show_thumbs\%showname%.jpg" "%filepath%\%filename%.jpg"</p><p> copy /y ".\show_thumbs\%showname%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%.jpg"</p><p> copy /y ".\show_thumbs\%showname%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%L.jpg"</p><p> goto almostdone</p><p> )</p><p> </p><p> </p><p> </p><p> </p><p> </p><p>REM ######################################</p><p>REM # Use a predefined tvchannel thumbnail</p><p>REM # If available</p><p>REM ######################################</p><p> </p><p>if EXIST ".\channel_thumbs\%channelname%.jpg" (</p><p> echo Creating thumbnail using %channelname%.jpg >> Thumbs_TVServerGenerated.log</p><p> copy /y ".\channel_thumbs\%channelname%.jpg" "%filepath%\%filename%.jpg"</p><p> copy /y ".\channel_thumbs\%channelname%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%.jpg"</p><p> copy /y ".\channel_thumbs\%channelname%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%L.jpg"</p><p> goto almostdone</p><p> )</p><p> </p><p> </p><p>REM ######################################</p><p>REM # Since there are no available tvshow or</p><p>REM # tvchannel thumbs, use ffmpeg to create</p><p>REM # A thumbnail @ 720 seconds</p><p>REM ######################################</p><p> </p><p>echo Creating Thumbnail using ffmpeg >> Thumbs_TVServerGenerated.log</p><p> </p><p> </p><p>ffmpeg.exe -ss 720 -itsoffset -5 -i "%path_and_filename%" -vframes 1 -y "%filepath%%filename%.jpg"</p><p> </p><p>copy /y "%filepath%%filename%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%.jpg"</p><p>copy /y "%filepath%%filename%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%L.jpg"</p><p> </p><p> </p><p>:almostdone</p><p> </p><p> </p><p>REM ######################################</p><p>REM # Run COMSKIP ON THE .TS RECORDING NOW</p><p>REM # JUST REMOVE ALL OF THE REM STATMENTS</p><p>REM # IN THE LINE BELOW AND CHANGE THE</p><p>REM # PATH TO COMSKIP</p><p>REM ######################################</p><p> </p><p>echo. >> Thumbs_TVServerGenerated.log</p><p>echo Running comskip... >> Thumbs_TVServerGenerated.log</p><p>C:\MediaWah\Programs\comskip\comskip.exe -t "%path_and_filename%"</p><p> </p><p> </p><p>REM ######################################</p><p>REM # CLOSE THE LOG FILE</p><p>REM ######################################</p><p> </p><p>echo. >> Thumbs_TVServerGenerated.log</p><p>echo Finished: %time% %date% >> Thumbs_TVServerGenerated.log</p><p>echo. >> Thumbs_TVServerGenerated.log</p><p> </p><p> </p><p>:endofbatfile</p><p> </p><p>pause[/CODE]</p></blockquote><p></p>
[QUOTE="gonzo90017, post: 926686, member: 129471"] I can't get it working. I followed the instructions in the wiki. But when I click on Test I only see the cmd window very briefly. I checked the log files but they are empty. [CODE]timeout 780 /nobreak @echo off echo ______________________________________________________________________________________________ >> Thumbs_TVServerGenerated.log echo. >> Thumbs_TVServerGenerated.log echo Started: %time% %date% >> Thumbs_TVServerGenerated.log echo. >> Thumbs_TVServerGenerated.log REM ###################################### REM # Turn the command line arguments into a REM # single string called path_and_filename REM ###################################### SET AA=%~1 SET AB=%~2 SET AC=%~3 SET AD=%~4 SET AE=%~5 SET AF=%~6 SET AG=%~7 SET AH=%~8 SET AI=%~9 SHIFT SHIFT SHIFT SHIFT SHIFT SHIFT SHIFT SHIFT SHIFT SET AJ=%~1 SET AK=%~2 SET AL=%~3 SET AM=%~4 SET AN=%~5 SET AO=%~6 SET AP=%~7 SET AQ=%~8 SET AR=%~9 set "path_and_filename=%AA% %AB% %AC% %AD% %AE% %AF% %AG% %AH% %AI% %AJ% %AK% %AL% %AM% %AN% %AO% %AP% %AQ% %AR%" REM ###################################### REM # Split path_and_filename into the following variables REM # filepath, filename, showname, channelname REM ###################################### for %%F in ("%path_and_filename%") do ( set "fileName=%%~nF" set "filePath=%%~dpF" ) for %%F in ("%filePath%..") do set "fileGrandparentFolder=%%~nF" for /f "tokens=1,2 delims=-" %%a in ("%filename%") do set showname=%%a&set channelname=%%b set showname=%showname:~0,-1% set channelname=%channelname:~1,-1% REM If the recordings are not in the main rec folder then the channel name is incorrectly REM parsed as the first 3 digits of the year and it needs to be taken REM from the grandparent_folder name of the .ts file set ThreeDigitYear=%date% set ThreeDigitYear=%ThreeDigitYear:~-4% set ThreeDigitYear=%ThreeDigitYear:~0,-1% if "%channelname%"=="%ThreeDigitYear%" ( set channelname=%filegrandparentfolder% ) ELSE ( rem do nothing ) REM ###################################### REM # WRITE SOME INFORMATION TO THE LOG FILE REM ###################################### echo Arguments : %path_and_filename% >> Thumbs_TVServerGenerated.log echo Path : %filepath% >> Thumbs_TVServerGenerated.log echo Filename : %filename% >> Thumbs_TVServerGenerated.log echo TV Channel : %channelname% >> Thumbs_TVServerGenerated.log echo Showname : %showname% >> Thumbs_TVServerGenerated.log echo MP TV Rec Thumbs : %ALLUSERSPROFILE%\Team Mediaportal\Mediaportal\Thumbs\TV\Recorded\ >> Thumbs_TVServerGenerated.log echo. >> Thumbs_TVServerGenerated.log echo Arguments : %path_and_filename% echo Path : %filepath% echo Filename : %filename% echo TV Channel : %channelname% echo Showname : %showname% echo MP TV Thumbs : %ALLUSERSPROFILE%\Team Mediaportal\Mediaportal\Thumbs\TV\Recorded\ echo. echo TV SHOW THUMBS >> Thumbs_TVServerGenerated.log dir /b .\show_thumbs\*.jpg >> Thumbs_TVServerGenerated.log echo. >> Thumbs_TVServerGenerated.log echo CHANNEL THUMBS >> Thumbs_TVServerGenerated.log dir /b .\channel_thumbs\*.jpg >> Thumbs_TVServerGenerated.log echo. >> Thumbs_TVServerGenerated.log REM ###################################### REM # CHECK THE TV RECORDING EXISTS REM ###################################### if EXIST "%path_and_filename%" ( rem file exists ) ELSE ( echo. ERROR %path_and_filename% - FILE DOES NOT EXIST!!>> Thumbs_TVServerGenerated.log echo. >> Thumbs_TVServerGenerated.log echo ABORTING... >> Thumbs_TVServerGenerated.log echo. >> Thumbs_TVServerGenerated.log echo ERROR - %path_and_filename% - No such file! echo. goto endofbatfile ) REM ###################################### REM # Use a predefined tvshow thumbnail REM # If available REM ###################################### if EXIST ".\show_thumbs\%showname%.jpg" ( echo Creating thumbnail using %showname%.jpg >> Thumbs_TVServerGenerated.log copy /y ".\show_thumbs\%showname%.jpg" "%filepath%\%filename%.jpg" copy /y ".\show_thumbs\%showname%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%.jpg" copy /y ".\show_thumbs\%showname%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%L.jpg" goto almostdone ) REM ###################################### REM # Use a predefined tvchannel thumbnail REM # If available REM ###################################### if EXIST ".\channel_thumbs\%channelname%.jpg" ( echo Creating thumbnail using %channelname%.jpg >> Thumbs_TVServerGenerated.log copy /y ".\channel_thumbs\%channelname%.jpg" "%filepath%\%filename%.jpg" copy /y ".\channel_thumbs\%channelname%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%.jpg" copy /y ".\channel_thumbs\%channelname%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%L.jpg" goto almostdone ) REM ###################################### REM # Since there are no available tvshow or REM # tvchannel thumbs, use ffmpeg to create REM # A thumbnail @ 720 seconds REM ###################################### echo Creating Thumbnail using ffmpeg >> Thumbs_TVServerGenerated.log ffmpeg.exe -ss 720 -itsoffset -5 -i "%path_and_filename%" -vframes 1 -y "%filepath%%filename%.jpg" copy /y "%filepath%%filename%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%.jpg" copy /y "%filepath%%filename%.jpg" "%ALLUSERSPROFILE%\Team MediaPortal\MediaPortal\thumbs\tv\Recorded\%filename%L.jpg" :almostdone REM ###################################### REM # Run COMSKIP ON THE .TS RECORDING NOW REM # JUST REMOVE ALL OF THE REM STATMENTS REM # IN THE LINE BELOW AND CHANGE THE REM # PATH TO COMSKIP REM ###################################### echo. >> Thumbs_TVServerGenerated.log echo Running comskip... >> Thumbs_TVServerGenerated.log C:\MediaWah\Programs\comskip\comskip.exe -t "%path_and_filename%" REM ###################################### REM # CLOSE THE LOG FILE REM ###################################### echo. >> Thumbs_TVServerGenerated.log echo Finished: %time% %date% >> Thumbs_TVServerGenerated.log echo. >> Thumbs_TVServerGenerated.log :endofbatfile pause[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
TV Thumbnailer - Custom Rec TV Thumbs / Better h264 support
Contact us
RSS
Top
Bottom