CCExtractor

Share your ARGUS TV tips & tricks here
Post Reply
User avatar
tompa
Posts: 594
Joined: Tue May 05, 2009 11:18 pm
Location: Sweden

CCExtractor

Post by tompa » Thu Apr 10, 2014 8:35 am

When I started to run XBMC here Iv found one main problem, the lack of good subtitle support for (recorded) TV.
Then I found ccextractor that could fix this problem in some sense - http://ccextractor.sourceforge.net/

Iv put together a small batch file that could run in the recording directory to output .srt-files (subtitles file).
Disclaimer: run it on your own risk

Code: Select all

@echo off
SETLOCAL
set ccextract=C:\ccextractorwin.exe

FOR /D /R %%i IN (*) DO (
	IF NOT EXIST "%%i\*.srt" (
	echo run ccextract
	cd %%i\
	
rem run page 199 for recordings including "channel1"
	FOR %%a IN (*channel1*.ts) DO (
	"%ccextract%" "%%a" -tpage 199
	)

rem run page 690 for recordings including "channel2"
	FOR %%a IN (*channel2*.ts) DO (
	"%ccextract%" "%%a" -tpage 690
	)
	) ELSE (
	echo dont run ccextract
	)
)
echo Done!
pause
I hope it could be useful to someone.
/tompa

User avatar
tompa
Posts: 594
Joined: Tue May 05, 2009 11:18 pm
Location: Sweden

Re: CCExtractor

Post by tompa » Wed Apr 16, 2014 10:35 am

An updated version that handles multiple recordings in subfolders.

Code: Select all

@echo off
SETLOCAL
rem path to ccextractor
set ccextract=C:\ccextractorwin.exe

rem *** copy from here to... ***
rem run page 199 for recordings including "channel1"
FOR /R %%i IN (*channel1*.ts) DO (
	IF NOT EXIST "%%~pi%%~ni.srt" (
	echo NO .srt file - Run CCExtract for %%~nxi
	"%ccextract%" "%%i" -tpage 199
	)
)
rem *** ...to here for a new channel ***

rem *** copy from here to... ***
rem run page 690 for recordings including "channel2"
FOR /R %%i IN (*channel2*.ts) DO (
	IF NOT EXIST "%%~pi%%~ni.srt" (
	echo NO .srt file - Run CCExtract for %%~nxi
	"%ccextract%" "%%i" -tpage 690
	)
)
rem *** ...to here for a new channel ***

echo Done!
pause
/tompa

edit: and of course, let me know if you need any help or clarification!

User avatar
tompa
Posts: 594
Joined: Tue May 05, 2009 11:18 pm
Location: Sweden

Re: CCExtractor

Post by tompa » Tue Nov 18, 2014 10:46 am

Did two small updates.
- possible to run it during ongoing recordings with -stream command.
- output as .swe.srt file with -o command.

Code: Select all

rem *** copy from here to... ***
FOR /R %%i IN (*channel*.ts) DO (
   IF NOT EXIST "%%~pi%%~ni.swe.srt" (
   echo NO .srt file - Run CCExtract for %%~nxi
   "%ccextract%" "%%i" -tpage 199 --stream 30 -o "%%~pi%%~ni.swe.srt"
   )
)
rem *** ...to here for a new channel *** 
/tompa

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest