 |
pyTivo Discussion Forum Answers and the development of pyTivo a TiVo transcoding server
|
|
| Author |
Message |
sgtstadanko
Joined: 26 Sep 2008 Posts: 21
|
Posted: Fri Sep 26, 2008 8:43 pm Post subject: Integrating MythTV with pyTivo |
|
|
Hey All,
Just installed pyTivo on my linux media server and am quite impressed. I am now able to serve up all the videos on my myth box seamlessly to the Tivo. I was wondering if anyone has tried to integrate playback recorded TV function?
Basically MythTV stores files with the channelID and timestamp as the file name (for example 1158_20080920200000.mpg). All of the program info is stored in a mysql db. I can add the directory with the recordings but in the Video list all you get is the 1158_20080920200000.mpg instead of the program name. Ideally one should see the Program Name, the when it is selected the detailed episode info on the Start Transfer screen. This has been done with galleon and FUSE, but running the java app all the time eats up resources. Using MythTVFUSE, you can mount the recordings directory and FUSE calls the db and replaces the filename with program info so that the above becomes {The Venture Brothers}{1969-12-31}{My Dinner With Hatred}{10.30 PM Sun Jun 22, 2008}{TOON}{1800}{}1158_20080920200000.mpg.mpg. Galleon parses the {} and it appears with show name in now playing and shows all the details of the episode at the detailed transfer screen.
Basically I was wondering if there was a way with python to parse this info and have it presented to the Tivo? Just an idea.....
Thanks
|
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 1420
|
Posted: Fri Sep 26, 2008 9:48 pm Post subject: |
|
|
pyTivo supports metadata in .txt files. So in your example, if you had 1158_20080920200000.mpg and 1158_20080920200000.mpg.txt along side it with the metadata, then pyTivo would send the title, actors, dates, etc... over to the Tivo and you would see it in the transfer list rather than the file name.
For the format of the metadata file, see:
http://pytivo.armooo.net/wiki/MetaData
And there are some utilities already written to query online databases and generate the metadata files. If you can get Myth to generate them or adapt one of the existing scripts to read from your db and produce the metadata when the movie is written, then you'd be set.
For the utils, see:
http://pytivo.krkeegan.com/other-apps-f5.html
|
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2008 Location: Maryland
|
Posted: Sat Sep 27, 2008 12:17 am Post subject: |
|
|
But it certainly should be easy enough to parse that format, too. Um, if you would, please post some more examples, so I can have something to test with, without having to build a MythTV system.
_________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
sgtstadanko
Joined: 26 Sep 2008 Posts: 21
|
Posted: Sat Sep 27, 2008 12:41 am Post subject: |
|
|
awesome...these are just the kinda replies I was hoping for. Here are some more examples:
| Code: | {Aqua Teen Hungerforce}{1969-12-31}{Redickulous}{02.15 AM Mon Sep 22, 2008}{TOON}{900}{}1018_20080922021500.mpg.mpg
{Fringe}{1969-12-31}{Pilot}{07.00 PM Tue Sep 09, 2008}{WBRC}{5700}{When an international flight lands at Boston's Logan Airport and there are no signs of life, FBI Special Agent Olivia Dunham, a scientist, Walter Bishop, and his son Peter uncover a deadly mystery involving a series of unbelievable events.}1007_20080909190000.mpg.mpg
{Fringe}{1969-12-31}{The Ghost Network}{08.01 PM Tue Sep 23, 2008}{WBRC}{3540}{The team investigates a bus full of dead commuters that appear to be fossilized, and uncover a man who has visions of pattern-related disturbances before they happen; Dr. Bishop requests a piano in the lab to help him process data.}1007_20080923200100.mpg.mpg
{Fringe}{1969-12-31}{The Same Old Story}{08.00 PM Tue Sep 16, 2008}{WBRC}{3600}{The link between a wildly accelerated pregnancy and a baby who ages in a matter of minutes is investigated; Peter endures his new role as his father's keeper; Olivia turns to Massive Dynamic's chief operating officer for assistance.}1007_20080916200000.mpg.mpg
{Heroes}{1969-12-31}{The Second Coming; The Butterfly Effect}{08.00 PM Mon Sep 22, 2008}{WVTM}{7200}{The identity of the shooter is revealed, throwing Peter and Matt into uncharted territory; Sylar declares war on the Company and attacks its primary facility, but finds more than he expected on Level 5.}1008_20080922200000.mpg.mpg
{Hillbilly: The Real Story}{1969-12-31}{}{11.00 PM Sun Jan 13, 2008}{HISTORY}{7200}{Stories about mythic hillbillies drawn from 300 years of outcast immigrants, war heroes, isolated backwoodsmen, miners, moonshiners, preachers, musicians and politicians. Host: Billy Ray Cyrus.}1034_20080113230000.mpg.mpg
|
Here is the explanation of the fields from MythtvFUSE:
Filenames in the MythTVfs filesystem are named based on their TV Program's
metadata. The elements are contained by the brace symbols ("{}") and have
the original filename embedded, and then end with ".mpg".
{SERIES_TITLE}{AIR_DATE}{EPISODE_TITLE}{RECORD_DATE}{CHANNEL}{DURATION}{DESCRIPTION}FILE.mpg
Where "RECORD_DATE" has the format "07.15 PM Wed Mar 31, 2005", and "AIR_DATE"
has the format "2005-03-31". "DURATION" is measured in seconds, and "CHANNEL"
is the shortened channel "callsign". "FILE" is the original MythTV filename
for storage (e.g. "1013_20051207210000_20051207220000.nuv").
The air date is way off...obviously. There is a bug in the guy code. Airdates not as big a deal as the ep name.
|
|
| Back to top |
|
 |
trevorp
Joined: 28 Sep 2008 Posts: 7
|
Posted: Sun Sep 28, 2008 7:26 pm Post subject: |
|
|
Funny you should ask this. I just discovered pyTivo last week and figured it would be a great way to get my MythTV recordings on my Tivo.
I have written a php script that will do two things: First, it will look at your recordedprograms table in MythTV, and create symlinks with "friendly" names to all of your MythTV recordings. More on this below; Second, it will create pyTivo metadata files for all of the symlinked recordings with as much useful information as I saw in the MythTV database.
Though creating the symlinks is not necessary for pyTivo, as it will display the data from the metadata files, I still find it useful.
The script also runs a clean up routine at the end where it deletes symlinks to missing files, orphaned metadata files and empty directories. PLEASE MAKE SURE YOU SET YOUR DIRECTORIES CORRECTLY AT THE TOP OF THE SCRIPT. Care has been taken to only delete orphaned .txt files, however if you set your directories wrong, you can delete .txt files you didn't intend to.
Here is a small sample of what the results look like:
| Code: |
/video/mythtv_friendly/Family Guy/Family Guy - 100th Episode Special - 20080323210000.mpg -> /video/mythtv/1007_20080323210000.mpg
/video/mythtv_friendly/Family Guy/Family Guy - 100th Episode Special - 20080323210000.mpg.txt
/video/mythtv_friendly/Family Guy/Family Guy - Back to the Woods - 20080217210000.mpg -> /video/mythtv/1007_20080217210000.mpg
/video/mythtv_friendly/Family Guy/Family Guy - Back to the Woods - 20080217210000.mpg.txt
/video/mythtv_friendly/Family Guy/Family Guy - Believe It or Not Joe's Walking on Air - 20071007210000.mpg -> /video/mythtv/1007_20071007210000.mpg
/video/mythtv_friendly/Family Guy/Family Guy - Believe It or Not Joe's Walking on Air - 20071007210000.mpg.txt
/video/mythtv_friendly/How It's Made/How It's Made - 20071218233000.mpg -> /video/mythtv/1110_20071218233000.mpg
/video/mythtv_friendly/How It's Made/How It's Made - 20071218233000.mpg.txt
/video/mythtv_friendly/How It's Made/How It's Made - 20071219090000.mpg -> /video/mythtv/1055_20071219090000.mpg
/video/mythtv_friendly/How It's Made/How It's Made - 20071219090000.mpg.txt
/video/mythtv_friendly/How It's Made/How It's Made - 20071219233000.mpg -> /video/mythtv/1110_20071219233000.mpg
/video/mythtv_friendly/How It's Made/How It's Made - 20071219233000.mpg.txt
|
As noted in the script source, not all metadata information seems to be shown. I'm not sure if it's behaving correctly, and I have the wrong expectations or not. My pyTivo entries on my Tivo HD have just disappeared, so I can't do any more testing right now, but I figured I'd get this out so others may find it useful.
Please find the script attached.
-Trevor
| Description: |
|
 Download |
| Filename: |
mythfriendly.zip |
| Filesize: |
3.29 KB |
| Downloaded: |
83 Time(s) |
|
|
| Back to top |
|
 |
sgtstadanko
Joined: 26 Sep 2008 Posts: 21
|
Posted: Mon Sep 29, 2008 12:32 am Post subject: |
|
|
you, sir...rule.
I will give her a rip
|
|
| Back to top |
|
 |
sgtstadanko
Joined: 26 Sep 2008 Posts: 21
|
Posted: Mon Sep 29, 2008 9:36 pm Post subject: |
|
|
work great for me. I changed the title var to $title so it shows up with the show name on now playing, but other than that all works. Now to add it as a myth job to run after recordings finished so it updates the files and soft reset pyTivo.
thanks
|
|
| Back to top |
|
 |
trevorp
Joined: 28 Sep 2008 Posts: 7
|
Posted: Tue Sep 30, 2008 12:21 am Post subject: |
|
|
Excellent, glad it worked. Looks like I goofed on the title part. I was playing around and forgot to put it back I guess. Glad you caught it too.
You shouldn't need to soft reset pyTivo though. I know at least for me it picks up the changes automatically.
|
|
| Back to top |
|
 |
trevorp
Joined: 28 Sep 2008 Posts: 7
|
Posted: Tue Sep 30, 2008 7:18 pm Post subject: |
|
|
Here's a small update that includes changing the title: metadata to $title per sgtstadanko's suggestion.
Also, I added a left outer join on the ratings table to handle shows without ratings. I noticed it on Heroes, where 1 of the three episodes I have recorded has a rating, but the other two don't
| Description: |
|
 Download |
| Filename: |
mythfriendly-0.1.2.zip |
| Filesize: |
3.41 KB |
| Downloaded: |
80 Time(s) |
|
|
| Back to top |
|
 |
danimal4326
Joined: 14 Apr 2008 Posts: 40
|
Posted: Tue Sep 30, 2008 8:44 pm Post subject: |
|
|
| what about updating pytivo video filter to query the mythtv DB directly? Use this info instead of meta files. This would work for movie files as well, as the MYTH video plugin stores IMDB data in the myth db. just a thought..
|
|
| Back to top |
|
 |
trevorp
Joined: 28 Sep 2008 Posts: 7
|
Posted: Tue Sep 30, 2008 9:21 pm Post subject: |
|
|
Probably easy enough to do. At least for me, that would require learning python though. I'll leave that to someone who's at least seen python code to do.
I would worry that this would create a rather specialized fork of pyTivo for those of us with MythTV boxes and Tivos.
It would also be a lot more configuration for your average user, as they would have to grant access to the mysql server from the pyTivo box unless they were on the same pc.
I'm not saying don't go for it, by all means, please do! Just pointing out some observations.
|
|
| Back to top |
|
 |
edalquist
Joined: 03 Oct 2008 Posts: 14
|
Posted: Fri Oct 03, 2008 3:32 am Post subject: |
|
|
You can also use the mythrename.pl script which is included with MythTV.
http://www.mythtv.org/wiki/index.php/Mythrename.pl
You can get the script to create symlinks in a directory to all of your mythtv recordings.
I run the following to get the renaming done:
/usr/share/doc/mythtv-backend/contrib/mythrename.pl --link /filer/mythtv-nice --underscores --format "%T-%Y.%m.%d-%H.%i-%S"
Last edited by edalquist on Fri Oct 03, 2008 12:05 pm; edited 1 time in total |
|
| Back to top |
|
 |
edalquist
Joined: 03 Oct 2008 Posts: 14
|
Posted: Fri Oct 03, 2008 3:41 am Post subject: |
|
|
I am having some problems transferring files (push from pyTivo or pull from the Tivo) to my new HD Tivo.
I have MythTV setup using a HDHomeRun to record digital TV broadcasts. Myth doesn't do any transcoding, it just writes the MPEG2 TS from the DTV broadcast to disk.
Transferring the files fails with: error: (104, 'Connection reset by peer') It appears that pyTivo seems to think the files are in the appropriate format for the Tivo but I'm wondering if there is some transcoding needed?
Here is my debug logfile:
| Code: |
192.168.0.10 - - [02/Oct/2008 22:28:51] "GET /TiVoConnect?Command=QueryContainer&Container=MyMovies HTTP/1.1" 200 -
192.168.0.10 - - [02/Oct/2008 22:28:52] "GET /TiVoConnect?Command=XSL&Container=MyMovies HTTP/1.1" 200 -
DEBUG:root:ffmpeg output=FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Jul 29 2008 18:21:25, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Input #0, mpegts, from '/filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg':
Duration: 01:07:54.4, start: 62898.249944, bitrate: 16662 kb/s
Stream #0.0[0x31]: Video: mpeg2video, yuv420p, 1920x1080, 90000 kb/s, 29.97 fps(r)
Stream #0.1[0x34](eng): Audio: ac3, 48000 Hz, 5:1, 384 kb/s
Must supply at least one output file
DEBUG:pyTivo.video.transcode:aFreq=48000; vFps=29.97; kbps=16662; mapAudio=[('0.1', '[0x34](eng)')]; vWidth=1920; vCodec=mpeg2video; Supported=True; millisecs=4074400; aKbps=384; par2=None; par1=None; dar2=None; mapVideo=0.0; vHeight=1080; dar1=None; aCodec=ac3
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:pyTivo.video.transcode:(True, 'TRANSCODE=NO, HD Tivo detected, skipping remaining tests.'), /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:pyTivo.video.transcode:(True, 'TRANSCODE=NO, HD Tivo detected, skipping remaining tests.'), /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:pyTivo.video.transcode:(True, 'TRANSCODE=NO, HD Tivo detected, skipping remaining tests.'), /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:pyTivo.mind:__login
{'cams_security_domain': 'tivocom', 'cams_login_config': 'http', 'cams_cb_password': 'mypassword', 'cams_original_url': '/mind/mind7?type=infoGet', 'cams_cb_username': 'myemail@example.com'}
DEBUG:pyTivo.mind:pcBodySearch
{}
<pcBodyList><isBottom>true</isBottom><isTop>true</isTop><pcBody><bucketNumber>3436</bucketNumber><levelOfDetail>low</levelOfDetail><name>pyTivo</name><pcBodyId>tivo:pc.1000356191</pcBodyId><type>pcBody</type></pcBody></pcBodyList>g
DEBUG:pyTivo.mind:pcBodySearch
{}
<pcBodyList><isBottom>true</isBottom><isTop>true</isTop><pcBody><bucketNumber>3436</bucketNumber><levelOfDetail>low</levelOfDetail><name>pyTivo</name><pcBodyId>tivo:pc.1000356191</pcBodyId><type>pcBody</type></pcBody></pcBodyList>g
DEBUG:pyTivo.mind:bodyOfferModify&bodyId=tsn:652000180391B8D
{'subtitle': '', 'description': '', 'title': 'Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials', 'url': 'http://192.168.0.2:9032/MyMovies/Law_%26_Order-_Special_Victims_Unit_-_2008-09-23%2C_8-57_PM_-_Trials.mpg', 'pcBodyId': 'tivo:pc.1000356191', 'bodyId': 'tsn:652000180391B8D', 'publishDate': '2008-10-03 03:2921', 'source': 'file:/C%3A%2FDocuments%20and%20Settings%2FStephanie%2FDesktop%2FVideo', 'state': 'complete', 'partnerId': 'tivo:pt.3187', 'duration': 4074, 'encodingType': 'mpeg2ProgramStream', 'size': 8486107936L}
<bodyOffer><bodyId>tsn:652000180391B8D</bodyId><bodyOfferId>tivo:bo.15000041</bodyOfferId><createDate>2008-10-03 03:29:26</createDate><description /><duration>4074</duration><encodingType>mpeg2ProgramStream</encodingType><levelOfDetail>high</levelOfDetail><offerId>tivo:of.bs.15000041</offerId><partnerId>tivo:pt.3187</partnerId><pcBodyId>tivo:pc.1000356191</pcBodyId><publishDate>2008-10-05 03:41:00</publishDate><size>8486107936</size><source>file:/C%3A%2FDocuments%20and%20Settings%2FStephanie%2FDesktop%2FVideo</source><state>complete</state><subtitle /><title>Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials</title><updateDate>2008-10-03 03:29:26</updateDate><url>http://192.168.0.2:9032/MyMovies/Law_%26_Order-_Special_Victims_Unit_-_2008-09-23%2C_8-57_PM_-_Trials.mpg</url></bodyOffer>g
DEBUG:pyTivo.mind:subscribe&bodyId=tsn:652000180391B8D
{'uiType': 'cds', 'idSetSource': {'contentId': 'tivo:ct.bs.15000041', 'type': 'singleOfferSource', 'offerId': 'tivo:of.bs.15000041'}, 'bodyId': 'tsn:652000180391B8D', 'title': 'pcBodySubscription'}
<subscribeResult><subscription><autoRecord>true</autoRecord><bodyGeneratesCandidates>false</bodyGeneratesCandidates><bodyId>tsn:652000180391B8D</bodyId><idSetSource><contentId>tivo:ct.bs.15000041</contentId><offerId>tivo:of.bs.15000041</offerId><type>singleOfferSource</type></idSetSource><isForKids>false</isForKids><levelOfDetail>high</levelOfDetail><showStatus>rerunsAllowed</showStatus><subscriptionId>tivo:sb.15000041</subscriptionId><title>pcBodySubscription</title><type>subscription</type><uiType>cds</uiType></subscription></subscribeResult>g
192.168.0.10 - - [02/Oct/2008 22:29:31] "GET /TiVoConnect?Command=Push&Container=MyMovies&File=%2FLaw_%26_Order-_Special_Victims_Unit_-_2008-09-23%2C_8-57_PM_-_Trials.mpg&tsn=Family+Room HTTP/1.1" 302 -
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:pyTivo.video.transcode:(False, 'TRANSCODE=YES, 1920 x 1080 not in supported modes.'), /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:pyTivo.video.transcode:(False, 'TRANSCODE=YES, 1920 x 1080 not in supported modes.'), /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:tsn:
DEBUG:root:aspect169:True
DEBUG:root:optres:False
DEBUG:pyTivo.video.transcode:File=/filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg vCodec=mpeg2video vWidth=1920 vHeight=1080 vFps=29.97 millisecs=4074400 ratio=177 rheight=9 rwidth=16 TIVO_HEIGHT=480TIVO_WIDTH=544
DEBUG:pyTivo.video.transcode:File is within 16:9 list and 16:9 allowed.
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:pyTivo.video.transcode:(False, 'TRANSCODE=YES, 1920 x 1080 not in supported modes.'), /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
192.168.0.10 - - [02/Oct/2008 22:29:31] "GET /TiVoConnect?Command=QueryContainer&Container=MyMovies HTTP/1.1" 200 -
192.168.0.10 - - [02/Oct/2008 22:29:31] "GET /TiVoConnect?Command=XSL&Container=MyMovies HTTP/1.1" 200 -
192.168.0.20 - - [02/Oct/2008 22:29:48] "GET /MyMovies/Law_%26_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg HTTP/1.1" 200 -
DEBUG:root:CACHE HIT! /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:pyTivo.video.transcode:(True, 'TRANSCODE=NO, HD Tivo detected, skipping remaining tests.'), /filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg
DEBUG:pyTivo.video.transcode:/filer/mythtv-nice/Law_&_Order-_Special_Victims_Unit_-_2008-09-23,_8-57_PM_-_Trials.mpg is tivo compatible
----------------------------------------
Exception happened during processing of request from ('192.168.0.20', 33615)
Traceback (most recent call last):
File "/usr/lib/python2.5/SocketServer.py", line 464, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.5/SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.5/SocketServer.py", line 522, in __init__
self.handle()
File "/usr/lib/python2.5/BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "/usr/lib/python2.5/BaseHTTPServer.py", line 310, in handle_one_request
method()
File "/home/edalquist/wgw/httpserver.py", line 64, in do_GET
plugin.send_file(self, container, name)
File "/home/edalquist/wgw/plugins/video/video.py", line 216, in send_file
handler.wfile, tsn)
File "/home/edalquist/wgw/plugins/video/transcode.py", line 34, in output_video
shutil.copyfileobj(f, outFile)
File "/usr/lib/python2.5/shutil.py", line 24, in copyfileobj
fdst.write(buf)
File "/usr/lib/python2.5/socket.py", line 262, in write
self.flush()
File "/usr/lib/python2.5/socket.py", line 249, in flush
self._sock.sendall(buffer)
error: (104, 'Connection reset by peer')
----------------------------------------
|
|
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2008 Location: Maryland
|
Posted: Fri Oct 03, 2008 5:51 am Post subject: |
|
|
The TiVo expects program streams, not transport streams. Unfortunately the ffmpeg check that pyTivo uses just recognizes these as MPEG-2, so it passes them.
_________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 1420
|
Posted: Fri Oct 03, 2008 11:34 am Post subject: |
|
|
To elaborate on what wmcbrine said, the Tivo cannot handle MPEG2 Transport streams directly. Feeding a MPEG2 TS to the Tivo will cause it to reject it and close the network socket which in turn causes the stack trace at the bottom of your log.
The pyTivo transcode logic screen scrapes the ffmpeg output along with looking at the file's extension to decide whether to transcode or not. Unfortunately that logic doesn't look at the ffmpeg container format specifier currently.
If you rename your Transport Streams with a .ts ending rather than .mpg, the pyTivo logic will automatically flag that as a Transport Stream and use ffmpeg to convert it to Program Stream (vob) format on the fly for transfer to the Tivo.
Or you can create a metadata file for the mpg file that forces transcoding. If you group all your Transport Stream mpg files in a directory (or a number of directors) and drop a default.txt metadata file into the directory with the following line:
| Code: |
Override_kbps : 99999
|
Then pyTivo will think all the files in the directory have too high of a video bitrate and force transcoding.
Or if you'd rather not deal with moving the files around and the default.txt approach, you can create an individual metadata file with the same line. For instance:
myexample.mpg <--- Movie file
myexample.mpg.txt <--- corresponding metadata file
Last edited by rdian06 on Fri Oct 03, 2008 11:54 am; edited 1 time in total |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|