# .tmf to .tivo converter?



## StanSimmons (Jun 10, 2000)

I'm doing a HUGE conversion of S1 shows from a pair of HDR112's v3 to
a S2 240040 v9.1.

I've used mfs_ftp to pull about 250GB of shows off the S1 boxes. In
the past, I used tivoserver to allow MRV to pull the shows back to the
S2 box. Now with v9 and the new MRV stuff, tivoserver isn't working.

If the files were in .tivo format, then tivodesktop would let me
transfer the shows. I've been hunting for a .tmf to .tivo file
converter, but haven't found anything. Do you know of anything that
might do the trick?

My other possibility would be to pull off the existing shows on the
240040 as .tivo files, reformat the 240040 to v4, move the S1 shows
with tivoserver, then let it upgrade to v9. Then move the S2 .tivo
shows back on. I'd rather not have to do that dance if I can avoid it.


----------



## StanSimmons (Jun 10, 2000)

Before anyone starts whining about .tivo conversion and breaking encryption....

This is taking files that were never encrypted, since SAS1 boxes do not encrypt shows, and converting them to .tivo files for importing to a S2 box. This in no way runs afoul of the DMCA.


----------



## gonzotek (Sep 24, 2004)

If you won't mind the loss of any metadata (if it exists, I'm not overly familiar with .tmf files) you should be able to convert to mpeg, then use tivo desktop, or pytivo or another 'goback' server.


----------



## StanSimmons (Jun 10, 2000)

Preventing the loss of the metadata is the reason I want to convert the .tmf files directly into .tivo files.


----------



## armooo (Feb 2, 2003)

StanSimmons said:


> Preventing the loss of the metadata is the reason I want to convert the .tmf files directly into .tivo files.


If you can extract the metadata from the tmf files in to a <filename>.txt file and convert them to mpeg pyTivo will be able send them to a S2 with most of the metadata. The metadata format is here http://www.tivocommunity.com/tivo-vb/showthread.php?p=5722528#post5722528


----------



## StanSimmons (Jun 10, 2000)

armooo said:


> If you can extract the metadata from the tmf files in to a <filename>.txt file and convert them to mpeg pyTivo will be able send them to a S2 with most of the metadata. The metadata format is here http://www.tivocommunity.com/tivo-vb/showthread.php?p=5722528#post5722528


I'm not a programmer, but it looks like that might be doable. I'm told the metadata is in XML format in the .tmf file.

Any chance you might add .tmf/ty/ty+ capability to pyTivo? That would be a huge boon to anyone running pre v9 software on some boxes and v9+ on others


----------



## StanSimmons (Jun 10, 2000)

I've built a batch file that is using the command line version of 7-Zip to extract the xml file and the partxx.ty files from the .tmf files. It then renames the "showing.xml" file to match the .tmf file. It then does a binary concatenate of the part00.ty-partxx.ty files into one big ty file and renames it to match the .tmf file. When that completes, it uses tytompg.exe to convert from .ty format to .mpg format and deletes the .ty file.


```
@ECHO OFF
REM To run mpgtest.bat
REM T:\Old S1 Shows\mpg>for &#37;x in (..\*.tmf) do mpgtest.bat "%x"

IF EXIST "%~n1.mpg" GOTO ENDIT

REM Extract xml and ty files
"C:\Program Files\7-Zip\7z.exe" e "..\%~n1.tmf"

REM rename xml file
rename showing.xml "%~n1.xml"

REM concat partxx.ty files
rename part00.ty "%~n1.ty"
IF EXIST part01.ty copy /Y "%~n1.ty" /B + part01.ty /B 
IF EXIST part02.ty copy /Y "%~n1.ty" /B + part02.ty /B 
IF EXIST part03.ty copy /Y "%~n1.ty" /B + part03.ty /B 
IF EXIST part04.ty copy /Y "%~n1.ty" /B + part04.ty /B 
IF EXIST part05.ty copy /Y "%~n1.ty" /B + part05.ty /B 
IF EXIST part06.ty copy /Y "%~n1.ty" /B + part06.ty /B 
IF EXIST part07.ty copy /Y "%~n1.ty" /B + part07.ty /B 
IF EXIST part08.ty copy /Y "%~n1.ty" /B + part08.ty /B 
IF EXIST part09.ty copy /Y "%~n1.ty" /B + part09.ty /B 
del /Q part*.ty

REM convert to mpg
tytompg.exe "%~n1.ty"
del /Q "%~n1.ty"

:ENDIT
```
This leaves me with the original .tmf file, a .mpg file and a .xml file with the metadata in it. It is currently chugging thru about 250 Gig of shows (around 200 or so shows) and looks like it might finish sometime this weekend.

Does anyone have any suggestions on what I need to do to convert the .xml files to proper format .txt files for pyTivo to process? Below is the xml file for one of the shows.


