Hello everyone.
I see a number of threads and thought I would make this important process available to Windows 10 users. I don’t know if this will work on other versions of windows. Testers are welcome.
Prerequisite: You need to have FFMPEG installed in e:\ffmpeg
I have developed a number of windows batch files, and will attempt to explain each of them here. Their contents are between the …
-
Setup the environment. The first batch file is placed into your c:\windows\system32 folder. It sets the path and a few other things… copy/paste into TABLO.BAT. The reason it resides here is when you open a DOS box in windows, the default folder is c:\windows\system32 You don’t want to be here!
…
e:
cd\ffmpeg
ff-prompt
…
NOTE: my tablo stuff is on drive e: Use another drive if you like, but make sure all references to e: are changed to whichever drive you use. Once done, you can set it and forget it. -
The 2nd batch file is provided by ffmpeg. It sets up the environment and dos prompt. I made some tweaks, so copy/paste this into e:\ffmpeg\ff-prompt.bat
…
@ECHO OFF
REM FF Prompt 1.2
REM
REM Copyright © 2013-2015 Kyle Schwarz
TITLE FF Prompt
IF NOT EXIST bin\ffmpeg.exe (
CLS
ECHO bin\ffmpeg.exe could not be found.
GOTO:error
)
CD bin || GOTO:error
PROMPT $P$G
SET PATH=%CD%;%PATH%
CLS
ffmpeg -version
cd \ffmpeg
ECHO.
ECHO For help run: ffmpeg -h
ECHO For formats run: ffmpeg -formats ^| more
ECHO For codecs run: ffmpeg -codecs ^| more
ECHO.
ECHO Current directory is now: “%CD%”
ECHO The bin directory has been added to PATH
ECHO.
CMD /Q /K
GOTO:EOF
:error
ECHO.
ECHO Press any key to exit.
PAUSE >nul
GOTO:EOF
…
.3. The working batch file is presented here. You will need to modify the URL so that it points to the IP of your TABLO device. The ffmpeg parameters are minimal and they work. Modifying them will cause unpredictable results. I’ve been testing this batch file for 2 weeks, and I am quite pleased with the results. It is also called TABLO.BAT, but resides in e:\ffmpeg. You will also need to create working folder e:\ffmpeg\TABLO That is where the resultant .ts file(s) are stored when complete. Don’t forget to change the IP inside the batch file to your TABLO. Don’t touch anything else!
…
@echo off
setlocal enabledelayedexpansion
e:
cd \ffmpeg
echo TABLO.BAT
echo must be called using: TABLO pvr_id maxTSval
echo.
echo.
echo. >> e:\TABLO.log
echo START %1 %2 %date% %time% >> e:\TABLO.log
echo. >> e:\TABLO.log
if exist tablo%1.ts echo. trying to delete tablo/%1.ts >> e:\TABLO.log
if exist tablo%1.ts del tablo%1.ts
:top
if (%1)==() goto done
if (%2)==() goto done
set /a x=0
for /l %%I in (1,1,%2) do (
set /a x+=1
set y=00000!x!
echo. Y Before trim: “!y!”
set y=!y:~-6!
echo. Y="!y!"
for /l %%a in (1,1,10) do if “!y:~-1!”==" " set y=!y:~0,-1!
echo. Y after trim: “!y!”
set t=!y!.ts
echo. T= “!t!”
set new=%1.!y:~-3!
echo. NEW=!new!
ffmpeg -i http://192.168.1.145:18080/pvr/%1/segs/!t! -c copy -copyts tablo/!t!
cd tablo
if not /%3/==/ts/ rename !t! !new!
cd ..
)
if not /%3/==/ts/ goto end
cd tablo
copy /b *.ts %1.out
del *.ts
ren %1.out %1.ts
cd…
goto done
:end
cd tablo
copy /b %1.* %1.out
ren %1.out %1.ts
if exist %1.0* del %1.0*
if exist %1.1* del %1.1*
if exist %1.2* del %1.2*
if exist %1.3* del %1.3*
if exist %1.4* del %1.4*
if exist %1.5* del %1.5*
if exist %1.6* del %1.6*
if exist %1.7* del %1.7*
if exist %1.8* del %1.8*
if exist %1.9* del %1.9*
cd…
:done
echo. >> e:\TABLO.log
echo END %1 %date% %time% >> e:\TABLO.log
echo. >> e:\TABLO.log
…
Note that this batch file expects the pvrID and the number of files within that pvrID. I will show you how to find these here as well. I keep track of this info by jotting down this info in my journal.
The default of this batch file is to create pvriID.ts file. This video file can be played by VLC media player. A slightly different approach is used by added a third parameter ‘ts’ (no quotes). The result is the same.
.4. Where to find the recID’s:
Create a bookmark in your browser as follows. You will want to use this regularly once you get the hang of things.
http://192.168.1.145:18080/plex/rec_ids
change the 192.168.1.145 to the IP of your TABLO. The resulting display will look something like this:
{
“ids”:[
80434,
80437,
80440
]
}
Each of these 5 digit numbers represents a recorded episode or movie.
To determine how many pieces you need to extract, follow this next link for each recID. The sample can be saved also as a bookmark in your browser. I am using 80434 in this example.
http://192.168.1.145:18080/pvr/80434/segs/
The result follows:
Index of /pvr/80434/segs/
Name Last Modified Size Type
Parent Directory/ - Directory
00001.ts 2015-Oct-16 22:23:57 651.4K video/MP2T
00002.ts 2015-Oct-16 22:23:59 762.8K video/MP2T
00003.ts 2015-Oct-16 22:24:01 757.1K video/MP2T
00004.ts 2015-Oct-16 22:24:04 1.1M video/MP2T
00005.ts 2015-Oct-16 22:24:07 1.1M video/MP2T
00006.ts 2015-Oct-16 22:24:10 1.2M video/MP2T
00007.ts 2015-Oct-16 22:24:13 1.7M video/MP2T
00008.ts 2015-Oct-16 22:24:17 2.9M video/MP2T
00009.ts 2015-Oct-16 22:24:21 2.3M video/MP2T
00010.ts 2015-Oct-16 22:24:26 2.5M video/MP2T
00011.ts 2015-Oct-16 22:24:31 2.7M video/MP2T
00012.ts 2015-Oct-16 22:24:37 4.7M video/MP2T
00013.ts 2015-Oct-16 22:24:43 4.8M video/MP2T
00014.ts 2015-Oct-16 22:24:50 4.1M video/MP2T
00015.ts 2015-Oct-16 22:24:57 2.8M video/MP2T
00016.ts 2015-Oct-16 22:25:05 4.4M video/MP2T
00017.ts 2015-Oct-16 22:25:13 7.6M video/MP2T
00018.ts 2015-Oct-16 22:25:22 4.6M video/MP2T
00019.ts 2015-Oct-16 22:25:31 5.5M video/MP2T
00020.ts 2015-Oct-16 22:25:41 7.5M video/MP2T
00021.ts 2015-Oct-16 22:25:51 7.0M video/MP2T
00022.ts 2015-Oct-16 22:26:01 6.2M video/MP2T
00023.ts 2015-Oct-16 22:26:11 5.7M video/MP2T
00024.ts 2015-Oct-16 22:26:21 5.0M video/MP2T
00025.ts 2015-Oct-16 22:26:31 4.9M video/MP2T
00026.ts 2015-Oct-16 22:26:41 6.7M video/MP2T
Here are 26 .ts files saved for this episode. You need to run the TABLO.BAT file in e:\ffmpeg as follows:
TABLO 80434 26
This tells the batch file to start at 1 and end at 26. The result will be e:\ffmpeg\tablo\80434.ts You can now rename the file to whatever it represents… ie blindspot.s01e02 Once you are happy with the result, you can delete the episode using your tablo app.
Are you ready to remove commercials? I have a solution for that as well. It is, however, a manual process and takes about 5 minutes per episode(give or take). The best utility I’ve found so far is called Smart.Cutter. Costs about $50 but is well worth it if you have a library of episodes without commercials.
I welcome any comments, questions and suggestions for improvement.
CCR