```
<?xml version="1.1" tivoversion="3.0-01-1-000"?>
<Object type="Recording" id="_top">
  <BitRate>0</BitRate>
 <SubObject type="RecordingPart" id="Part">
   <Begin>0</Begin>
   <CommercialSkipOffset>0</CommercialSkipOffset>
   <End>2528828</End>
   <File>1536259</File>
 </SubObject>
 <SubObject type="RecordingPart" id="Part">
   <Begin>2529329</Begin>
   <CommercialSkipOffset>0</CommercialSkipOffset>
   <End>3601072</End>
   <File>1536260</File>
 </SubObject>
  <RecordQuality>0</RecordQuality>
  <SelectionType>3</SelectionType>
 <SubObject type="Showing" id="Showing">
   <Date>13679</Date>
   <Duration>3600</Duration>
  <Object type="Program" id="Program">
    <ColorCode>4</ColorCode>
    <DescLanguage>English</DescLanguage>
    <Description>The Ulles discovery South Africa.</Description>
    <EpisodeTitle>South Africa</EpisodeTitle>
    <Genre>112</Genre>
    <Genre>1000</Genre>
    <IsEpisode>1</IsEpisode>
    <OriginalAirDate>13678</OriginalAirDate>
   <Object type="Series" id="Series">
     <Episodic>1</Episodic>
     <Genre>112</Genre>
     <Genre>1000</Genre>
     <ServerId>84679307</ServerId>
     <ServerVersion>3</ServerVersion>
     <ThumbData>268633087</ThumbData>
     <Title>1,000 Places to See Before You Die</Title>
     <TmsId>SH883642</TmsId>
   </Object>
    <ServerId>97060716</ServerId>
    <ServerVersion>2</ServerVersion>
    <ShowType>5</ShowType>
    <SourceType>1</SourceType>
    <Title>1,000 Places to See Before You Die</Title>
    <TmsId>EP8836420013</TmsId>
  </Object>
  <Object type="Station" id="Station">
    <Affiliation>DISCOVERY</Affiliation>
    <AffiliationIndex>64</AffiliationIndex>
    <CallSign>TRAV</CallSign>
    <City>Silver Spring</City>
    <Country>United States</Country>
    <DmaNum>0</DmaNum>
    <LogoIndex>65720</LogoIndex>
    <Name>The Travel Channel</Name>
    <ServerId>985</ServerId>
    <ServerVersion>90</ServerVersion>
    <TmsId>11180</TmsId>
    <ZipCode>20910</ZipCode>
  </Object>
   <Time>7200</Time>
   <TvRating>3</TvRating>
 </SubObject>
  <StartDate>13679</StartDate>
  <StartTime>7198</StartTime>
  <StopDate>13679</StopDate>
  <StopTime>10800</StopTime>
  <StreamFileSize>749568</StreamFileSize>
  <SubPriority>28</SubPriority>
  <UsedBy>1</UsedBy>
</Object>
```


----------



## philhu (Apr 11, 2001)

armooo said:


> If you can extract the metadata from the tmf files in to a <filename>.txt file and convert them to mpeg pyTivo will be able send them to a S2 with most of the metadata. The metadata format is here http://www.tivocommunity.com/tivo-vb/showthread.php?p=5722528#post5722528


I actually wrote a program to cvt the .txt files from mfs_ftp that go along with the .ty files to create pyTivo meta files. Not the xml files, but the .txt ones.

It converts all available fields for pytivo so the files can then be reimported.

The only problem I am having is tytompg seems to clip the sound a bit on my S2SA streams. They play fine on a computer but sound like dropouts every 1 second or so on the tivo.

Hmmmmm


----------



## StanSimmons (Jun 10, 2000)

philhu said:


> I actually wrote a program to cvt the .txt files from mfs_ftp that go along with the .ty files to create pyTivo meta files. Not the xml files, but the .txt ones.
> 
> It converts all available fields for pytivo so the files can then be reimported.
> 
> ...


Any chance you could modify your program to use the xml files?

I'll be testing a few of my tytompg converted files tonight, I'll report what I see later.


----------



## StanSimmons (Jun 10, 2000)

I have transfered a few of my .tmf files (after converting to .ty, then to .mpg with tytompg.exe) to my v9.x TiVos using the TiVo Desktop Plus v2.5.1.

I'm seeing some audio clipping/drop outs on my TiVoHD, but not nearly as bad on the 240040. Both showed some degradation and pixelation in the video.

I'm going to try pyTivo next


----------



## Da Goon (Oct 22, 2006)

Pytivo works much better in these cases than TD. No audio dropouts for me with pytivo as opposed to horrible drops when using TD. Transfers seem to go a tad bit faster also.


----------



## StanSimmons (Jun 10, 2000)

pyTivo does seem to transfer faster.

I'm still seeing audio dropouts going to my TiVo HD, but not to my 240040.


----------



## StanSimmons (Jun 10, 2000)

The audio dropouts seem to be a TiVo HD issue. I transferred a show to the TiVo HD, where it had audio dropouts. I then used Tivo Desktop to pull the show back off of the TiVo HD as a .tivo file. This file would play on the PC just fine with no audio dropouts. I then put the .tivo file onto my 240040 where it played fine.

I can only assume that the TiVo HD has some bugs in it that prevent files that play fine on a S2 from playing correct on the TiVo HD.


----------



## mrbubbles (Apr 12, 2003)

philhu said:


> I actually wrote a program to cvt the .txt files from mfs_ftp that go along with the .ty files to create pyTivo meta files. Not the xml files, but the .txt ones.
> 
> It converts all available fields for pytivo so the files can then be reimported.
> 
> ...


Can you post or point me to this script? Thanks.


----------



## Soapm (May 9, 2007)

Can someone link me to or post a copy of tytompg.exe, I have some old .tmf files I need to convert and it looks like the other site is gone for good.


----------



## Wil (Sep 27, 2002)

Soapm said:


> Can someone link me to or post a copy of tytompg.exe, I have some old .tmf files I need to convert and it looks like the other site is gone for good.


The binary executable is still around, I think. I can find it for you if you want that. Turning it into an exe would be simple enough if you really need to do that. Try "tytompeg" also in your searches.


----------



## Soapm (May 9, 2007)

All I'm really finding is the Wiki page that links back to the other site TyToMpg - DVRpedia

I don't know what a binary executable is so if you could turn it into an exe I would be very appreciative.


----------

